Re: [stella] New jumptable implementation.

Subject: Re: [stella] New jumptable implementation.
From: Thomas Jentzsch <tjentzsch@xxxxxx>
Date: Fri, 3 Jan 2003 11:26:51 +0100
Rob Mundschau wrote::
> This is my first post, so let me start by introducing myself.  My name is
> Rob Mundschau.  I never programmed for the 2600 before, but I do have
> considerable experience programming the Commodore 64.  Lately I have grown
> interested in the 2600 Homebrew scene, and I hope to make some games.

Welcome Rob!


> I have been browsing the archives, and I haven't found any mention of
> technique I know of for implementing a jump table.  Excuse me is this was
> mentioned before, and I missed it.  The smallest implementation I saw on the
> list so far is:

> snip

> Using the PHA instructions saves 2 bytes of ROM.  The RTS takes one more
> clock cycle than the indirect JMP instruction so the routine takes one clock
> more overall.  

The little advantage of the JMP() version is, that it doesn't need extra stack RAM. Instead you can re(!)use two other currently  unused bytes (e.g. a pointer). And too little RAM is always a problem. :-)

Have?fun!
Thomas
_______________________________________________________
Thomas?Jentzsch?????????|?***?Every?bit?is?sacred?!?***
tjentzsch?at?web?dot?de?|



























______________________________________________________________________________
PREMIERE: Der Countdown laeuft! 3 Monate gratis + d-box 1 ab 1 Euro
nur noch wenige Tage zu haben! http://premiere.web.de/?mc=999927&lp=2

----------------------------------------------------------------------------------------------
Archives (includes files) at http://www.biglist.com/lists/stella/archives/
Unsub & more at http://www.biglist.com/lists/stella/


Current Thread