Calculate the jump code for again and here if code starts at 0000H MOV R1,#0 MOV A,#0 MOV R0,#25H AGAIN:ADD A,#0ECH JNC HERE HERE: INC

Calculate the jump code for again and here if code starts at 0000H
MOV R1,#0
MOV A,#0
MOV R0,#25H
AGAIN:ADD A,#0ECH
JNC HERE
HERE: INC R1
DJNZ R0,AGAIN
MOV R0,A
END
A. F3,02
B. F9,01
C. E9,01
D. E3,02
 
Answer: c
Explanation: Loop address is calculated by subtracting destination address and the address next to the source address.
So here if we start with 0000H
then source address is 0008H and the destination address is 0004H
So loop address is 04-0A=E9
 

Tìm kiếm

Back
Top