diasm - burn down raw references

This commit is contained in:
Joshua Bell 2018-11-23 14:33:37 -08:00
parent 78498cf655
commit 3745757e74
8 changed files with 171 additions and 153 deletions

View File

@ -3263,7 +3263,7 @@ L5A10: lda ($06),y
bpl L5A10
dec $1F00
lda #'/'
sta $1F01
sta $1F00+1
ldax #$1F00
ldy $1F00
jsr L6FB7
@ -4872,7 +4872,7 @@ L6A5C: lda (ptr),y
bpl L6A5C
dec $220
lda #'/'
sta $0221
sta $0220+1
ldax #$220
ldy $220
@ -8038,9 +8038,9 @@ L8736: lda ($06),y
stx LDFC5
rts
L8745: copy16 #$2004, LDFC5
lda #$24
sta LDFC7
L8745: copy #4, LDFC5
copy #' ', LDFC6
copy #'$', LDFC7
lda L877F
lsr a
lsr a
@ -9533,7 +9533,7 @@ L9343: lda ($06),y
bne L9343
dec $220
lda #'/'
sta $0221
sta $0220+1
L9356: yax_call JT_MLI_RELAY, GET_FILE_INFO, get_file_info_params5
beq L9366
jsr show_error_alert
@ -9656,7 +9656,7 @@ L9486: jsr JT_SIZE_STRING
ldx $220
ldy #$00
L9491: lda text_buffer2::data,y
sta $0221,x
sta $0220+1,x
inx
iny
cpy text_buffer2::length
@ -9789,7 +9789,7 @@ L95CD: lda ($06),y
bne L95CD
dec $220
lda #'/'
sta $0221
sta $0220+1
L95E0: ldx L9706
lda selected_icon_list,x
jsr icon_entry_name_lookup
@ -9808,7 +9808,7 @@ L95EE: lda ($06),y
sbc #$02
sta $1F00
L9602: lda ($06),y
sta $1EFF,y
sta $1F00-1,y
dey
cpy #$01
bne L9602
@ -13362,7 +13362,10 @@ down_flag:
click_result:
.byte 0
rts ; ???
.endproc
.proc noop
rts
.endproc
;;; ============================================================
@ -13531,25 +13534,25 @@ LBAC5: cpx path_buf1
inx
iny
lda path_buf1,x
sta LD3C0+2,y
sta LD3C1+1,y
jmp LBAC5
LBAD5: iny
sty LD3C0+1
sty LD3C1
ldx #1
ldy LD3C0+1
ldy LD3C1
LBADE: cpx path_buf2
beq LBAEE
inx
iny
lda path_buf2,x
sta LD3C0+1,y
sta LD3C1,y
jmp LBADE
LBAEE: sty LD3C0+1
LBAEE: sty LD3C1
lda str_insertion_point+1
sta LD3C0+2
LBAF7: lda LD3C0+1,y
sta LD3C1+1
LBAF7: lda LD3C1,y
sta path_buf2,y
dey
bpl LBAF7
@ -13688,13 +13691,13 @@ LBC64: ldx path_buf2
cpx #$01
beq LBC79
LBC6B: lda path_buf2,x
sta LD3C0,x
sta LD3C1-1,x
dex
cpx #$01
bne LBC6B
ldx path_buf2
LBC79: dex
stx LD3C0+1
stx LD3C1
ldx path_buf1
LBC80: lda path_buf1,x
sta path_buf2+1,x
@ -13707,12 +13710,12 @@ LBC80: lda path_buf1,x
sta path_buf2
lda path_buf1
clc
adc LD3C0+1
adc LD3C1
tay
pha
ldx LD3C0+1
ldx LD3C1
beq LBCB3
LBCA6: lda LD3C0+1,x
LBCA6: lda LD3C1,x
sta path_buf2,y
dex
dey

View File

@ -301,8 +301,8 @@ buf_win_path: .res 43, 0
temp_string_buf:
.res 45, 0
LD3AD: .res 19, 0
LD3C0: .res 46, 0
LD3AD: .res 20, 0
LD3C1: .res 45, 0
LD3EE: .res 17, 0
LD3FF: .byte 0
@ -692,6 +692,8 @@ str_file_count: ; populated with number of files
PASCAL_STRING " "
;; This location also used as path buffer by ovl2
ovl2_path_buf:
file_count:
.word 0

