Addition of upper and lower nibble of a 8 bit number
code:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LXI H 8B20h | |
LXI B 4000h | |
MVI E 0Ah | |
LOOP: MOV A M | |
ANI 0Fh | |
MOV D A | |
MOV A M | |
ANI F0h | |
RLC | |
RLC | |
RLC | |
RLC | |
ADD D | |
DAA | |
STAX B | |
INX H | |
INX B | |
DCR E | |
JNZ LOOP | |
HLT |
No comments:
Post a Comment