WRITE THIS IN THE WRITING SIDE OF THE JOURNAL
ADDRESS | OPCODE | LABEL | MNEMONICS | COMMENT |
---|---|---|---|---|
4000 | 21 50 40 | LXI H,4050H | ;set memory pointer | |
4003 | 46 | MOV B,M | ;move data from to B | |
4004 | 3E | MVI A,00 | ;set counter A to 0 | |
4005 | 4F | MOV C,A | ;move Acc. to C | |
4006 | 23 | INX H | ;increment memory address | |
4007 | 86 | cont: | ADD M | ;Addition of Acc. and M |
4008 | D2 | JNC skip | ;jump if not carry to skip | |
4009 | 0C | INR C | ;content of Reg. C Inc. by 1 | |
400A | 05 | skip: | DCR B | ;decrement counter B |
400B | C2 | JNZ cont | ;jump if not carry zero to cont | |
400C | 32 | STA 4052H | ;content of Acc. copied to Memory location | |
400D | 79 | MOV A,C | ;take data in Acc. | |
400E | 32 | STA 4053H | ;content of Acc. copied to Memory location | |
400F | 76 | hlt | ;Entering 8085 in the HALT state |


) 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