Experiment 2 — Stack Operations & Flag Testing
This folder contains programs that demonstrate stack push/pop operations and a multi-add sequence to observe the carry flag.
Programs:
T1E2P1.asm— Load values into R0–R4 and push them onto the stack.T1E2P2.asm— SetSP = 0DH, write values to memory locations08H–0DH, thenPOPinto R0–R4.T1E2P3.asm— Push R0–R4 onto the stack and then pop them back to the same registers.T1E2P4.asm— Add sequence92H, 23H, 66H, 87H, F5Hinto A and useJNC/INC R7to count carry occurrences.
Usage:
- Assemble and single-step each program in the simulator.
- Inspect the stack region,
SP, and registers after each instruction.