WRITE THIS IN THE WRITING SIDE OF THE JOURNAL
ADDRESS | OPCODE | LABEL | MNEMONICS | COMMENT |
---|---|---|---|---|
4000 | 21 20 40 | LXI H,4020H | ;Memory Pointer | |
4003 | 7E | MOV A,M | ;Data in accumulator | |
4004 | 23 | INX H | ;Increment memory pointer | |
4005 | 96 | SUB B | ;Subtract contents of B from Accumulator | |
4006 | F2 0C CO | JP AHEAD | ;jump to ahead | |
4009 | 7E | MOV A,M | ;move content of Mem. to Acc. | |
400A | 2B | DCX H | ;decrement HL pair | |
400B | 96 | SUB M | ;subtract A – M | |
400C | 32 00 C2 | AHEAD: | STA 4022H | ;store |
400F | 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