KS57C2308/P2308/C2316/P2316 ADDRESS SPACES2-13PUSH OPERATIONSThree kinds of push operations reference the stack pointer (SP) to write data from the source register to thestack: PUSH instructions, CALL instructions, and interrupts. In each case, the SP is decreased by a numberdetermined by the type of push operation and then points to the next available stack location.PUSH InstructionsA PUSH instruction references the SP to write two 4-bit data nibbles to the stack. Two 4-bit stack addresses arereferenced by the stack pointer: one for the upper register value and another for the lower register. After thePUSH has executed, the SP is decreased by two and points to the next available stack location.CALL InstructionsWhen a subroutine call is issued, the CALL instruction references the SP to write the PC's contents to six 4-bitstack locations. Current values for the enable memory bank (EMB) flag and the enable register bank (ERB) flagare also pushed to the stack. Since six 4-bit stack locations are used per CALL, you may nest subroutine calls upto the number of levels permitted in the stack.Interrupt RoutinesAn interrupt routine references the SP to push the contents of the PC and the program status word (PSW) to thestack. Six 4-bit stack locations are used to store this data. After the interrupt has executed, the SP is decreasedby six and points to the next available stack location. During an interrupt sequence, subroutines may be nestedup to the number of levels which are permitted in the stack area.SP - 2SP - 1SPLOWERUPPERPUSH(After PUSH, SP SP - 2)SP - 6SP - 5SP - 4SP - 3SP - 2SP - 1SPCALL(After CALL, SP SP - 6)0 0PC3 - PC0PC7 - PC40 0 EMB ERB0 0 0 0PC11- PC8INTERRUP(When INT is acknowledged,SP SP - 6)SP - 6SP - 5SP - 4SP - 3SP - 2SP - 1SP0 0PC3 - PC0PC7 - PC4IS1 IS0 EMB ERBPSWC SC2 SC1 SC0PC11 - PC8PSWPC13 PC12 PC13 PC12NOTE: PC13 is used for KS57C2316/P2316 microcontrollerFigure 2-7. Push-Type Stack Operations