Professional Documents
Culture Documents
UEI609
UEI609
Page 1 of 2
Q4 The following program was written to perform addition of two 16 bit numbers stored [4]
in memory locations 20H, 21H and 30H, 31H respectively. The results of the addition
are to be stored in memory location 40H, 41H and 42 H.
ORG 0000H
MOV 08H,#40H
MOV RO,#20H
MOV RI,#30H
BACK:MOV R3,#3
MOV A,@ OOH
ADDC A,@ R1
INC RO
INC R I
SETB RS.X
MOV @RO,A
INC RO
DJNZ R3, BACK
END
Page 2 of 2