Skip to content

Instantly share code, notes, and snippets.

View gnacu's full-sized avatar

Gregory Naçu gnacu

View GitHub Profile
prockcmd
.block
jsr readkcmd
cpy #cbmkey
bne pkdone
cmp #"+"
bne not_pl
inc vic+$20
drawmain #ldxy tkenv
jsr tkupdate
ldy tkenv+te_posy
ldx tkenv+te_posx
jmp ctx2scr
procmous #ldxy tkenv
jsr tkmouse
jmp chkdirt
frefptr = $fd;$fe
ptr = $fd;$fe
willquit ;Final clean up.
.block
;Write Config File
#ldxy cnffile
jsr cnfappfref
lda #ff_w.ff_o
;----[ Content ]------------------------
cnffile .null "config.i"
uitest_s #strxyget
.null "UI Tests"
.null "Options"
.null "1 of 2"
.null "2 of 2"
;----[ Exports ]------------------------
.word init ;App Initializer
.word msgcmd ;Msg Command
.word willquit ;App Will Quit
.word raw_rts ;Freeze to REU
.word raw_rts ;Thaw from REU
;----[ State ]--------------------------
;----[ main.a - TestGround ]------------
.include "//os/h/:modules.h"
#inc_s "app"
#inc_s "exceptions"
#inc_s "io"
#inc_s "pointer"
#inc_s "switch"
;Path.lib
setname jmp 3
pathadd jmp 6
gopath jmp 18
iextern
#inc_h "memory"
pgalloc #syscall lmem,pgalloc_
lmargin ;Configure offleft/offrght = 1
;this -> tkview
#setobj8 this,offleft,1
#setobj8 this,offrght,1
rts
;Load a Class from the App Bundle
ldlclass ;A -> Class Index
;RegPtr -> SuperClass Ptr
;Set default selected tab
#storeget views,3 ;tktabs
jsr ptrthis
ldy #seltab_
jsr getmethod
lda seltab ;From config state
jsr sysjmp
1000 rem
1010 rem --- program data -----
1020 rem
1030 rem keywords
1040 rem
1050 data"can you","can i","you are","youre","i dont","i feel"
1060 data"why dont you","why cant i","are you","i cant","i am","im "
1070 data"you ","i want","what","how","who","where","when",why"
1080 data"name","cause","sorry","dream","hello","hi ","maybe"
1090 data" no","your","always","think","alike","yes","friend"