In: Computer Science
Write and assemble a program to load values into each of registers R20 – R24 and then push each of these registers onto the stack. Single-step the program, and examine the stack and the SP register after the execution of each instruction.
.INCLUDE “M32DEF.INC”
LDI R20, HIGH(RAMEND)
OUT SPH, R20
LDI R20,LOW(RAMEND)
OUT SPL, R20
LDI R20, $20
LDI R21, $31
LDI R22, $42
LDI R23, $53
LDI R24, $64
PUSH R20
PUSH R21
PUSH R22
PUSH R23
PUSH R25
L1: RJMP L1