WRITE THIS IN THE WRITING SIDE OF THE JOURNAL
ADDRESS | OPCODE | LABEL | MNEMONICS | DESCRIPTION |
---|---|---|---|---|
4000 | 21 00 C1 | LXI H,4000H | ;memory pointer | |
4003 | 3E FF | MVI A,0FFH | ;clear Acc. | |
4005 | 0E 0A | MVI C,0AH | ;set C pointer to 10 | |
4007 | BE | LOOP: | CMP M | ;compare M with A |
4008 | DA 0C C0 | JC AHEAD | ;jump if carry 0 to AHEAD | |
400B | 7E | MOV A,M | ;move content of Mem. to Acc. | |
400C | 23 | AHEAD: | INX H | ;Increment HL pair |
400D | 0D | DCR C | ;decrement C | |
400E | C2 07 C0 | JNZ LOOP | ;jump if not zero to LOOP | |
4011 | 32 00 C2 | STA 4010H | ;store Acc | |
4014 | 76 | HLT | ;8085 in 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