DIVISION OUTPUT

WRITE THIS IN THE WRITING SIDE OF THE JOURNAL

ADDRESSOPCODELABELMNEMONICSCOMMENT
400021 60 40LXI H,4060H;set memory pointer
40037EMOV A,M;move data to Acc.
400423INX H;increment memory address
400546MOV B,Mmove data to reg. B
40060E 00MVI C,00H;set counter C=0
400890loop:SUB B;subtract data of B from A
40090CINR C;increment counter
400AB8CMP B;compare with B
400BD2 08 40JNC loop;jump if not finish to loop
400E23 INX H;increment memory pointer
400F71MOV M,C;Store C in memory
401023INX H;Increment memory pointer
401177MOV M,A;store result in memory
401276hlt;Entering 8085 in the HALT state

Stick this printout on the left side (i.e in the blank side)

) Sign Flag is reset: Result is positive
) Zero flag is set: result is set to zero after the execution of arithmetic or logical operation
) auxiliary carry flag is set: there is a carry from bit D3 to D4
) parity flag is set: result stored in accumulator contain even number of 1’s
) carry flag is result: no carry or borrow bit during the execution of arithmetic operation

WRITE THIS IN THE BLANK SIDE OF THE JOURNAL

I hope you like my work please share with your friends with the options given below and If you have a problem comment below
Scroll to Top