8085 Programming : store the nos in a memory loc. In the reverse order in another memory location
MVI C, 0AH ; Initialize counter
LXI H, 2200H ; Initialize source memory pointer
LXI D, 2309H ; Initialize destination memory pointer
BACK: MOV A, M ; Get byte from source memory block
STAX D ; Store byte in the destination memory block
INX H ; Increment source memory pointer
DCX D ; Decrement destination memory pointer
DCR C ; Decrement counter
JNZ BACK ; If counter 0 repeat
HLT ; Terminate program execution
Comments
Post a Comment