Hello, ASM: First Program
Two-instruction program to introduce stepping. mov.w writes the literal 5 into R4, then add.w adds 3, leaving R4 = 8.
What to watch as you step
- mov.w writes an immediate into a register without touching flags
- add.w computes destination = destination + source and updates Z, N, C, V
- PC advances by 2 after each one-word instruction
- R4 transitions 0 → 5 → 8