8085 Programming: Store 8 bit data in Memory
![8085 Programming 8085 Programming](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNJqxG7jvcj0CSjWEVB0Q_IspgxU3r3DpD4F71TFLC5f2g7FwS3F9Q9FmYfvMz1kPP_8gVWO_wc6FfIxtFm_1M4Iz1OmaAzJHb2z9z2SYemNRju98YC_kCXYtIUEJJgYbrklz5zDIIBUE/s1600/8085.jpg)
Program 1:
MVI A, 52H : Store 32H in the accumulator
STA 4000H : Copy accumulator contents at address 4000H
HLT : Terminate program execution
Program 2:
LXI H : Load HL with 4000H
MVI M : Store 32H in memory location pointed by HL register pair (4000H)
HLT : Terminate program execution
Note: The result of both programs will be the same. In program 1 direct addressing instruction is used, whereas in program 2 indirect addressing instruction is used.
Comments
Post a Comment