The stack in the ATMega328P grows downwards. Assuming an initial value of the Stack Pointer Register (SP) of 0x378, stat
Posted: Sun May 15, 2022 4:38 pm
The stack in the ATMega328P grows downwards. Assuming an initial
value of the Stack Pointer Register (SP) of 0x378, state the value
of the SP at points A, B and C in the code fragment below:
ASM_CODE_RTN:
push r10
push r12
push r20
push r21
; POINT A here
; other code here
pop r21
; POINT B here
pop r20
pop r12
pop r10
; POINT C here
ret
value of the Stack Pointer Register (SP) of 0x378, state the value
of the SP at points A, B and C in the code fragment below:
ASM_CODE_RTN:
push r10
push r12
push r20
push r21
; POINT A here
; other code here
pop r21
; POINT B here
pop r20
pop r12
pop r10
; POINT C here
ret