Hello,
I am stuck on a homework problem. I need to write a program that will add any 2 digit bcd number located in memory locations 6100 & 6101. The results need to be placed in the x register and displayed on the terminal.
This is what I have so far. Please let me know what you think.
MVI C,00
LDAA 6100
MOV B,A
LDAA 6101
ADD B
JNC
INR C
(JNC here)STA 6102
MOV A,C
STA 6103
MOV X,A
JSR FFBB
BRA to this location to stop program
If anyone has any input it will be welcome. Thank you!
I am stuck on a homework problem. I need to write a program that will add any 2 digit bcd number located in memory locations 6100 & 6101. The results need to be placed in the x register and displayed on the terminal.
This is what I have so far. Please let me know what you think.
MVI C,00
LDAA 6100
MOV B,A
LDAA 6101
ADD B
JNC
INR C
(JNC here)STA 6102
MOV A,C
STA 6103
MOV X,A
JSR FFBB
BRA to this location to stop program
If anyone has any input it will be welcome. Thank you!