View File

@ -19,7 +19,7 @@ data_buffer := $0C5B
block_num := $0C5D
.endscope
just_rts := $0C83
noop := $0C83
quit := $0C84
L0CAF := $0CAF
eject_disk := $0CED
@ -841,11 +841,11 @@ LD9BA: cmp #MGTK::EventKind::key_down
menu_command_table:
;; Apple menu
.addr disk_copy_overlay4::just_rts
.addr disk_copy_overlay4::just_rts
.addr disk_copy_overlay4::just_rts
.addr disk_copy_overlay4::just_rts
.addr disk_copy_overlay4::just_rts
.addr disk_copy_overlay4::noop
.addr disk_copy_overlay4::noop
.addr disk_copy_overlay4::noop
.addr disk_copy_overlay4::noop
.addr disk_copy_overlay4::noop
;; File menu
.addr disk_copy_overlay4::quit
;; Facilities menu

View File

@ -648,8 +648,9 @@ params: .addr 0
;;; ============================================================
just_rts:
.proc noop
rts
.endproc
;;; ============================================================
;;; Quit back to ProDOS (which will launch DeskTop)
@ -1100,7 +1101,7 @@ L1009: clc
L100B: lda #$07
sta disk_copy_overlay3::LD423
inc16 disk_copy_overlay3::LD421
L1018: lda disk_copy_overlay3::LD421+1
lda disk_copy_overlay3::LD421+1
cmp disk_copy_overlay3::LD427+1
bne L1009
lda disk_copy_overlay3::LD421

View File

@ -28,7 +28,7 @@ L0832: copy16 #L0B48, desktop_main::jump_relay+1
L0841: jsr desktop_main::prompt_input_loop
bmi L0841
pha
copy16 #$B8F4, desktop_main::jump_relay+1
copy16 #desktop_main::noop, desktop_main::jump_relay+1
lda #$00
sta LD8F3
sta use_ovl2_handler_flag
@ -77,7 +77,7 @@ L08B7: lda path_buf1
axy_call desktop_main::draw_dialog_label, $03, desktop_aux::LB2AF
lda L09D7
jsr L1A2D
addr_call desktop_main::draw_text1, file_count
addr_call desktop_main::draw_text1, ovl2_path_buf
L0902: jsr desktop_main::prompt_input_loop
bmi L0902
beq L090C
@ -216,7 +216,7 @@ L0A7A: lda path_buf1
lda L0B46
and #$F0
jsr L1A2D
addr_call desktop_main::draw_text1, file_count
addr_call desktop_main::draw_text1, ovl2_path_buf
L0AC7: jsr desktop_main::prompt_input_loop
bmi L0AC7
beq L0AD1
@ -315,8 +315,8 @@ L0BDC: cmp LD887
jsr desktop_main::detect_double_click2
bmi L0C03
L0BE6: MGTK_RELAY_CALL MGTK::SetPenMode, penXOR ; flash the button
MGTK_RELAY_CALL MGTK::PaintRect, $AE20
MGTK_RELAY_CALL MGTK::PaintRect, $AE20
MGTK_RELAY_CALL MGTK::PaintRect, desktop_aux::ok_button_rect
MGTK_RELAY_CALL MGTK::PaintRect, desktop_aux::ok_button_rect
lda #$00
L0C03: rts
@ -1439,12 +1439,12 @@ L1959: lda read_block_params::unit_num
sta the_disk_in_slot_label,x
ldx the_disk_in_slot_label
L1974: lda the_disk_in_slot_label,x
sta file_count,x
sta ovl2_path_buf,x
dex
bpl L1974
rts
L197E: addr_call L19C8, file_count
L197E: addr_call L19C8, ovl2_path_buf
rts
L1986: cmp #$A5
@ -1462,7 +1462,7 @@ L1986: cmp #$A5
sta the_dos_33_disk_label,x
ldx the_dos_33_disk_label
L19AC: lda the_dos_33_disk_label,x
sta file_count,x
sta ovl2_path_buf,x
dex
bpl L19AC
rts
@ -1486,62 +1486,66 @@ L19C1: and #$80
L19C8: copy16 #$0002, read_block_params::block_num
yax_call MLI_RELAY, READ_BLOCK, read_block_params
beq L19F7
copy16 #$2004, file_count
copy16 #$203A, pos_D90B
lda #$3F
sta pos_D90B+1
copy #4, ovl2_path_buf
copy #' ', ovl2_path_buf+1
copy #':', ovl2_path_buf+2
copy #' ', ovl2_path_buf+3 ; Overwritten ???
copy #'?', ovl2_path_buf+3
rts
L19F7: lda read_buffer + 6
tax
L19FB: lda read_buffer + 6,x
L1A00 := * + 2
sta file_count,x
sta ovl2_path_buf,x
L1A01: dex
L1A02: bpl L19FB
L1A04: inc file_count
ldx file_count
lda #$3A
sta file_count,x
inc file_count
ldx file_count
lda #$20
sta file_count,x
inc file_count
ldx file_count
lda #$3F
L1A22: sta file_count,x
addr_call desktop_main::adjust_case, file_count
L1A04: inc ovl2_path_buf
ldx ovl2_path_buf
lda #':'
sta ovl2_path_buf,x
inc ovl2_path_buf
ldx ovl2_path_buf
lda #' '
sta ovl2_path_buf,x
inc ovl2_path_buf
ldx ovl2_path_buf
lda #'?'
L1A22: sta ovl2_path_buf,x
addr_call desktop_main::adjust_case, ovl2_path_buf
rts
;;; ============================================================
L1A2D: sta on_line_params::unit_num
.proc L1A2D
sta on_line_params::unit_num
yax_call MLI_RELAY, ON_LINE, on_line_params
bne L1A6D
lda read_buffer
and #$0F
and #$0F ; mask off name length
beq L1A6D
sta read_buffer
tax
L1A46: lda read_buffer,x
sta file_count,x
: lda read_buffer,x
sta ovl2_path_buf,x
dex
bpl L1A46
inc file_count
ldx file_count
lda #$20
sta file_count,x
inc file_count
ldx file_count
bpl :-
inc ovl2_path_buf
ldx ovl2_path_buf
lda #' '
sta ovl2_path_buf,x
inc ovl2_path_buf
ldx ovl2_path_buf
lda #$3F
sta file_count,x
addr_call desktop_main::adjust_case, file_count ; Adjust case ("/HD/GAMES" -> "/Hd/Games")
sta ovl2_path_buf,x
addr_call desktop_main::adjust_case, ovl2_path_buf ; Adjust case ("/HD/GAMES" -> "/Hd/Games")
rts
L1A6D: lda on_line_params::unit_num
jsr L192E
rts
.endproc
;;; ============================================================

