4 BYTE ADDITION IN 8085

WRITE THIS IN THE WRITING SIDE OF THE JOURNAL

ADDRESSOPCODELABELMNEMONICSCOMMENT
4000AFXRA A;reset carry flag
400106 04MVI B,04H;set counter in reg. B
400321 40 40LXI H, 4040H;set memory pointer in HL
400611 50 40LXI D,4050H;set memory pointer in DE
40091AUP:LDAX D;load Acc. with data from address of DE
400A8EADC M;add it with data from memory pointed by HL
400B77MOV M,A;store the result
400C13INX D;Increment address in DE
400D23INX H;increment address in HL
400E05DCR B;decrement B
400FC2 09 04JNZ UP;jump if not zero to up
401276HLT;stop

Result

) 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

Scroll to Top