Write a program that will store the contents of an accumulator and flag register at locations 2000H and 2001H.

Write a program that will store the contents of an accumulator and flag register at locations 2000H and 2001H.



By making use of the Push & Pop instructions the program can be written as:

- LXISP, 4000H - this step initiates the SP at 4000h.

-PUSH PSW - the contents of the accumulator and flag are pushed into the stack.

- POP B

- MOV A, B

- STA 2000H

- MOV A, C

- STA 2001H

- HLT
Post your comment