Write ALP to multiply number stored at 8085H by 09H and store result at 8086H and 8087H, with lower byte at 8086H. - Computer Science 2

Advertisements
Advertisements

Write ALP to multiply number stored at 8085H by 09H and store result at 8086H and 8087H, with lower byte at 8086H.

Advertisements

Solution

Mnemonics Comment
Opcode Operand
MVI A, 00 ; Store 00 to Acc
MOV D, A ; Store 00 to D Reg
   LXI H, 8085 ; Reg 8085 in HL pair
MOV B, M ; store content of Memory to B Reg
MVI C, 09 ; Store count in C Register
BACK: ADD B ; Addition of B reg with Acc.
           JNC : NEXT ; Increment D Reg. by 1
           INR D ; Decrement counter by 1
NEXT : DCR C ; Decrement counter by 1
          JNZ : BACK ; Jump C ? 0; go to Back
          INX H ; Increment HL pair by 1
          MOV M, A ; Result stored from Acc. to memory
          INX H ; Increment HL pair by 1
          MOV M, D ; Store D reg to memory
          RST 1.0 ; Restart.
Concept: Introduction to Microprocessors and Organization of 8085
  Is there an error in this question or solution?
2014-2015 (March)

APPEARS IN

Share
Notifications



      Forgot password?
Use app×