[Slackers] New slangb1.20 up
Steve Judd
sjudd at ffd2.com
Tue May 30 14:27:38 CDT 2006
Hey Jaymz,
> Hrm, sadly I can't get this to output validly linked code - the jsr into no
> mans land still appears at the multiply point :(. But I find myself wondering
> if I need a new version of core.l
Ah, sorry, should have included that. Try this one:
http://www.ffd2.com/fridge/slang/coretest.zip
I just recompiled CORE.I.S and used that. There's also a stupid demo
program in there to make sure it's not doing JSR 0000 anymore.
> As an aside, I draw note to the following output - is this right?
>
> :0000 01 02 04 08 ubyte faceBitsMapping(4)={1 2 4 8]
> :0000 0e 0d 0b 07 ubyte ifaceBitsMapping(4)={14 13 11 7]
Yeah, no problem. The compiler is outputting numbers directly into the
variable space, then resets the counter. I think I can fix it so that the
printed output looks better.
> Btw, are you aware that code has gotten bigger - I assume this is a feature,
> but I mention it in case it was not intended. Having to rebranch everything :)
Shouldn't be, except for things which failed earlier (like the array bugs
you found -- that should generate more code now).
> It's a lot of code, though, for:
>
> :21bc ae 9a 34 bd
> :21c0 e1 29 85 02
> :21c4 bd fb 29 85
> :21c8 03 ad 99 34
> :21cc 18 65 02 85
> :21d0 02 90 02 e6
> :21d4 03 ad 9b 34
> :21d8 a0 00 91 02 screen(y,x)=v
This looks OK. The above code is
ldx $349a ;y
lda $29e1,x ;table lo
sta $02
lda $29fb,x ;table hi
sta $03
lda $3499 ;x
clc
adc $02
sta $02
bcc +2
inc $03
lda $349b ;v
ldy #00
sta ($02),y
which is correct. Note that array statements like this will recompute the
address every time. To get around this, to make code more efficient, the
options are pointers and asm.
Personally, I think the above is really nice 2D array code :).
Whew! No new bugs (yet).
cu,
-S
More information about the Slackers
mailing list