esop

Essential Stack-Operated Phone (concept)
git clone git://git.luxferre.top/esop.git
Log | Files | Refs | README | LICENSE

moveme.tal (1215B)


      1 ( test program to verify the correctness of graphics and input on ESOP )
      2 
      3 ~esop-lib-macro.tal
      4 
      5 |0100
      6   ;on-frame SETSCRVEC
      7   #1a #20 ( mv-x mv-y )
      8 BRK
      9 
     10 @on-frame
     11   ( drawing static strings should always end with POP2 )
     12   #00 #0c ;longtxt ;draw-long-str JSR2 POP2
     13   DATETIME-COMPAT ( get datetime info into #00c0 )
     14   #04 #04 ( year-x year-y -- )
     15   .DateTime/year LDZ2 ( year-x year-y year* -- )
     16   ;print-dec JSR2 ( mv-x mv-y year-x year-y -- )
     17   LIT '. ;putc JSR2
     18   .DateTime/month LDZ
     19   ;print-dec2-byte JSR2
     20   LIT '. ;putc JSR2
     21   .DateTime/day LDZ
     22   ;print-dec2-byte JSR2
     23   LIT 20 ;putc JSR2
     24   .DateTime/hour LDZ
     25   ;print-dec2-byte JSR2
     26   LIT ': ;putc JSR2
     27   .DateTime/minute LDZ
     28   ;print-dec2-byte JSR2
     29   LIT ': ;putc JSR2
     30   .DateTime/second LDZ
     31   ;print-dec2-byte JSR2
     32   POP2 ( mv-x mv-y -- )
     33   ;moveme ;draw-str JSR2
     34   #02 #2b ;addr ;draw-str JSR2 POP2
     35   SWP #20 SUB SWP ( restore x coord between frames )
     36   ;&adv KP-A JMPKEY 
     37   ;&back KP-B JMPKEY 
     38   BRK
     39   &adv
     40     SWP INC DBGBYTE SWP
     41   BRK
     42   &back
     43     SWP DEC DBGBYTE SWP
     44   BRK
     45 
     46 @moveme "MOVE 20 "ME! 00
     47 
     48 @addr "SR.HT/~LUXFERRE/ESOP 00
     49 
     50 @longtxt "HELLO 20 "FROM 20 "ESOP, 20 "NEW 20 "PHONE 20 "RUNTIME 00
     51 
     52 ( include ESOP stdlib routines )
     53 
     54 ~esop-lib-subs.tal