Open main menu

CDOT Wiki β

Changes

6502 Instructions - Introduction

No change in size, 00:54, 11 September 2023
Push/Pull on the Stack
==== Push/Pull on the Stack ====
When a value is pushed to the stack, the stack pointer register (SP) is decremented and the selected register is written to memory location $0100+SPand the stack pointer register (SP) is decremented.
When a value is pulled from the stack, the stack pointer register (SP) is incremented and the selected register is loaded from memory location $0100+SP and the stack pointer register (SP) is incremented.
There are two instructions to push data onto the stack: