Advertisements
Advertisements
Question
A two-byte number is stored at location C000 H and C001 H. Write on Assembly Language Program to rotate this number to the left side by 3 places and store the rotated number in the BC register pair.
Answer in Brief
Advertisements
Solution
| Label | Mnemonics + Operand | Comment |
| LHLD C000 | ; Load HL pair from C000 memory location | |
| DAD H | ; Add register pair to HL pair | |
| DAD H | ; Add register pair to HL pair | |
| DAD H | ; Add register pair to HL pair | |
| SHLD BC | ; Store HL pair to BC register pair | |
| RST 1.0 | ; Restart |
shaalaa.com
Is there an error in this question or solution?
