Re: [stella] PPC Mac Dev Kit... It's alive, HE'S ALIVE!!!!

Subject: Re: [stella] PPC Mac Dev Kit... It's alive, HE'S ALIVE!!!!
From: Piero Cavina <p.cavina@xxxxxxxxxxxxx>
Date: Mon, 05 Jan 1998 18:17:48 +0100
At 16.54 04/01/98 -0500, Ruffin Bailey wrote:

>>Are you sure that RASM doesn't support the "<" and ">" operators?
>
>'Fraid so.  I tried just removing the "#"'s and RASM pointed to each of 
>the "<"'s and ">"'s on a seperate line and said "Guess again."  I'm still 
>not exacly sure what the #< and #> meant in Combat, but I could send the 
>RASM manual to you if you're interested.  It's pretty short.

Please send me that manual. If you lived here, I would bet a big "pizza
quattro stagioni" that those operators do exist in Rasm. :-)

You need to understand what they mean before starting any serious project.

Suppose you want to store into two RAM locations, let's say DATA and
DATA+1, the starting address of the ROM table where the shapes of your
sprites are stored:

TABLE: .BYTE %01111110
       .BYTE %11111111
       .BYTE %11011011
(...)

You're doing this because you want to read data from that table using
indirect indexed addressing, ie LDA(DATA),Y.

When you're writing the code, you don't know what will be the 16-bit
address that the compiler will give to the symbol "TABLE", but you have to
know that number because you need to do something like...

 LDA #the high portion of the number TABLE (bits 15-8)
 STA DATA+1
 LDA #the low portion of the number TABLE (bits 7-0)
 STA DATA

The symbols ">" and "<" have this purpose: they take the high (or low)
portion of a 16-bit value, so in DASM you would write:

 LDA #>TABLE
 STA DATA+1
 LDA #<TABLE
 STA DATA

Now, you can change the code before "TABLE", and the compiler may give to
this symbol another value, but you don't have to worry about it - you don't
even need to know it - because you're sure that the two LDA's #.. above
will always get the correct values.

I hope I've been clear enough...

P.







--
Stella list is Administered by krishna@xxxxxxxxxxxx <Glenn Saunders>
Archives (includes files) at http://www.biglist.com/lists/stella/archives/
Unsub & more at http://www.biglist.com/lists/stella/stella.html
+-shameless plugs-------------------------------------------------------+
| Stella documentary at http://www.primenet.com/~krishna                |
| Nick's VCS links via http://www.primenet.com/~nickb/atariprg.htm      |
| Write the best game, win framed autographs of famous Atari alumni!!   |
+-----------------------------------------------------------------------+

Current Thread