Subject: Re: [stella] Stack pointer. Some questions From: Christian Bogey <khryssun@xxxxxxxx> Date: Sun, 9 May 2004 14:23:41 +0200 (CEST) |
Hi, The Stack is an internal 8 bits register of the 6502 CPU. It works countdown. > Where is it ? > at the end of the 128 bytes of ram ? well everywhere you want but indeed in VCS programs it is better to located at address #$FF (the end of ram) using the commands : LDX #$FF TXS > If so can you address it like a normal > variable ? not really, "Playing" with stack is related to special operations. Some commands are related to Stack operations : PHA : Push accumulator on stack PLA : Pull accumulator from stack TSX : Transfer Stack pointer to index X TXS : Transfer index X to Stack pointer. it's modified by operations like JSR (return address is pushed) and RTS (return address is pulled)too. Take care Chris. Yahoo! Mail - Votre e-mail personnel et gratuit qui vous suit partout ! Créez votre adresse sur http://mail.yahoo.fr ---------------------------------------------------------------------------------------------- Archives (includes files) at http://www.biglist.com/lists/stella/archives/ Unsub & more at http://www.biglist.com/lists/stella/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [stella] Stack pointer. Some qu, Christopher Tumber | Thread | [stella] The Dig?, KirkIsrael |
Re: [stella] Stack pointer. Some qu, Thomas Mathys | Date | Re: [stella] Stack pointer. Some qu, Kroko |
Month |