SUBTRACTION OUTPUT

WRITE THIS IN THE WRITING SIDE OF THE JOURNAL

ADDRESSOPCODELABELMNEMONICSCOMMENT
400021 20 40LXI H,4020H;Memory Pointer
40037EMOV A,M;Data in accumulator
400423 INX H;Increment memory pointer
400596SUB B;Subtract contents of B from Accumulator
4006F2 0C COJP AHEAD;jump to ahead
40097EMOV A,M;move content of Mem. to Acc.
400A2BDCX H;decrement HL pair
400B96SUB M;subtract A – M
400C32 00 C2AHEAD:STA 4022H;store
400F76HLT;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

DRAW THIS FLOW GRAPH IN THE BLANK SIDE OF THE JOURNAL

Scroll to Top