Advertisements
Advertisements
प्रश्न
Write a Assembly Language Program to copy a block of data having starting address 4500 H to new location starting from 4600 H. The length of block is stored at memory location 44FF H.
Advertisements
उत्तर
| Label | Mnemonics | Comments |
| LXI H, 44FFH | ; Load HL pair with 44FFH | |
| LXI D, 4600H | ; starting address of destination | |
| MOV C, M | ; Move count in Reg. C | |
| INX H | ; Increment HL Pair | |
| LOOP : | MOV A, M | ; Transfer memory to Acc. |
| STAX D | ; Store Acc. to new location | |
| INX H | ; Increment HL pair | |
| INX D | ; Increment DE pair | |
| DCR C | ; Decrement count | |
| JNZ LOOP | ; Jump to LOOP if count is not zero | |
| RST 1.0 | ; Restart |
shaalaa.com
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
