Exchange The Contents of Memory Locations
Exchange The Contents of Memory Locations
Exchange The Contents of Memory Locations
LDA 2000H : Get the contents of memory location 2000H into accumulator
OR
MOV B, M : Get the contents of memory location 2000H into B register.
LDAX D : Get the contents of memory location 4000H into A register.
MOV M, A : Store the contents of A register into memory location 2000H.
STAX D : Store the contents of A register into memory location 4000H.
OR
RST Restart
Multiply two 8-bit numbers stored in memory locations 2200H and 2201H
LDA 2200H
MOV E, A
LDA 2201H
LX I H, 0000 H : Result = 0
Or
MVI D,00
MVI A,00
LXI H,4150
MOV B,M
INX H
MOV C,M
ADD B
JNC Next
INR D
DCR C
JNZ Loop
STA 4152
MOV A,D
STA 4153
RST
Write a program to shift an eight bit data four bits right. Assume data is in register C
MOV A, C
RAR
RAR
RAR
RAR
MOV C, A
HLT
OR
MOV A, B
RAR
MOV B, A
MOV A, C
RAR
MOV C, A
HLT