Write an 8085 Assembly language program to interchange 16-bit data stored in memory locations 2050, 2051, 2052, and 2053 without XCHG instruction.
1. LHLD
2050; load HL register with 16-bit address 2050H 2. MOV B H; copy data from H to B register 3. MOV C L; copy data from L to C register 4. LHLD 2052; load HL register with 16-bit address 2052H 5. MOV D H; copy data from H to D register 6. MOV E L; copy data from L to E register 7. LXI H 2050; store 16-bit address in HL register 8. MOV M E; copy data from E to M[HL] register 9. LXI H 2051; store 16-bit address in HL register 10. MOV M D; copy data from D to M[HL] register 11. LXI H 2052; store 16-bit address in HL register 12. MOV M C; copy data from C to M[HL] register 13. LXI H 2053; store 16-bit address in HL register 14. MOV M B; copy data from B to M[HL] register 15. HLT; halt program |
0 Comments