Write ALP to store data BCH in 20 contiguous memory locations starting from 8081 H. - Computer Science 2

Advertisement Remove all ads
Advertisement Remove all ads
Advertisement Remove all ads
Answer in Brief

Write ALP to store data BCH in 20 contiguous memory locations starting from 8081 H.

Advertisement Remove all ads

Solution

Mnemonics Comment
Opcode Operand
                  LXI H, 8081 ; Store 8081 in HL Pair.
                  MVI C, 14 H ; Store count in C Register
                  MVI A, BCH ; Store BCH in Accumulator
     BACK :  MOV M, A ; Copy Acc content to memory.
                 INX H ; Increment HL pair by 1.
                 DCR C ; Decrement C Reg by 1.
                 JNZ : BACK ; If C ? 0 then go to BACK
                 RST 1.0 ; Restart
Concept: Instruction Set and Programming of 8085
  Is there an error in this question or solution?
2014-2015 (March)

APPEARS IN

Share
Notifications

View all notifications


      Forgot password?
View in app×