[Coco] Pop PC with empty stack?

Gene Heskett gene.heskett at verizon.net
Tue Apr 6 21:53:19 EDT 2010


On Tuesday 06 April 2010, Lothan wrote:
>From: "Gene Heskett" <gene.heskett at verizon.net>
>Sent: Tuesday, April 06, 2010 10:37 AM
>To: "CoCoList for Color Computer Enthusiasts" <coco at maltedmedia.com>
>Subject: Re: [Coco] Pop PC with empty stack?
>
>> No, that is the shorthand way to do an RTS, saving an instruction fetch
>> cycle in the process.  The stack, in general, is never 'empty' and the
>> last
>> 2 bytes that will fetch to the pc are the return address that it got
>> there from.
>
>I knew about PULS PC being basically the same as an RTS, but it had me
>confused because I couldn't find a BSR or LBSR in the chain leading to
> that label. I finally found an LBSR in the chain this morning after I got
> some sleep last night. It's just not such a straight-forward LBSR ->
> label, blah blah, RTS. It's more like LBSR -> label, branch and
> conditional branch several times, and the RTS is in a conditional branch
> at the end of the module.

Wow.  That code is likely to never be fully understood by anyone but the 
author, and if 90 days has expired since he wrote it, all bets are off.

-- 
Cheers, Gene
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)

Walk softly and carry a big stick.
		-- Theodore Roosevelt



More information about the Coco mailing list