View File

@ -36,9 +36,9 @@ routine_table: .addr $7000, $7000, $7000
sta L50A8
sta prompt_ip_flag
sta LD8EC
sta $D8F0
sta $D8F1
sta $D8F2
sta LD8F0
sta LD8F1
sta LD8F2
sta cursor_ip_flag
sta L5104
sta L5103
@ -46,7 +46,7 @@ routine_table: .addr $7000, $7000, $7000
lda #prompt_insertion_point_blink_count
sta prompt_ip_counter
lda #$FF
sta $D920
sta LD920
pla
asl a
tax
@ -155,7 +155,7 @@ L51D2: lda winfo_entrydlg
clicked:
bit L5105
bmi L520A
lda $D920
lda LD920
bpl L520D
L520A: jmp set_up_ports
@ -245,7 +245,7 @@ set_up_ports:
MGTK_RELAY_CALL MGTK::SetPort, grafport2
rts
L531B: jsr L59B8
L531B: jsr noop
rts
L531F: bit L5105
@ -269,7 +269,7 @@ L5341: lda winfo_entrydlg_file_picker
lsr16 screentowindow_windowy
lsr16 screentowindow_windowy
lsr16 screentowindow_windowy
lda $D920
lda LD920
cmp screentowindow_windowy
beq L5380
jmp L542F
@ -278,7 +278,7 @@ L5380: jsr L5C4F
beq L5386
rts
L5386: ldx $D920
L5386: ldx LD920
lda $1780,x
bmi L53B5
lda winfo_entrydlg
@ -334,18 +334,18 @@ L542F: lda screentowindow_windowy
bcc L5438
rts
L5438: lda $D920
L5438: lda LD920
bmi L5446
jsr jt_04
lda $D920
lda LD920
jsr L6274
L5446: lda screentowindow_windowy
sta $D920
bit $D8F0
sta LD920
bit LD8F0
bpl L5457
jsr jt_06
jsr jt_03
L5457: lda $D920
L5457: lda LD920
jsr L6274
jsr jt_05
jsr L5C4F
@ -520,11 +520,11 @@ cursor_ip_flag: ; high bit set when cursor is IP
;;; ============================================================
L5607: ldx $D920
L5607: ldx LD920
lda $1780,x
and #$7F
pha
bit $D8F0
bit LD8F0
bpl L5618
jsr jt_06
L5618: lda #$00
@ -559,7 +559,7 @@ L5618: lda #$00
L565B: .byte 0
L565C: lda #$FF
sta $D920
sta LD920
jsr inc_device_num
jsr device_on_line
jsr L5F5B
@ -591,10 +591,10 @@ L569B: cpx #$01
jmp L56E1
L56A2: jsr L5F49
lda $D920
lda LD920
pha
lda #$FF
sta $D920
sta LD920
jsr L5F5B
jsr L6161
lda #$00
@ -602,11 +602,11 @@ L56A2: jsr L5F49
jsr L61B1
jsr L606D
pla
sta $D920
sta LD920
bit L56E2
bmi L56D6
jsr jt_04
lda $D920
lda LD920
bmi L56DC
jsr jt_04
jmp L56DC
@ -614,7 +614,7 @@ L56A2: jsr L5F49
L56D6: jsr jt_06
jsr jt_03
L56DC: lda #$FF
sta $D920
sta LD920
L56E1: rts
L56E2: .byte 0
@ -861,8 +861,9 @@ params: .addr 0
;;; ============================================================
just_rts:
L59B8: rts
.proc noop
rts
.endproc
;;; ============================================================
;;; Key handler
@ -945,7 +946,7 @@ L5A4F: jmp L5AC8
L5A52: cmp #CHAR_CTRL_O ; Open
bne L5A8B
lda $D920
lda LD920
bmi L5AC8
tax
lda $1780,x
@ -1009,12 +1010,12 @@ key_delete:
rts
key_meta_digit:
jmp L59B8
jmp noop
.proc key_down
lda $177F
beq L5B37
lda $D920
lda LD920
bmi L5B47
tax
inx
@ -1024,8 +1025,8 @@ L5B37: rts
L5B38: jsr L6274
jsr jt_04
inc $D920
lda $D920
inc LD920
lda LD920
jmp update_list_selection
L5B47: lda #0
@ -1035,15 +1036,15 @@ L5B47: lda #0
.proc key_up
lda $177F
beq L5B58
lda $D920
lda LD920
bmi L5B68
bne L5B59
L5B58: rts
L5B59: jsr L6274
jsr jt_04
dec $D920
lda $D920
dec LD920
lda LD920
jmp update_list_selection
L5B68: ldx $177F
@ -1065,10 +1066,10 @@ done: rts
L5B83: jsr L5B9D
bmi done
cmp $D920
cmp LD920
beq done
pha
lda $D920
lda LD920
bmi L5B99
jsr L6274
jsr jt_04
@ -1127,7 +1128,7 @@ L5BF5: .byte 0
.proc scroll_list_top
lda $177F
beq L5C02
lda $D920
lda LD920
bmi L5C09
bne L5C03
L5C02: rts
@ -1141,7 +1142,7 @@ L5C09: lda #$00
.proc scroll_list_bottom
lda $177F
beq L5C1E
ldx $D920
ldx LD920
bmi L5C27
inx
cpx $177F
@ -1161,9 +1162,9 @@ L5C27: ldx $177F
;;; ============================================================
.proc update_list_selection
sta $D920
sta LD920
jsr jt_05
lda $D920
lda LD920
jsr L6586
jsr L6163
jsr L606D
@ -1424,7 +1425,7 @@ L5ED0: yax_call MLI_RELAY, OPEN, open_params
beq L5EE9
jsr device_on_line
lda #$FF
sta $D920
sta LD920
sta L5F0C
jmp L5ED0
@ -1435,7 +1436,7 @@ L5EE9: lda open_params::ref_num
beq L5F0B
jsr device_on_line
lda #$FF
sta $D920
sta LD920
sta L5F0C
jmp L5ED0
@ -1468,7 +1469,7 @@ L5F31: lda ($06),y
pla
sta path_buf
lda #$FF
sta $D920
sta LD920
return #$00
;;; ============================================================
@ -1648,7 +1649,7 @@ L60A9: MGTK_RELAY_CALL MGTK::MoveTo, picker_entry_pos
lda #$10
sta picker_entry_pos
L60FF: lda L6128
cmp $D920
cmp LD920
bne L6110
jsr L6274
lda winfo_entrydlg_file_picker
@ -2137,8 +2138,8 @@ L6593: lda winfo_entrydlg
L65C8: MGTK_RELAY_CALL MGTK::SetTextBG, textbg2
lda #$FF
sta prompt_ip_flag
L65D6: copy16 #$D8EF, $06
lda $D8EE
L65D6: copy16 #str_insertion_point+1, $06
lda str_insertion_point
sta $08
MGTK_RELAY_CALL MGTK::DrawText, $06
jsr L56E3
@ -2160,8 +2161,8 @@ L65F0: lda winfo_entrydlg
L6626: MGTK_RELAY_CALL MGTK::SetTextBG, textbg2
lda #$FF
sta prompt_ip_flag
L6634: copy16 #$D8EF, $06
lda $D8EE
L6634: copy16 #str_insertion_point+1, $06
lda str_insertion_point
sta $08
MGTK_RELAY_CALL MGTK::DrawText, $06
jsr L56E3
@ -2294,25 +2295,25 @@ L6806: cpx path_buf0
inx
iny
lda path_buf0,x
sta $D3C2,y
sta LD3C1+1,y
jmp L6806
L6816: iny
sty $D3C1
sty LD3C1
ldx #$01
ldy $D3C1
ldy LD3C1
L681F: cpx path_buf2
beq L682F
inx
iny
lda path_buf2,x
sta $D3C1,y
sta LD3C1,y
jmp L681F
L682F: sty $D3C1
lda $D8EF
sta $D3C2
L6838: lda $D3C1,y
L682F: sty LD3C1
lda str_insertion_point+1
sta LD3C1+1
L6838: lda LD3C1,y
sta path_buf2,y
dey
bpl L6838
@ -2422,25 +2423,25 @@ L697D: cpx path_buf1
inx
iny
lda path_buf1,x
sta $D3C2,y
sta LD3C1+1,y
jmp L697D
L698D: iny
sty $D3C1
sty LD3C1
ldx #$01
ldy $D3C1
ldy LD3C1
L6996: cpx path_buf2
beq L69A6
inx
iny
lda path_buf2,x
sta $D3C1,y
sta LD3C1,y
jmp L6996
L69A6: sty $D3C1
lda $D8EF
sta $D3C2
L69AF: lda $D3C1,y
L69A6: sty LD3C1
lda str_insertion_point+1
sta LD3C1+1
L69AF: lda LD3C1,y
sta path_buf2,y
dey
bpl L69AF
@ -2842,7 +2843,7 @@ L6DD0: lda #$00
L6DD4: lda #$80
L6DD6: sta L6E1C
copy16 #$1800, $06
ldx $D920
ldx LD920
lda $1780,x
and #$7F
ldx #$00
@ -2931,17 +2932,17 @@ L6EA3: lda #$00
L6EA5: bmi L6EB6
ldx path_buf0
L6EAA: lda path_buf0,x
sta $D3C1,x
sta LD3C1,x
dex
bpl L6EAA
jmp L6EC2
L6EB6: ldx path_buf1
L6EB9: lda path_buf1,x
sta $D3C1,x
sta LD3C1,x
dex
bpl L6EB9
L6EC2: lda $D920
L6EC2: lda LD920
sta L6F3D
bmi L6EFB
ldx #$00
@ -2969,29 +2970,29 @@ L6EC2: lda $D920
tax
tya
jsr L5F0D
L6EFB: addr_call adjust_filename_case, $D3C1
L6EFB: addr_call adjust_filename_case, LD3C1
addr_call adjust_filename_case, path_buf
lda $D3C1
lda LD3C1
cmp path_buf
bne L6F26
tax
L6F12: lda $D3C1,x
L6F12: lda LD3C1,x
cmp path_buf,x
bne L6F26
dex
bne L6F12
lda #$00
sta $D8F0
sta LD8F0
jsr L6F2F
rts
L6F26: lda #$FF
sta $D8F0
sta LD8F0
jsr L6F2F
rts
L6F2F: lda L6F3D
sta $D920
sta LD920
bpl L6F38
rts

