Re: Aw: [stella] BCD to pointer.

Subject: Re: Aw: [stella] BCD to pointer.
From: "Andrew Davie" <atari2600@xxxxxxxxxxxxx>
Date: Fri, 14 May 2004 23:03:17 +1000
...and one can also embed two, three and with a bit of careful overlap 4 or
5 byte tables between the digit definitions, too.


            db %00000000
            db %00000000
            db %00000000
            db %00000000
            db %00000000        ; assume non-zero digit data --- 0's are
just to show some data is here

TableX    db 1,2,3                ; an 'embedded' table, nested between
digits, accessed via TableX label

;Digit2 starts here, at byte 8
            db %00000000
            db %00000000
            db %00000000
            db %00000000
            db %00000000

TableY    db blah, blah, blah

; Digit 3 starts here... etc.

If you have some table which either STARTS with the ending byte(s) of a
digit, or ends with the starting byte(s) of a digit, then you can overlap
them...  eg: if a digit ended with bytes (just for example, $20,$30,$40) and
you had a table which needed $40,$41,$42... then

            db 0,0,$20,$30
TableX    db $40,$41, $42
        db 0            ; unused/waste
Digit2 starts here;

So in short you won't need 30 bytes (in actuality you'd only need 27) using
the suggested method;  the extra needed for the GAPS between the digits,
with the last three bytes being anything you want.  But you could surely use
some of those gaps for smallish tables, too, so the total cost would be 27
bytes at worst, LESS the improvements in the actual x5 code, which would be
replaced by a simple x8 (which for the BCD high byte would be just an AND
and a LSR)


----- Original Message ----- 
From: "Lee Fastenau" <stella@xxxxxxxxxxxxxxx>
To: <stella@xxxxxxxxxxx>
Sent: Friday, May 14, 2004 10:36 PM
Subject: RE: Aw: [stella] BCD to pointer.

> Happy_dude, are you certain you can't spare the 30 bytes to make each
> take up 8 bytes instead of 5?  Do you have any ALIGN 256's that you
> optimized in a while?  Moving (or removing) one of those could easily buy
> you enough elbow room to make indexing your digit data much easier.
> -Lee
> --------------------------------------------------------------------------
> Archives (includes files) at
> Unsub & more at
> __________ NOD32 1.759 (20040513) Information __________
> This message was checked by NOD32 Antivirus System.

Archives (includes files) at
Unsub & more at

Current Thread