Code: Select all
-First block of code is simple: [1a] include ion and keypress data, as well as [1b] required headers.
-Start of the loop, we have the [2] square thrown onto the screen at 0,0. Whee.
-Then we do a [3a] direct input check to see if MODE was pressed, if so [3b] exit.
-[4] Loop!
-[5] Square's image data. Simple.
.nolist
#include "ion.inc" ; [1a] Included files, duh.
#include "keys.inc"
.list
#ifdef TI83P ; [1b] Headers and such. m00.
.org progstart - 2
.db $BB,$6D
#else
.org progstart
#endif
ret
jr nc, start
.db "Blah",0
start:
xor a ; [2] Load coords for 0,0
ld l,a
ld b,8
ld ix,Square
call ionPutSprite ; And put onto the screen!
call ionFastCopy
ld a,Group7 ; [3a] Check to see if MODE was pressed
out (1),a
in a,(1)
cp kMode
ret z ; [3b] Exit the program upon hitting CLEAR
jp Start ; [4] Jump back to the beginning! AGAIN! AGAINN!
.end
END
; [5] Aaaand here's data. Boring data at that.
Square:
.db $FF, $FF, $FF, $FF
.db $FF, $FF, $FF, $FF