mirror of
https://github.com/bobbimanners/emailler.git
synced 2024-11-18 21:07:03 +00:00
xmodem d/l now prompts for filename
git-svn-id: http://svn.code.sf.net/p/netboot65/code@224 93682198-c243-4bdb-bd91-e943c89aac3b
This commit is contained in:
parent
f8ca2f33f7
commit
74bbcc8b95
@ -317,6 +317,17 @@ xmodem_download:
|
|||||||
jsr xmodem_receive
|
jsr xmodem_receive
|
||||||
bcs @error
|
bcs @error
|
||||||
jsr close_file
|
jsr close_file
|
||||||
|
ldax #transfer_complete
|
||||||
|
jsr print_ascii_as_native
|
||||||
|
ldax #prompt_for_filename
|
||||||
|
jsr print_ascii_as_native
|
||||||
|
@get_filename:
|
||||||
|
ldax #filter_dns
|
||||||
|
ldy #40
|
||||||
|
jsr get_filtered_input
|
||||||
|
bcs @get_filename
|
||||||
|
jsr rename_file
|
||||||
|
|
||||||
|
|
||||||
rts
|
rts
|
||||||
@error:
|
@error:
|
||||||
@ -326,10 +337,13 @@ xmodem_download:
|
|||||||
jmp wait_for_keypress
|
jmp wait_for_keypress
|
||||||
|
|
||||||
open_dl_file:
|
open_dl_file:
|
||||||
lda #fname_end-fname
|
lda #temp_filename_end-temp_filename_start
|
||||||
ldx #<fname
|
ldx #<temp_filename_start
|
||||||
ldy #>fname
|
ldy #>temp_filename_start
|
||||||
|
|
||||||
|
|
||||||
|
open_file:
|
||||||
|
;A,X,Y set up ready for a call to SETNAM for file #2
|
||||||
jsr $FFBD ; call SETNAM
|
jsr $FFBD ; call SETNAM
|
||||||
lda #$02 ; file number 2
|
lda #$02 ; file number 2
|
||||||
.import cfg_default_drive
|
.import cfg_default_drive
|
||||||
@ -373,6 +387,66 @@ close_file:
|
|||||||
rts
|
rts
|
||||||
|
|
||||||
|
|
||||||
|
rename_file:
|
||||||
|
;AX points at new filename
|
||||||
|
stax copy_src
|
||||||
|
ldx #0
|
||||||
|
ldy #0
|
||||||
|
;first the "RENAME0:"
|
||||||
|
|
||||||
|
:
|
||||||
|
lda rename_cmd,y
|
||||||
|
sta command_buffer,x
|
||||||
|
inx
|
||||||
|
iny
|
||||||
|
cmp #':'
|
||||||
|
bne :-
|
||||||
|
|
||||||
|
;now the new filename
|
||||||
|
ldy #0
|
||||||
|
:
|
||||||
|
lda (copy_src),y
|
||||||
|
beq @end_of_new_filename
|
||||||
|
sta command_buffer,x
|
||||||
|
inx
|
||||||
|
iny
|
||||||
|
bne :-
|
||||||
|
@end_of_new_filename:
|
||||||
|
|
||||||
|
;now the "="
|
||||||
|
lda #'='
|
||||||
|
sta command_buffer,x
|
||||||
|
inx
|
||||||
|
|
||||||
|
;now the old filename
|
||||||
|
ldy #0
|
||||||
|
:
|
||||||
|
lda temp_filename,y
|
||||||
|
cmp #','
|
||||||
|
beq @end_of_old_filename
|
||||||
|
sta command_buffer,x
|
||||||
|
inx
|
||||||
|
iny
|
||||||
|
bne :-
|
||||||
|
@end_of_old_filename:
|
||||||
|
txa ;filename length
|
||||||
|
ldx #<command_buffer
|
||||||
|
ldy #>command_buffer
|
||||||
|
|
||||||
|
jsr $FFBD ; call SETNAM
|
||||||
|
lda #$0F ; filenumber 15
|
||||||
|
ldx cfg_default_drive
|
||||||
|
ldy #$0F ; secondary address 15
|
||||||
|
jsr $FFBA ; call SETLFS
|
||||||
|
jsr $FFC0 ; call OPEN
|
||||||
|
lda #$0F ; filenumber 15
|
||||||
|
jsr $FFC3 ; call CLOSE
|
||||||
|
rts
|
||||||
|
|
||||||
|
rename_cmd:
|
||||||
|
.byte "RENAME0:"
|
||||||
|
; FOO.BAR=0:XMODEM.TMP"
|
||||||
|
|
||||||
exit_telnet:
|
exit_telnet:
|
||||||
exit_gopher:
|
exit_gopher:
|
||||||
jsr setup_screen
|
jsr setup_screen
|
||||||
@ -391,7 +465,6 @@ main_menu_msg:
|
|||||||
.byte 0
|
.byte 0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
telnet_menu_msg:
|
telnet_menu_msg:
|
||||||
.byte 10,10,10
|
.byte 10,10,10
|
||||||
.byte "F1: D/L File (XMODEM)",10
|
.byte "F1: D/L File (XMODEM)",10
|
||||||
@ -402,7 +475,9 @@ telnet_header: .byte "telnet",10,0
|
|||||||
|
|
||||||
opening_file:
|
opening_file:
|
||||||
.byte 10,"opening file",10,0
|
.byte 10,"opening file",10,0
|
||||||
|
transfer_complete:
|
||||||
|
.byte "transfer complete.",10,0
|
||||||
|
prompt_for_filename: .byte "save file as?",10,0
|
||||||
current:
|
current:
|
||||||
.byte "current ",0
|
.byte "current ",0
|
||||||
|
|
||||||
@ -412,8 +487,10 @@ new:
|
|||||||
resolving:
|
resolving:
|
||||||
.byte "resolving ",0
|
.byte "resolving ",0
|
||||||
|
|
||||||
fname: .byte "@0:XMODEM.TMP,P,W" ; @0: means 'overwrite if existing', ',P,W' is required to make this an output file
|
temp_filename_start: .byte "@"
|
||||||
fname_end:
|
temp_filename:
|
||||||
|
.byte "0:XMODEM.TMP,P,W" ; @0: means 'overwrite if existing', ',P,W' is required to make this an output file
|
||||||
|
temp_filename_end:
|
||||||
.byte 0
|
.byte 0
|
||||||
|
|
||||||
credits:
|
credits:
|
||||||
@ -436,7 +513,7 @@ temp_text_fore: .res 1
|
|||||||
temp_page_zero_vars: .res $28
|
temp_page_zero_vars: .res $28
|
||||||
temp_screen_chars: .res $400
|
temp_screen_chars: .res $400
|
||||||
temp_colour_ram: .res $400
|
temp_colour_ram: .res $400
|
||||||
|
command_buffer: .res $80
|
||||||
;-- LICENSE FOR kipperterm.s --
|
;-- LICENSE FOR kipperterm.s --
|
||||||
; The contents of this file are subject to the Mozilla Public License
|
; The contents of this file are subject to the Mozilla Public License
|
||||||
; Version 1.1 (the "License"); you may not use this file except in
|
; Version 1.1 (the "License"); you may not use this file except in
|
||||||
|
Loading…
Reference in New Issue
Block a user