[Slackers] New slangb1.20 up

Jaymz Julian jaymz at artificial-stupidity.net
Tue May 30 18:52:37 CDT 2006


On Tue, May 30, 2006 at 01:27:38PM -0600, Steve Judd wrote:
> 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 :).

I agree - although, didn't it at one point detect the case where the final
element size is <256 (as in screen :)), and instead of doing a 16bit add, just
doing sta (zp),y?  In a lot of very common cases that'd be a LOT faster :). 
I forget if array code gen is in slangdef of in the compiler, and i'm not at 
home right now to check - but i thought i'd mention this before i forget

will try the new core when i get home.  thanks!

	--jj

-- 
--
Jaymz Julian - Coder, Visionary, Fat Ass.
"Hannibal is a serial killer. He only likes to kill and eat people. 
 Very few people have `I want to be killed and eaten' on their cards, 
 so Hannibal is out of a job." - http://cards.sf.net


More information about the Slackers mailing list