Re: A86: Super fast GridPutSprite
[Prev][Next][Index][Thread]
Re: A86: Super fast GridPutSprite
In a message dated 11/3/98 5:17:40 PM Eastern Standard Time, electrum@tfs.net
writes:
> loaddata:
> ld hl,mapvar-1 ; point to var name (first byte is irrelevant)
> rst 20h ; load name into OP1
> rst 10h ; call _FINDSYM
> ret c ; if it doesn't exist, return
> ld a,b ; copy high byte
> ex de,hl ; swap low bytes
> inc hl ; skip length word
> inc hl ; it is a word, not a byte...
instead of two inc hl's, use this instead:
call $4c3f ;ahl += 2
that way, if there's a carry, it's accounted for in this one call.
if hl=$fffe or $ffff, there will be major problems when it wraps around using
your way.