disasm: misc macros, constants
This commit is contained in:
@@ -748,7 +748,7 @@ init: sta ALTZPON
|
||||
MGTK_CALL MGTK::InitPort, grafport
|
||||
MGTK_CALL MGTK::SetPort, grafport ; set clipping bounds?
|
||||
MGTK_CALL MGTK::FlushEvents
|
||||
lda #$01
|
||||
lda #MGTK::EventKind::button_down
|
||||
sta event_params::kind
|
||||
MGTK_CALL MGTK::PostEvent, event_params
|
||||
MGTK_CALL MGTK::GetEvent, event_params
|
||||
@@ -905,7 +905,7 @@ clear: lda #'C' ; otherwise turn Escape into Clear
|
||||
|
||||
trydel: cmp #CHAR_DELETE ; Delete?
|
||||
beq :+
|
||||
cmp #$60 ; lowercase range?
|
||||
cmp #'`' ; lowercase range?
|
||||
bcc :+
|
||||
and #$5F ; convert to uppercase
|
||||
: jmp process_key
|
||||
@@ -1060,7 +1060,7 @@ miss: clc
|
||||
ldxy #btn_c::port
|
||||
lda #'c'
|
||||
jsr depress_button
|
||||
lda #$00
|
||||
lda #0
|
||||
jsr FLOAT
|
||||
ldxy #farg
|
||||
jsr ROUND
|
||||
@@ -1267,12 +1267,12 @@ update: sec
|
||||
|
||||
: sec
|
||||
ror calc_p
|
||||
cpy #$0A
|
||||
cpy #10
|
||||
bcs rts3
|
||||
pha
|
||||
ldy calc_l
|
||||
beq empty
|
||||
lda #$0F
|
||||
lda #15
|
||||
sec
|
||||
sbc calc_l
|
||||
tax
|
||||
@@ -1301,7 +1301,7 @@ rts3: rts
|
||||
bne :+
|
||||
lda calc_g
|
||||
bne reparse
|
||||
lda #$00
|
||||
lda #0
|
||||
jsr FLOAT
|
||||
jmp do_op
|
||||
|
||||
|
||||
@@ -842,7 +842,7 @@ loop2: sbc #1
|
||||
;;; Save/restore Zero Page
|
||||
|
||||
.proc save_zp
|
||||
ldx #$00
|
||||
ldx #0
|
||||
loop: lda $00,x
|
||||
sta zp_buffer,x
|
||||
dex
|
||||
@@ -851,7 +851,7 @@ loop: lda $00,x
|
||||
.endproc
|
||||
|
||||
.proc restore_zp
|
||||
ldx #$00
|
||||
ldx #0
|
||||
loop: lda zp_buffer,x
|
||||
sta $00,x
|
||||
dex
|
||||
|
||||
@@ -752,7 +752,7 @@ check_title:
|
||||
lda #da_window_id
|
||||
sta dragwindow_params::window_id
|
||||
MGTK_CALL MGTK::DragWindow, dragwindow_params
|
||||
ldx #$23
|
||||
ldx #$23 ; ???
|
||||
jsr redraw_screen
|
||||
rts
|
||||
|
||||
@@ -1075,8 +1075,8 @@ loop: tya
|
||||
|
||||
.proc play_sound
|
||||
ldx #$80
|
||||
loop1: lda #$58
|
||||
loop2: ldy #$1B
|
||||
loop1: lda #88
|
||||
loop2: ldy #27
|
||||
delay1: dey
|
||||
bne delay1
|
||||
bit SPKR
|
||||
|
||||
@@ -367,25 +367,22 @@ abort: rts
|
||||
;; Exit if a directory.
|
||||
ldy #2 ; 2nd byte of entry
|
||||
lda (src),y
|
||||
and #$70 ; check that one of bits 4,5,6 is set ???
|
||||
;; some vague patterns, but unclear
|
||||
;; basic = $32,$33, text = $52, sys = $11,$14,??, bin = $23,$24,$33
|
||||
;; dir = $01 (so not shown)
|
||||
and #icon_entry_type_mask
|
||||
bne :+
|
||||
rts ; abort ???
|
||||
rts ; 000 = directory
|
||||
|
||||
;; Set window title to point at filename (9th byte of entry)
|
||||
;; (title includes the spaces before/after from the icon)
|
||||
: clc
|
||||
lda src ; name is 9 bytes into entry
|
||||
adc #9
|
||||
lda src
|
||||
adc #IconEntry::len
|
||||
sta winfo::title
|
||||
lda src+1
|
||||
adc #0
|
||||
sta winfo::title+1
|
||||
|
||||
;; Append filename to path.
|
||||
ldy #9
|
||||
ldy #IconEntry::len
|
||||
lda (src),y ; grab length
|
||||
tax ; name has spaces before/after
|
||||
dex ; so subtract 2 to get actual length
|
||||
|
||||
Reference in New Issue
Block a user