<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Tue, 21 Mar 2006 00:21:42 +0000
From   : jgh@... (Jonathan Graham Harston)
Subject: Re: TSX/TXS (Was: 1MHZ SCSI/ATA board)

>Message-ID: <4419271B.2040600@...>
 
Fragula <fragula@...> wrote:
> SCP     PHP                  ; We need to preserve regs.
>    PHA                  ; as we pass the codes on
>    TXA                  ; if we don't have a use
>    PHA                  ; for them ourselves.
>    TYA                  ; Watch the pointer.
>    PHA                  ; SP=+4
>    TSX                  ; Transfer Stack pointer into X?
>    LDA &103,X           ; WTF, exactly, is at &103? Its
>                              ; the stack, but? Ahhh...
 
&100-&1FF holds the stack. If you pass S to X, then &100+a,X
points to the a-th most recent item pushed onto the stack. So, in
the above case, &103,X points to the 3rd item on the stack, the A
register pushed at the line after SCP.
 
-- 
J.G.Harston - jgh@...                - mdfs.net/User/JGH
BBC IDE Hard Drive Interface - http://mdfs.net/Info/Comp/BBC/IDE
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>