convert filenames in tftp lists from ascii to native, but assume filenames on disk are already in native format

git-svn-id: http://svn.code.sf.net/p/netboot65/code@206 93682198-c243-4bdb-bd91-e943c89aac3b
This commit is contained in:
jonnosan 2009-10-20 10:36:09 +00:00
parent c4772efba2
commit cf87a8c3ac
5 changed files with 25 additions and 9 deletions

View File

@ -122,6 +122,8 @@ jmp ip65_process ;KPR_PERIODIC_PROCESSING_VECTOR : routine to be period
cold_init:
jsr init_tod
;first let the kernal do a normal startup
sei
jsr $fda3 ;initialize CIA I/O
@ -130,7 +132,6 @@ cold_init:
jsr $ff5B ;init. VIC
cli ;KERNAL init. finished
jsr init_tod
warm_init:
;set some funky colours
@ -207,6 +208,11 @@ main_menu:
@get_key:
jsr get_key_ip65
pha
jsr print_hex
pla
cmp #KEYCODE_F1
bne @not_f1
jmp @tftp_boot
@ -246,7 +252,7 @@ main_menu:
cmp #KEYCODE_F7
beq @change_config
jmp @get_key
@exit_to_prog:
@ -500,7 +506,7 @@ get_tftp_directory_listing:
ldax #directory_buffer
ldy #1 ;filenames will be ASCII
jsr select_option_from_menu
bcc @tftp_filename_set
rts
@ -573,7 +579,7 @@ disk_boot:
ldax #directory_buffer
ldy #0 ;filenames will NOT be ASCII
jsr select_option_from_menu
bcc @disk_filename_set
jmp main_menu

View File

@ -216,6 +216,7 @@ get_tftp_directory_listing:
@loop_till_filename_entered:
ldax #directory_buffer
ldy #1 ;filenames will be ASCII
jsr select_option_from_menu
bcs @loop_till_filename_entered
@tftp_filename_set:

View File

@ -15,16 +15,19 @@ jump_to_prefix: .res 1
last_page_flag: .res 1
get_current_byte: .res 4
convert_to_native: .res 1
.code
;on entry, AX should point to the list of null terminated option strings to be selected from
;Y should be 1 if menu items are in ASCII, 0 if they are in native char format
;on exit, AX points to the selected string
;carry is set of QUIT was selected, clear otherwise
select_option_from_menu:
sty convert_to_native
stax options_table_pointer
stax get_current_byte+1
;set the 'LDA' and RTS' opcodes for the 'get current byte' subroutine, which is self-modified-code, hence must be located in RAM not ROM
@ -138,8 +141,14 @@ select_option_from_menu:
lda get_current_byte+1
ldx get_current_byte+2
ldy convert_to_native
beq :+
jsr print_ascii_as_native
jmp @printed
:
jsr print
@printed:
jsr print_cr
jsr @skip_past_next_null_byte
inc current_option

View File

@ -1 +1 @@
.byte "0.9.35"
.byte "0.9.37"

View File

@ -1 +1 @@
0.9.35
0.9.37