mirror of
https://github.com/mi57730/a2d.git
synced 2025-01-05 18:29:21 +00:00
disasm: misc macros, constants
This commit is contained in:
parent
59392f31b8
commit
5233597109
@ -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
|
||||
|
@ -1131,8 +1131,7 @@ show_cursor:
|
||||
.proc restore_device_list
|
||||
ldx devlst_backup
|
||||
inx
|
||||
: lda devlst_backup,x
|
||||
sta DEVLST-1,x
|
||||
: copy devlst_backup,x, DEVLST-1,x
|
||||
dex
|
||||
bpl :-
|
||||
rts
|
||||
@ -6901,9 +6900,9 @@ L7B6A: .byte 0
|
||||
.proc L7B6B
|
||||
ldx #3
|
||||
lda #0
|
||||
L7B6F: sta L7B63,x
|
||||
: sta L7B63,x
|
||||
dex
|
||||
bpl L7B6F
|
||||
bpl :-
|
||||
|
||||
sta L7D5B
|
||||
lda #$FF
|
||||
@ -6925,8 +6924,8 @@ L7B9A: sta L7B5F,x
|
||||
rts
|
||||
|
||||
L7BA1: clc
|
||||
adc #$02
|
||||
ldx #$00
|
||||
adc #2
|
||||
ldx #0
|
||||
stx L7D5C
|
||||
asl a
|
||||
rol L7D5C
|
||||
@ -6937,17 +6936,17 @@ L7BA1: clc
|
||||
sta L7B65
|
||||
lda L7D5C
|
||||
sta L7B66
|
||||
copy16 #$168, L7B63
|
||||
copy16 #360, L7B63
|
||||
jmp L7B96
|
||||
|
||||
L7BCB: lda cached_window_icon_count
|
||||
cmp #$01
|
||||
cmp #1
|
||||
bne L7BEF
|
||||
lda cached_window_icon_list
|
||||
jsr icon_entry_lookup
|
||||
stax $06
|
||||
ldy #$06
|
||||
ldx #$03
|
||||
ldy #6
|
||||
ldx #3
|
||||
L7BE0: lda ($06),y
|
||||
sta L7B5F,x
|
||||
sta L7B63,x
|
||||
@ -6961,13 +6960,13 @@ L7BEF: lda L7D5B
|
||||
bne L7C36
|
||||
L7BF7: lda L7B63
|
||||
clc
|
||||
adc #$32
|
||||
adc #50
|
||||
sta L7B63
|
||||
bcc L7C05
|
||||
inc L7B64
|
||||
L7C05: lda L7B65
|
||||
clc
|
||||
adc #$20
|
||||
adc #32
|
||||
sta L7B65
|
||||
bcc L7C13
|
||||
inc L7B66
|
||||
@ -6987,8 +6986,8 @@ L7C36: tax
|
||||
inc L7D5B
|
||||
jmp L7BEF
|
||||
|
||||
L7C52: ldy #$06
|
||||
ldx #$03
|
||||
L7C52: ldy #6
|
||||
ldx #3
|
||||
L7C56: lda ($06),y
|
||||
sta L7B67,x
|
||||
dey
|
||||
@ -8983,7 +8982,7 @@ open: ldy #$00
|
||||
adc #$23
|
||||
tay
|
||||
|
||||
ldx #$23
|
||||
ldx #.sizeof(MGTK::GrafPort)-1
|
||||
: lda (ptr),y
|
||||
sta grafport2,x
|
||||
dey
|
||||
@ -8994,31 +8993,31 @@ open: ldy #$00
|
||||
lda icon_id
|
||||
jsr icon_entry_lookup
|
||||
stax ptr
|
||||
ldy #$03
|
||||
ldy #3
|
||||
lda ($06),y
|
||||
clc
|
||||
adc #$07
|
||||
adc #7
|
||||
|
||||
sta rect_table
|
||||
sta $0804
|
||||
iny
|
||||
lda ($06),y
|
||||
adc #$00
|
||||
adc #0
|
||||
sta $0801
|
||||
sta $0805
|
||||
iny
|
||||
lda ($06),y
|
||||
clc
|
||||
adc #$07
|
||||
adc #7
|
||||
sta $0801+1
|
||||
sta $0806
|
||||
iny
|
||||
lda ($06),y
|
||||
adc #$00
|
||||
adc #0
|
||||
sta $0803
|
||||
sta $0807
|
||||
ldy #$5B
|
||||
ldx #$03
|
||||
ldy #91
|
||||
ldx #3
|
||||
L8BC1: lda grafport2,x
|
||||
sta rect_table,y
|
||||
dey
|
||||
@ -10202,12 +10201,10 @@ L94A9: lda path_buf,x
|
||||
copy #6, get_info_dialog_params::L92E3
|
||||
lda selected_window_index
|
||||
bne L9519
|
||||
ldx str_vol
|
||||
L950E: lda str_vol,x
|
||||
sta str_file_type,x
|
||||
dex
|
||||
bpl L950E
|
||||
bmi L951F
|
||||
|
||||
COPY_STRING str_vol, str_file_type
|
||||
bmi L951F ; always
|
||||
|
||||
L9519: lda get_file_info_params5::file_type
|
||||
jsr JT_FILE_TYPE_STRING
|
||||
L951F: copy16 #str_file_type, get_info_dialog_params::L92E4
|
||||
@ -14998,8 +14995,7 @@ trash_name: PASCAL_STRING " Trash "
|
||||
|
||||
;; Single device - remove from DEVLST - Why ???
|
||||
ldx index
|
||||
: lda DEVLST+1,x
|
||||
sta DEVLST,x
|
||||
: copy DEVLST+1,x, DEVLST,x
|
||||
inx
|
||||
cpx devcnt
|
||||
bne :-
|
||||
@ -15615,8 +15611,7 @@ cvi_result:
|
||||
.proc remove_device
|
||||
dex
|
||||
L0E36: inx
|
||||
lda DEVLST+1,x
|
||||
sta DEVLST,x
|
||||
copy DEVLST+1,x, DEVLST,x
|
||||
lda device_to_icon_map+1,x
|
||||
sta device_to_icon_map,x
|
||||
cpx DEVCNT
|
||||
|
Loading…
Reference in New Issue
Block a user