Check file types.

This commit is contained in:
Joshua Bell 2020-02-22 10:48:10 -08:00
parent fcaa3569d5
commit 7034d75f01
2 changed files with 26 additions and 0 deletions

View File

@ -22,3 +22,5 @@ This repro includes a `BASIS.SYSTEM` implementation that takes the passed file a
* ... * ...
And then Bitsy Bye will be able to launch them. And then Bitsy Bye will be able to launch them.
If invoked on a file type other than $F1...$F4 it will QUIT back to ProDOS.

View File

@ -69,6 +69,20 @@ reloc_start:
launcher_filename: launcher_filename:
PASCAL_STRING "DOS3.3.LAUNCHER" PASCAL_STRING "DOS3.3.LAUNCHER"
.proc get_file_info_params
param_count: .byte $A
pathname: .addr filename_buffer
access: .byte 0
file_type: .byte 0
aux_type: .word 0
storage_type: .byte 0
blocks_used: .word 0
mod_date: .word 0
mod_time: .word 0
create_date: .word 0
create_time: .word 0
.endproc
.proc open_params .proc open_params
param_count: .byte 3 param_count: .byte 3
path: .addr launcher_filename path: .addr launcher_filename
@ -97,6 +111,16 @@ pathname: .addr launcher_prefix
newstart: newstart:
;;; Check file type is in $F1...$F4
MLI_CALL GET_FILE_INFO, get_file_info_params
bcs quit
lda get_file_info_params::file_type
cmp #$F1
bcc quit
cmp #$F4+1
bcs quit
;;; Find DOS3.3.LAUNCHER ;;; Find DOS3.3.LAUNCHER
check_for_launcher: check_for_launcher: