<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Sun, 17 Oct 2004 11:40:39 +0100 (BST)
From   : Andrew Benham <adsb@...>
Subject: Re: RTS

On Sat, 16 Oct 2004, Angus Duggan wrote:

> RTS returns to the location set up by JSR on the stack.

To be overly precise, RTS pops 2 bytes from the stack,
concatenates them to form a 16-bit address, increments
the address and sets the program counter to that address.

Normally one does an RTS to return from a sub-routine
called by a JSR (which sets the return address on the
stack for you). However one could seed the stack
with a different address.

-- 
Andrew Benham     adsb@...       
Southgate, London N14, United Kingdom

The gates in my computer are AND OR and NOT, not "Bill".
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>