-5

can someone help me with this: if R16=10 and R17=20 what will be in R16 and R17 after executing this:

.MACRO MAKRO 
ADD @0,@1 
SUB @1,@0 
.ENDMACRO 

MAKRO R16,R17 
PUSH R16 
RCALL PP 
POP R16 
PUSH R17 
RCALL PP
POP R17 
NOP 

PP: 
POP R0 
POP R1 
POP R2 
LSL R2 
PUSH R2 
PUSH R1 
PUSH R0 
RET
lalithkumar
  • 3,480
  • 4
  • 24
  • 40
MaxCro
  • 23
  • 4

1 Answers1

0

you are poping instead of pushing and pushing instead of poping in the pp subroutine.

for the code:

makro:

r16 = 10+20

r17 = 20-30