8085 Programming : Adding 2 Hexa-decimal nos without carry
LDA 2200
MOV C, A ; Initialize counter
SUB A ; sum = 0
LXI H, 2201H ; Initialize pointer
BACK: ADD M ; SUM = SUM + data
INX H ; increment pointer
DCR C ; Decrement counter
JNZ BACK ; if counter 0 repeat
STA 2300H ; store sum
HLT
Comments
Post a Comment