Skip to content

Instantly share code, notes, and snippets.

View gnacu's full-sized avatar

Gregory Naçu gnacu

View GitHub Profile
menucmd ;X -> Menu Command Code
.block
txa
#switch 8
.text "khls!ewf"
.rta a_killmus,a_hidemus
.rta a_loadmus,a_showmus
.rta quitapp
.rta a_raise
.rta a_togwrap,a_togfoot
menuenq ;X -> Menu Command Code
.block
txa
#switch 2
.text "wf"
.rta a_wrapchk,a_footchk
;Current Tab
cmp #"4"
bcs done ;>"3"
msgcmd ;A -> Message Code
.block
#switch 6
.byte mc_menq,mc_mnu,mc_stptr
.byte mc_col,mc_rflg,mc_theme
.rta menuenq,menucmd,statptr
.rta colorset,rflags,cthem
sec ;Message Not Supported
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_