a2d/desktop/ovl5.s

268 lines
6.6 KiB
ArmAsm
Raw Normal View History

2018-02-20 05:32:47 +00:00
.setcpu "6502"
2018-02-26 03:02:34 +00:00
;;; NB: Compiled as part of ovl34567.s
2018-02-20 05:32:47 +00:00
2018-03-05 05:36:00 +00:00
;;; ============================================================
2018-02-20 05:32:47 +00:00
;;; Overlay for File Copy
2018-03-05 05:36:00 +00:00
;;; ============================================================
2018-02-20 05:32:47 +00:00
.org $7000
2018-02-25 23:19:38 +00:00
.proc file_copy_overlay
2018-02-20 05:32:47 +00:00
2018-02-26 03:02:34 +00:00
L7000: jsr common_overlay::L5CF7
2018-02-20 05:32:47 +00:00
jsr L7052
2018-02-26 03:02:34 +00:00
jsr common_overlay::L5E87
jsr common_overlay::L5F5B
jsr common_overlay::L6161
jsr common_overlay::L61B1
jsr common_overlay::L606D
2018-02-20 05:32:47 +00:00
jsr L7026
2018-02-26 03:02:34 +00:00
jsr common_overlay::L6D30
jsr common_overlay::L6D27
2018-02-20 05:32:47 +00:00
lda #$FF
sta $D8EC
2018-02-26 03:02:34 +00:00
jmp common_overlay::L5106
2018-02-20 05:32:47 +00:00
L7026: ldx L709B
L7029: lda L709B+1,x
sta $6D1E,x
dex
lda L709B+1,x
sta $6D1E,x
dex
dex
bpl L7029
lda #$80
sta $5104
lda #$00
sta path_buf0
sta $51AE
lda #$01
sta path_buf2
lda #$06
sta $D485
rts
2018-03-15 04:10:08 +00:00
L7052: lda winfo_entrydlg
2018-02-26 03:02:34 +00:00
jsr common_overlay::L62C8
addr_call common_overlay::L5E0A, $DA67 ; "Copy a File ..."
addr_call common_overlay::L5E57, $DA77 ; "Source filename:"
addr_call common_overlay::L5E6F, $DA88 ; "Destination filename:"
2018-03-02 02:25:42 +00:00
MGTK_RELAY_CALL MGTK::SetPenMode, penXOR ; penXOR
2018-02-22 05:28:13 +00:00
MGTK_RELAY_CALL MGTK::FrameRect, dialog_rect1
MGTK_RELAY_CALL MGTK::FrameRect, dialog_rect2
MGTK_RELAY_CALL MGTK::InitPort, grafport3
MGTK_RELAY_CALL MGTK::SetPort, grafport3
2018-02-20 05:32:47 +00:00
rts
L709B: .byte $29 ; length of following data block
entry 0, L70F1
entry 0, L71D8
entry 0, $6593
entry 0, $664E
entry 0, $6DC2
entry 0, $6DD0
entry 0, $6E1D
entry 0, $69C6
entry 0, $6A18
entry 0, $6A53
entry 0, $6AAC
entry 0, $6B01
entry 0, $6B44
entry 0, $66D8
L70C6: .byte $29 ; length of following data block
entry 0, L7189
entry 0, L71F9
entry 0, $65F0
entry 0, $6693
entry 0, $6DC9
entry 0, $6DD4
entry 0, $6E31
entry 0, $6B72
entry 0, $6BC4
entry 0, $6BFF
entry 0, $6C58
entry 0, $6CAD
entry 0, $6CF0
entry 0, $684F
2018-03-05 05:36:00 +00:00
;;; ============================================================
2018-02-20 05:32:47 +00:00
L70F1: lda #1
sta path_buf2
lda #$20
sta $D485
2018-02-26 03:02:34 +00:00
jsr common_overlay::L6D27
2018-02-20 05:32:47 +00:00
ldx L70C6
: lda L70C6+1,x
sta $6D1E,x
dex
lda L70C6+1,x
sta $6D1E,x
dex
dex
bpl :-
lda #$80
sta $50A8
sta $51AE
lda $D920
sta $D921
lda #$FF
sta $D920
2018-02-26 03:02:34 +00:00
jsr common_overlay::L5E87
jsr common_overlay::L5F5B
jsr common_overlay::L6161
jsr common_overlay::L61B1
2018-02-20 05:32:47 +00:00
2018-02-26 03:02:34 +00:00
jsr common_overlay::L606D
2018-02-20 05:32:47 +00:00
ldx $5028
L7137: lda $5028,x
sta path_buf1,x
dex
bpl L7137
2018-02-26 03:02:34 +00:00
addr_call common_overlay::L6129, path_buf1 ; path_buf1
2018-02-20 05:32:47 +00:00
lda #$01
sta path_buf2 ; path_buf2
lda #$06
sta $D485
ldx path_buf0
beq L7178
L7156: lda path_buf0,x
and #$7F
cmp #'/'
beq L7162
dex
bne L7156
2018-02-21 04:36:46 +00:00
L7162: ldy #2
2018-02-20 05:32:47 +00:00
dex
L7165: cpx path_buf0
beq L7178
inx
lda path_buf0,x
sta path_buf2,y
inc path_buf2
iny
jmp L7165
2018-02-26 03:02:34 +00:00
L7178: jsr common_overlay::L6D27
2018-02-20 05:32:47 +00:00
lda $D8F0
sta $D8F1
lda $D8F2
sta $D8F0
rts
.byte 0
2018-03-05 05:36:00 +00:00
;;; ============================================================
2018-02-20 05:32:47 +00:00
2018-02-26 03:02:34 +00:00
L7189: addr_call common_overlay::L647C, path_buf0
2018-02-20 05:32:47 +00:00
beq L7198
L7192: lda #$40
2018-02-25 07:19:29 +00:00
jsr JUMP_TABLE_ALERT_0
2018-02-20 05:32:47 +00:00
rts
2018-02-26 03:02:34 +00:00
L7198: addr_call common_overlay::L647C, path_buf1
2018-02-20 05:32:47 +00:00
bne L7192
2018-03-15 03:38:47 +00:00
MGTK_RELAY_CALL MGTK::CloseWindow, winfo_entrydlg_file_picker
2018-03-15 04:10:08 +00:00
MGTK_RELAY_CALL MGTK::CloseWindow, winfo_entrydlg
2018-02-20 05:32:47 +00:00
lda #0
sta $50A8
lda #0
sta $D8EC
2018-02-26 03:02:34 +00:00
jsr common_overlay::L55BA
2018-02-25 21:47:06 +00:00
copy16 #path_buf0, $6
2018-02-20 05:32:47 +00:00
copy16 #path_buf1, $8
ldx $50AA
txs
2018-02-24 05:11:20 +00:00
return #$00
2018-02-20 05:32:47 +00:00
.byte 0
2018-03-05 05:36:00 +00:00
;;; ============================================================
2018-02-20 05:32:47 +00:00
2018-03-15 03:38:47 +00:00
L71D8: MGTK_RELAY_CALL MGTK::CloseWindow, winfo_entrydlg_file_picker
2018-03-15 04:10:08 +00:00
MGTK_RELAY_CALL MGTK::CloseWindow, winfo_entrydlg
2018-02-20 05:32:47 +00:00
lda #0
sta $D8EC
2018-02-26 03:02:34 +00:00
jsr common_overlay::L55BA
2018-02-20 05:32:47 +00:00
ldx $50AA
txs
2018-02-24 05:11:20 +00:00
return #$FF
2018-02-20 05:32:47 +00:00
2018-03-05 05:36:00 +00:00
;;; ============================================================
2018-02-20 05:32:47 +00:00
L71F9: lda #1
sta path_buf2
lda #' '
2018-02-25 21:47:06 +00:00
sta $D485
2018-02-26 03:02:34 +00:00
jsr common_overlay::L6D27
2018-02-20 05:32:47 +00:00
ldx L709B
L7209: lda L709B+1,x
sta $6D1E,x
dex
lda L709B+1,x
sta $6D1E,x
dex
dex
bpl L7209
lda #$01
sta path_buf2
lda #$06
sta $D485
lda #$00
sta $50A8
lda #$FF
sta $D920
lda #$00
sta $51AE
lda $D8F0
sta $D8F2
lda $D8F1
sta $D8F0
ldx path_buf0
: lda path_buf0,x
sta $5028,x
dex
bpl :-
2018-02-26 03:02:34 +00:00
jsr common_overlay::L5F49
2018-02-20 05:32:47 +00:00
bit $D8F0
bpl L726D
2018-02-26 03:02:34 +00:00
jsr common_overlay::L5E87
2018-02-21 04:36:46 +00:00
lda #0
2018-02-26 03:02:34 +00:00
jsr common_overlay::L6227
jsr common_overlay::L5F5B
jsr common_overlay::L6161
jsr common_overlay::L61B1
jsr common_overlay::L606D
jsr common_overlay::L6D27
2018-02-20 05:32:47 +00:00
jmp L7295
L726D: lda $5028
bne L7281
2018-02-26 03:02:34 +00:00
L7272: jsr common_overlay::L5E87
2018-02-20 05:32:47 +00:00
lda #$00
2018-02-26 03:02:34 +00:00
jsr common_overlay::L6227
jsr common_overlay::L5F5B
2018-02-20 05:32:47 +00:00
lda #$FF
bne L7289
2018-02-26 03:02:34 +00:00
L7281: jsr common_overlay::L5F5B
2018-02-20 05:32:47 +00:00
bcs L7272
lda $D921
L7289: sta $D920
2018-02-26 03:02:34 +00:00
jsr common_overlay::L6163
jsr common_overlay::L61B1
jsr common_overlay::L606D
2018-02-20 05:32:47 +00:00
L7295: rts
2018-03-05 05:36:00 +00:00
;;; ============================================================
2018-02-25 23:19:38 +00:00
2018-02-20 05:32:47 +00:00
PAD_TO $7800
2018-02-25 23:19:38 +00:00
.endproc ; file_copy_overlay