Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

(C) and (D) only Please I Find the content of the A register after each of the f

ID: 2080900 • Letter: #

Question


(C) and (D) only Please

I Find the content of the A register after each of the following is executed. (A) MOV SP, m30H Internal DAT MOV DPTR, 9001H PUSH 50H MOVX A, @DPTR PUSH 5 Adr Content MOV RO, A DEC SP 7C INC DPTR POP ACC INC DPTR MOVX A, @DPTR 52 66 D2 ADD A, R0 ORG 8000 MOV SP, #30H (B) MOV DPTR, #9000H EXT Data LCALL SUB Mov RS, Adr Content MOV R7, #07H 7D ST: MovX As a DPTR SUB MOV A, SP 9001 66 JNB 0E7H, SKP 9002 CC INC R5 9003 24 SKP: INC DPTR MOV A, #03H 9004 A4 DUNZ R7, ST MOVC A, a A PC 9005 80 Mov A, R5 SJMP SKP 9006 6A DB 62H 9007 D2 DB 2BH 9008 1F MOV SP, #30H DB 18H PUSH 50H DB 0F1H PUSH 51H MOV A, SP

Explanation / Answer

///Answer for question C

MOV SP, #30H // Stack pointer points to 30H memory location

PUSH 50H // Contents of address 50H is copied to addr-31H (SP incremented by 1)

PUSH 51H //Contents of address 51H is copied to addr 32H(again SP incremented by 1)

MOV A,SP //Copy the content of SP (i.e addr- 32H) to register A.

**At the end of this program register A contains 9E.

////////////////////////////////////////////////

//Answer to question D

MOV SP, #30H // Stack pointer points to 30H memory location

PUSH 50H // Contents of address 50H is copied to 31H (SP incremented by 1)

PUSH 51H //Contents of address 51H is copied to 32H(again SP incremented by 1)

MOV A,SP //Copy the content of SP (i.e 32H) to register A.

DEC SP // Sp is decremented by 1(SP points to addr 31H)

POP ACC// Load the value from SP(addr-31H) to register A(Content-7C)

*******

At the end of this program Register A contains 7C.