Perform the subtraction of two 16-bit numbers using ALP.
; F6 96 H
; - C6 79 H
; = 30 1D H
;R1=30H(MSB), R0=1DH(LSB)
ORG 0000H
CLR C
MOV A,#96H
MOV R6,#79H
SUBB A,R6
JNC GO
CPL A
INC A
GO:MOV R0,A
MOV A,#0F6H
MOV R7,#0C6H
SUBB A,R7
JNC GO1
CPL A
INC A
GO1:MOV R1,A
END
Comments
Post a Comment
if you have any doubts,please let me know