Advertisements
Advertisements
प्रश्न
A series of 1-bute hexadecimal data is stored at memory locations from D600 H to D60A H. Write an assembly language program to replace each odd number in the series with data 00H.
लघु उत्तरीय
Advertisements
उत्तर
| Label | Mnemonics code | Comments |
| MVI B, OBH | ; Move OB into reg. B | |
| LXI H, D600H | ; Load D600 H in HL pair | |
| Repeat | MOV A, M | ; copy mem. into A |
| RAR / RRC | ; Rotate A right 1-bit | |
| JNC NEXT | ; Jump if not cry | |
| NEXT: | INX H | ; Increment HL by 1 |
| DCR B | ; decrement B by 1 | |
| JNZ Repeat | ; Jump on no zero | |
| HLT | ; Halt the process |
shaalaa.com
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
