include "doorsos.h" ; general ROM calls include "graphlib.h" ; clr_scr function include "userlib.h" ; idle_loop xdef _main ; define program entry point xdef _comment ; define program comment xdef _ti89 ; compile for TI-89 xdef _exit ; delay: move.w #0,d0 delay_repeat: add.w #1,d0 cmp delay_len,d0 bne delay_repeat bra continue _main: loop: tst.w (doorsos::kb_vars+$1C) ; check if a key was pressed beq delay ; no key was pressed. repeat move.w (doorsos::kb_vars+$1E),d0 ; key was pressed. store in d0 clr.w (doorsos::kb_vars+$1c) ; clear key flag cmp.w #264,d0 ; check if ESC was pressed bne loop ; ESC key was not pressed bra _exit ; goto exit continue: scroll_screen: lea LCD_MEM,a0 lea LCD_MEM+2,a1 move.w #1500,d0 scroll_loop: move.w (a1)+,(a0)+ dbra d0,scroll_loop bra loop _exit rts ; end of program ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; variable declaration section myStr dc.b "Hello, Ass!",0 _comment dc.b "Hello, Ass!",0 ; program comment delay_len dc.w 25000 end ; end of the source code