8085 Ultimate Simulator Kit All Codes of Examples
8085 Ultimate Simulator Kit All Codes of Examples
1. LHLD 8100H //Load H-L pair with 1st operand from 8100H.
2. XCHG //Exchange H-L pair with D-E pair.
3. LHLD 8102H //Load H-L pair with 2nd operand from 3002H.
4. DAD D //Add D-E pair with H-L pair.
5. SHLD 8104H //Store the result at address 3004H.
6. HLT //Halt.
1.
2. LDA 8100H //Load H-L pair with data from 8100H.
3. ANI 0FH //AND Immediate 0FH with reg. A.
4. STA 8101H //Store the result at memory location 8101H.
5. HLT //Halt.
1. LHLD 8100H //Load H-L pair with 1st operand from 8100H.
2. XCHG //Exchange H-L pair with D-E pair.
3. LHLD 8102H //Load H-L pair with 2nd operand from 8102H.
4. MOV A, E //Move the lower-order of 1st number from reg. E
to reg. A.
5. SUB L //Subtract the lower-order of 2nd number from lower-
order of 1st number.
6. MOV L, A //Move the result from reg. A to register L.
7. MOV A, D //Move the higher-order of 1st number from reg. D
to reg. A.
8. SBB H //Subtract the higher-order of 2nd number from
higher-order of 1st number with borrow from the previous
subtraction.
9. MOV H, A //Move the result from reg. A to reg. H.
10. SHLD 8104H //Store the 16-bit result from H-L pair to
memory.
11. HLT //Halt