Question: Analyze the stack for the first LCALL instruction in the following program. 01 0000 ORG 0 02 0000 7455 BACK: MOV A, #55H iload A
Analyze the stack for the first LCALL instruction in the following program. 01 0000 ORG 0 02 0000 7455 BACK: MOV A, #55H iload A with 55H 03 0002 F590 MOV P1, A ; send 55H to port 1 04 0004 7099 MOV R4, #99H 05 0006 7067 MOV R5, #67H 06 0008 120300 LCALL DELAY ;time delay 07 000B. 74AA MOV A, #OAAH ;load A with AA OB OOOD F590 MOV PI, A ; send AAH to port 1 09 000F 120300 LCALL DELAY 10 0012 80EC SJMP BACK ; keep doing this 11 0014 this is the delay subroutine 12 0300 ORG 3005 13 0300 0004 DELAY: PUSH ; PUSH R4 14 0302 C005 PUSH ; PUSH R5 150304 7CFF MOV R4, #OFFH 7R4-FH 16 03067DFF NEXT: MOV R5, #OFFH R5=255 17 0308 DDFE AGAIN: DJNZ R5, AGAIN 28 030A DCFA DJNZ R4, NEXT 19 0300 D005 POP ; POP into R5 20 0308 D004 POP ; POP into R4 21 0310 22 ; return to caller 22 0311 END end of asm file RET
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
