WRITE THIS IN THE WRITING SIDE OF THE JOURNAL
ADDRESS | OPCODE | LABEL | MNEMONICS | COMMENT |
---|---|---|---|---|
4000 | 21 60 40 | LXI H,4060H | ;set memory pointer | |
4003 | 7E | MOV A,M | ;move data to Acc. | |
4004 | 23 | INX H | ;increment memory address | |
4005 | 46 | MOV B,M | move data to reg. B | |
4006 | 0E 00 | MVI C,00H | ;set counter C=0 | |
4008 | 90 | loop: | SUB B | ;subtract data of B from A |
4009 | 0C | INR C | ;increment counter | |
400A | B8 | CMP B | ;compare with B | |
400B | D2 08 40 | JNC loop | ;jump if not finish to loop | |
400E | 23 | INX H | ;increment memory pointer | |
400F | 71 | MOV M,C | ;Store C in memory | |
4010 | 23 | INX H | ;Increment memory pointer | |
4011 | 77 | MOV M,A | ;store result in memory | |
4012 | 76 | hlt | ;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