fixup to assemble.

This commit is contained in:
Kelvin Sherlock 2020-07-21 00:04:30 -04:00
parent ad096c5654
commit 4a2d2155d4
2 changed files with 54 additions and 44 deletions

View File

@ -1,4 +1,3 @@
lst off lst off
rel rel
xc xc
@ -9,6 +8,14 @@
use e16.event use e16.event
use e16.types use e16.types
use e16.control use e16.control
use e16.resources
* lst on
kWindowID equ $1000
kPlayID equ 1
kStopID equ 2
kAboutAlert equ 1
tbx on tbx on
@ -65,21 +72,34 @@ main
adrl 0 adrl 0
dw 0 dw 0
draw_window
pha
pha
_GetPort
_DrawControls
rtl
mainloop mainloop
pha
psl #0 ; result pha ; result
psl #0 psl #0
psl #0 psl #0
psl #draw_window psl #draw_window
psl #0 psl #0
psl #refIsResource psw #refIsResource
psl #kWindowID psl #kWindowID
psw #rWindParam1 psw #rWindParam1
_NewWindow2 _NewWindow2
pll window lda 3,s
sta window+2
lda 1,s
sta window
* pll window
psl window * psl window
_ShowWindow _ShowWindow
_InitCursor _InitCursor
@ -93,13 +113,13 @@ mainloop
:loop :loop
pha pha
psw #-1 psw #-1
psl event psl #event
_TaskMaster _TaskMaster
pla pla
cmp #table_size+1 cmp #:table_size+1
bcs :loop bcs :loop
asl a asl
jsr (:table,x) jsr (:table,x)
lda quit lda quit
beq :loop beq :loop
@ -125,7 +145,7 @@ mainloop
dw :rts ; app 3 dw :rts ; app 3
dw :rts ; app 4 dw :rts ; app 4
dw :rts ; wInDesk dw :rts ; wInDesk
dw :menu ; wInMenuBar dw menu ; wInMenuBar
dw :rts ; wClickCalled dw :rts ; wClickCalled
dw :rts ; wInContent dw :rts ; wInContent
dw :rts ; wInDrag dw :rts ; wInDrag
@ -133,7 +153,7 @@ mainloop
dw bye ; wInGoAway dw bye ; wInGoAway
dw :rts ; wInZoom dw :rts ; wInZoom
dw :rts ; wInInfo dw :rts ; wInInfo
dw :menu ; wInSpecial menu 250-255 dw menu ; wInSpecial menu 250-255
dw :rts ; wInDeskItem menu 1-249 dw :rts ; wInDeskItem menu 1-249
dw :rts ; wInFrame dw :rts ; wInFrame
dw :rts ; wInactMenu dw :rts ; wInactMenu
@ -141,7 +161,7 @@ mainloop
dw :rts ; wCalledSysEdit dw :rts ; wCalledSysEdit
dw :rts ; wTrackZoom dw :rts ; wTrackZoom
dw :rts ; wHitFrame dw :rts ; wHitFrame
dw :control ; wInControl dw control ; wInControl
dw :rts ; wInControlMenu dw :rts ; wInControlMenu
:table_size = {*-:table}/2 :table_size = {*-:table}/2
@ -149,7 +169,7 @@ mainloop
lda _finished lda _finished
beq :rts beq :rts
stz _finished stz _finished
bra stopped brl stopped
bye bye
lda #1 lda #1
@ -164,12 +184,12 @@ menu
cmp #:table_size+1 cmp #:table_size+1
bcs :xmenu bcs :xmenu
asl a asl
tax tax
jsr (:table,x) jsr (:table,x)
:xmenu :xmenu
psw #0 psw #0
psw :event+owmTaskData+2 psw event+owmTaskData+2
_HiliteMenu _HiliteMenu
:rts rts :rts rts
@ -184,7 +204,14 @@ menu
dw about dw about
:table_size = {*-:table}/2 :table_size = {*-:table}/2
about
pha
psw #awResource
psl #0
psl #kAboutAlert
_AlertWindow
pla
rts
control control
lda event+owmTaskData4 ; id of control selected. lda event+owmTaskData4 ; id of control selected.
@ -215,12 +242,13 @@ play
psl #0 ; teHandle. psl #0 ; teHandle.
_TEGetText _TEGetText
pla pla
* sta :len
pla pla
sta :len
bcs :err bcs :err
beq :err
jsr buffer_to_buffer jsr buffer_to_buffer
bcc :err ;
* can use key filter to block invalid characters.... * can use key filter to block invalid characters....
* copy/convert :buffer to _buffer -still needed for space elimination, * copy/convert :buffer to _buffer -still needed for space elimination,
@ -243,7 +271,6 @@ play
:err rts :err rts
:len ds 2
buffer_to_buffer buffer_to_buffer
:c equ 0 :c equ 0
@ -273,7 +300,7 @@ buffer_to_buffer
:space inx :space inx
lda :c lda :c
bne ]loop bne :loop
inc :c inc :c
lda #' ' lda #' '
sta _buffer,y sta _buffer,y
@ -282,6 +309,8 @@ buffer_to_buffer
:eof sta _buffer,y :eof sta _buffer,y
rep $20 rep $20
tya ; len
cmp #1
rts rts
@ -300,31 +329,10 @@ stopped
psl #kStopID psl #kStopID
_HiliteCtlByID _HiliteCtlByID
rts rts
jsr init
jsr start
sep $30
]wait lda _active
beq :done
lda >$e0c000 ; keydown - exit.
bpl ]wait
sta >$e0c010
:done
rep $30
jsr shutdown
lda #0
rtl
start_audio start_audio
mx %00 mx %00
@ -567,14 +575,16 @@ init
mx %00 mx %00
_TLStartUp _TLStartUp
psl #0 pha
pha
psw MyID psw MyID
psw #refIsResource psw #refIsResource
psl #1 psl #1
_StartUpTools _StartUpTools
pll tools pll tools
psl #0 pha
pha
psw #refIsResource psw #refIsResource
psl #1 psl #1
psl #0 psl #0
@ -589,6 +599,7 @@ init
pha pha
_FixMenuBar _FixMenuBar
pla
_DrawMenuBar _DrawMenuBar
jsr init_audio jsr init_audio
@ -765,7 +776,6 @@ init_audio
put tables put tables
old_irq ds 4 old_irq ds 4
quit ds 2
tools ds 4 tools ds 4
window ds 4 window ds 4