Advertisements
Advertisements
Question
Write an Assembly Language Program to copy a block of data stored in memory location from D100H to D10FH in new memory location starting of E100H.
Code Writing
Advertisements
Solution
Label Instructions Comments
MVI B, 10H ; Set B to 10H
LXI H, D100H ; Load HL to D100H
LXI D, E100H ; Load DE to E100H
LOOP MOV A, M ; Move M to A
STAX D ; Store A to DE pair
INX H ; Increament HL by 1
INX D ; Increament DE by 1
DCR B ; Decreament B by 1
JNZ LOOP ; Jump not zero go to Looop
HLT ; Stop shaalaa.com
Is there an error in this question or solution?
