Advertisements
Advertisements
Question
Write an Assembly Language Program to fill in the memory locations starting from 6900H an onward with the decimal numbers 0 to 99.
Solution
Label | Mnemonics | Comment |
START;
BACK:
|
LXI H, 6900 H MVI B, 64 H SUB A MOV M, A ADI 01H DAA INX H DCR B JNZ BACK RST 1.0 |
; Load HL pair with 6900H ; Store memory block count in B ; Clear accumulator ; Move accumulator to memory ; Add 01 to an accumulator ; Decimal adjust accumulator ; Increment HL memory pointer ; Decrement counter by one ; Jump, if no zero to BACK ; Restart |
shaalaa.com
Instruction Set and Programming of 8085
Is there an error in this question or solution?