Embed presentation
Download to read offline






When a PUSH instruction is executed, the stack pointer (SP) is decremented by 1, and the value of the register specified is written to the memory location pointed to by SP. SP is then decremented by another 1. This example shows the value in H (2F33) being pushed onto the stack, with SP decreasing from 0009 to 0007. A POP instruction pops a value from the stack back into the specified register. This example pops the value 2F back into register B. A subroutine is a segment of code that can be called multiple times from different parts of a program. When a CALL instruction is executed, the return address is pushed onto the stack, and program control