View File

@ -16,7 +16,7 @@ L7000: jsr common_overlay::create_common_dialog
jsr common_overlay::jt_06
jsr common_overlay::jt_03
lda #$FF
sta $D8EC
sta LD8EC
jmp common_overlay::L5106
L7026: ldx jump_table_entries
@ -87,7 +87,7 @@ L70C0: MGTK_RELAY_CALL MGTK::CloseWindow, winfo_entrydlg_file_picker
L70EA: MGTK_RELAY_CALL MGTK::CloseWindow, winfo_entrydlg_file_picker
MGTK_RELAY_CALL MGTK::CloseWindow, winfo_entrydlg
lda #0
sta $D8EC
sta LD8EC
jsr common_overlay::set_cursor_pointer
ldx common_overlay::stash_stack
txs

View File

@ -51,10 +51,12 @@ L706A: jsr common_overlay::L6163
lda path_buf0
bne L707B
jsr common_overlay::jt_06
L707B: copy16 #$2001, path_buf2
L707B: copy #1, path_buf2
copy #' ', path_buf2+1
jsr common_overlay::jt_03
jsr common_overlay::L6693
copy16 #$2001, path_buf2
copy #1, path_buf2
copy #' ', path_buf2+1
lda #$FF
sta LD8EC
jmp common_overlay::L5106
@ -79,7 +81,8 @@ L70B0: lda jump_table_entries+1,x
sta common_overlay::L51AE
lda #$80
sta common_overlay::L5104
copy16 #$0601, path_buf2
copy #1, path_buf2
copy #GLYPH_INSPT, path_buf2+1
lda winfo_entrydlg
jsr common_overlay::set_port_for_window
lda L73A9
@ -168,7 +171,8 @@ jump_table2_entries: .byte $29
;;; ============================================================
L725D: copy16 #$2001, path_buf2
L725D: copy #1, path_buf2
copy #' ', path_buf2+1
jsr common_overlay::jt_03
ldx jump_table2_entries
L726D: lda jump_table2_entries+1,x
@ -207,7 +211,8 @@ L72AF: iny
cpx path_buf0
bne L72AF
sty path_buf1
L72BF: copy16 #$0601, path_buf2
L72BF: copy #1, path_buf2
copy #GLYPH_INSPT, path_buf2+1
jsr common_overlay::jt_03
rts
@ -233,7 +238,7 @@ L72EE: MGTK_RELAY_CALL MGTK::InitPort, grafport3
MGTK_RELAY_CALL MGTK::CloseWindow, winfo_entrydlg
sta LD8EC
jsr common_overlay::set_cursor_pointer
copy16 #common_overlay::just_rts, common_overlay::L59B9::key_meta_digit+1
copy16 #common_overlay::noop, common_overlay::L59B9::key_meta_digit+1
ldx common_overlay::stash_stack
txs
ldx L73A9
@ -247,12 +252,13 @@ L732F: MGTK_RELAY_CALL MGTK::InitPort, grafport3
lda #$00
sta LD8EC
jsr common_overlay::set_cursor_pointer
copy16 #common_overlay::just_rts, common_overlay::L59B9::key_meta_digit+1
copy16 #common_overlay::noop, common_overlay::L59B9::key_meta_digit+1
ldx common_overlay::stash_stack
txs
return #$FF
L736C: copy16 #$2001, path_buf2
L736C: copy #1, path_buf2
copy #' ', path_buf2+1
jsr common_overlay::jt_03
ldx jump_table_entries
L737C: lda jump_table_entries+1,x
@ -263,7 +269,8 @@ L737C: lda jump_table_entries+1,x
dex
dex
bpl L737C
copy16 #$0601, path_buf2
copy #1, path_buf2
copy #GLYPH_INSPT, path_buf2+1
jsr common_overlay::jt_03
lda #$00
sta common_overlay::L5105