Re: [stella] DASM 'upgrade' in progress

Subject: Re: [stella] DASM 'upgrade' in progress
From: Christopher Tumber <christophertumber@xxxxxxxxxx>
Date: Fri, 21 Mar 2003 12:01:10 -0500
>Maybe another idea was to have mode switches. For 
>example I wouldn't like to have DASM add nibbles with 
>"|" as Christopher thought of. 

Well, my point was that using the BITS define creates a data object of arbitrary bitsize and so any operations using that data should treat them as being that size. 
[Perhaps with the ability to over-ride and treat them as a full byte - So we can select whether to pack them into memory* (ie: to minimise ROM usage) or use a full byte per data (ie: If we're putting them in to RAM and want to be able to access them quickly without bitshifting)]

So given

Up    BITS  1000
Down  BITS  0100

Up|Down = 1100
Down+Down = 1000
Up+Up= 0000

But when you're NOT using BITS, all operations would remain as before so:

Up_h EQU #128
Down_h EQU #64
Left_h EQU #32
Right_h EQU #16
Up_l EQU #8
Down_l EQU #4
Left_l EQU #2
Right_l EQU #1

Up_h|Down_l = 10001000

(ie: BITS creates an exception, normal operations are unaffected)

So all existing source is unaffected. The only way to get this effect would be to start using BITS.

Which is all moot given that if this kind of thing is implemented it'll likely be as a macro...


>To compile the Gunfight music for example this is exactly required as is, a logical ORing of two bytes.

Existing source would be unaffected because it doesn't use the BITS define, but, the next time something like a music routine is written you could take advantage of the BITS routine.

So something like:

  .byte Note1|Note2,Note3|Note4,Note5|Note6

Would become:

  .bitstring Note1,Note2,Note3,Note4,Note5,Note6

(Which doesn't seem like a huge difference until you start playing with oddball bit sizes)


Chris...



*Actually, this would already exists by default. I've been using BITS and bitstream exclusively together, but they're actually seperate commands. We could achive the packed/unpacked results using .byte or .bitstream:

Up    BITS  1000
Down  BITS  0100

  .bitstring Up,Down,Up,Up,Down,Up

results in: 10000100,10001000,0100100

  .byte Up,Down,Up,Up,Down,Up

results in: 00001000,00000100,00001000,00001000,00000100,00001000

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


Current Thread