A83: why doesn't this code work?


[Prev][Next][Index][Thread]

A83: why doesn't this code work?



Can someone please tell me why this code doesn't work?  BTW, it's for 83+ ION

.nolist
        #include "ion.inc"     
        #include "extra.inc"
.list                  

#ifdef TI83P               
        .org    progstart-2
        .db     $BB,6D
#else
        .org    progstart
#endif
        xor a
        jr      nc,Start
        .db     "Game Name",0   
y = SAFERAM1
x = SAFERAM1+1
Start:
 bcall(_indicatorOff)
 xor a
 ld (x),a
 ld (y),a
GetAKey:
 bcall(_getcsc)
 cp GDown
 jp z,DownK
 cp GLeft
 jp z,LeftK
 cp GRight
 jp z,Rightk
 cp GUp
 jp z,UpK
 cp GClear
 ret z
 jp GetAKey
DownK:
 ld a,(y)
 cp 48
 jp z,GetAKey
 ld b,8
 sub b
 ld (y),a
 jp DrawCursor
LeftK:
 ld a,(x)
 cp 0
 jp z,GetAKey
 ld b,8
 sub b
 ld (x),a
 jp DrawCursor
RightK:
 ld a,(x)
 cp 48
 jp z,GetAKey
 add a,8
 ld (x),a
 jp DrawCursor
UpK:
 ld a,(y)
 cp 0
 jp z,GetAKey
 add a,8
 ld (y),a
 jp DrawCursor
DrawCursor:
 ld b,8
 ld a,(y)
 ld l,a
 ld a,(x)
 ld ix,Cursor
 call ionPutSprite
 call ionFastCopy
 jp GetAKey

 ret
Cursor:
 .db %11111111
 .db %11111111
 .db %11111111
 .db %11111111
 .db %11111111
 .db %11111111
 .db %11111111
 .db %11111111
.end
End



Do You Yahoo!?
- Get personalized email addresses from Yahoo! Mail Personal Address - only $35 a year!