English

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

Advertisements
Advertisements

Question

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

Answer in Brief
Advertisements

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
shaalaa.com
  Is there an error in this question or solution?
2014-2015 (March)

APPEARS IN

Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×