Advertisements
Advertisements
Question
Write an Assembly Language Program to fill the memory locations 4500H to 4504 with the Hexadecimal numbers 09 H to ODH respectively.
Solution
Label | Mnemonics | Comments |
LXI H, 4500 | ; Initialize HL pa ir with starting add ress | |
MVI A, 09H | ; A = 09H | |
MVI B, 05H | ; Count in reg. B | |
UP: | MOV M, A | ; Copy data 09H in 4500 H |
INX H | ; Increment HL pair | |
INR A | ; Increment content in A by 1 | |
DCR B | ; Decrement count | |
JNZ UP | ; Jump to label UP if count in not zero | |
RST 1.0 | ; Restart |
shaalaa.com
Instruction Set and Programming of 8085
Is there an error in this question or solution?