mirror of
https://github.com/marketideas/qasm.git
synced 2026-10-25 13:02:45 +00:00
Move the assembler to src/qasm. qlink links OMF 1.0 and 2.0 from a script. makeBin flattens a load file, qomf dumps OMF, and qpro builds ProDOS volumes. APW and MPW assemble through the ORCA front end. Relocatable modules emit OMF objects. Listings stay off unless -l is set. make boot assembles the GS/OS 6.0.1 ProDOS 8 kernel and BASIC.SYSTEM into an 800K volume. BASIC.SYSTEM accepts ls and pfx, and its splash reports PRODOS BASIC 2.0, copyright 1983-2026. IIGS.601.SRC is the source and the BASIC.SYSTEM oracle that image is built from.
1 line
4.3 KiB
Plaintext
1 line
4.3 KiB
Plaintext
***********************************************************************************************
|
|
* *
|
|
* DOS 3.3 File System Translator for GS/OS(TM) *
|
|
* *
|
|
* Copyright Apple Computer Inc. 1988 ALL RIGHTS RESERVED *
|
|
* *
|
|
* Identifiers and records. *
|
|
***********************************************************************************************
|
|
|
|
|
|
;definitions of os data structures
|
|
|
|
dsect 0 ;vcr
|
|
vcr_id word
|
|
vcr_name long
|
|
vcr_status word
|
|
vcr_open_cnt word
|
|
vcr_fst_id word
|
|
vcr_dev word
|
|
; fst-specific info here
|
|
vcr_buf_vp long ;vp to directory sectors buffer
|
|
vcr_cat_sec_count word ;number of catalog sectors
|
|
|
|
vcr_size block 0
|
|
|
|
|
|
dsect 0 ;fcr structure
|
|
fcr_ref_num word
|
|
fcr_path_name long
|
|
fcr_fst_id word
|
|
fcr_vcr_id word
|
|
fcr_level word
|
|
fcr_newline long
|
|
fcr_newline_len word
|
|
fcr_mask word
|
|
fcr_access word
|
|
; fst-specific info here
|
|
fcr_buf_vp long ;vp to info sector buffer
|
|
fcr_eof long
|
|
fcr_aux word
|
|
fcr_mark long
|
|
fcr_type word ;GS/OS filetype
|
|
fcr_dos_type word ;old DOS 3.3 filetype
|
|
fcr_blks_used long
|
|
fcr_entry_num block 0 ;for a directory file, number of current valid entry
|
|
fcr_cat_sec word ;number of the directory sector in which the file'sÉ
|
|
;Éfde resides
|
|
fcr_fde_num word ;number of the fde entry within the directory sector
|
|
fcr_tot_ent block 0 ;for a directory file, the total # of active entries
|
|
fcr_data_sect word ;track/sector presently in high page of buffer
|
|
|
|
fcr_size block 0
|
|
|
|
|
|
;storage on direct page for the ENTIRE FST
|
|
;fst's share the space $80-$D3 on the GS/OS(TM) direct page.
|
|
|
|
dsect $80
|
|
gen_buf_ptr long
|
|
volname_buf_ptr long
|
|
vcr_ptr long
|
|
vol_buf_ptr long
|
|
fcr_ptr long
|
|
old_fcr_ptr long
|
|
fcr_buf_ptr long
|
|
fcr_name_ptr long
|
|
str1_ptr long
|
|
str2_ptr long
|
|
fde_ptr long
|
|
namegen_ptr word
|
|
src_scratch block 0 ;shared with ptr1
|
|
ptr1 long
|
|
file_name_ptr word
|
|
user_ptr long
|
|
vol_name_ptr word
|
|
nl_list_ptr long
|
|
nl_msk word
|
|
nl_char word
|
|
fill_tabl word
|
|
clear_ctr word
|
|
|
|
direct_end block 0 ;dummy end marker
|
|
|
|
if direct_end < $D5 goto .ok
|
|
aerror '### ERROR: Direct page storage overflow'
|
|
.ok anop
|
|
;structures native to the DOS 3.3 disk format
|
|
|
|
dsect 0 ;fde entry
|
|
fde_ts_link word
|
|
fde_type byte
|
|
fde_name block 30
|
|
fde_sec_used word
|
|
|
|
fde_len block 0
|
|
|
|
dsect 0 ;track/sector list sector
|
|
block 1 ;not used
|
|
ts_link word
|
|
block 2 ;not used
|
|
ts_sec_offset word
|
|
block 5 ;not used
|
|
ts_list_start block 0
|
|
|
|
|
|
dsect 0 ;vtoc
|
|
block 1 ;not used
|
|
vtoc_cat_link word ;track/sector of 1st directory sector
|
|
vtoc_dos_rel byte ;DOS release number
|
|
block 2 ;not used
|
|
vtoc_vol_num byte ;volume number
|
|
block 32 ;spares--not used
|
|
vtoc_max_ts byte
|
|
block 8 ;not used
|
|
block 2 ;allocation algorithm bytes
|
|
block 2 ;not used
|
|
vtoc_tracks byte ;tracks per diskette
|
|
vtoc_sectors byte ;sectors per track
|
|
vtoc_bytes_sec word ;number of bytes per sector
|
|
vtoc_bitmap block 0 ;start of the vtoc bitmap
|
|
|
|
|
|
base_fde equ $B ;offset to 1st fde in a catalog sector
|
|
max_fde equ 7 ;7 fde's in a catalog sector
|
|
|
|
|
|
|
|
;constants used by the fst
|
|
|
|
my_id equ 2 ;fst id
|
|
cat_strt_off equ $100 ;offset to 1st catalog sector in the general buffer
|
|
alpha_len_limit equ 15 ;longest alpha part of generated disk name
|
|
namegen_mask equ $7F ;just in case we don't like some of the bits in ROM names
|
|
namegen_limit equ $C0 ;boundry ASCII value for terminator characters
|
|
gen_buf_size equ $100 * 16 ;buffer for 16 disk sectors
|
|
;vol_buf_size equ $100 * 2 ;buffer for vtoc & 1st catalog sector
|
|
file_buf_size equ $100 * 2 ;buffer for 2 "info" sectors
|
|
name_buf_len equ 50
|
|
max_cat_sec equ 15 ;maximum # of directory sectors to read in
|
|
access_locked equ $01 ;equivalent GS/OS access value for a locked DOS file
|
|
access_unlocked equ $C3 ;equivalent GS/OS access value for an unlocked DOS file
|
|
storage_type equ $0001 ;GS/OS storage type for all DOS 3.3 files
|
|
vol_max_char equ 20 ;maximum number of characters in a volume name
|
|
fn_max_char equ 30 ;maximum number of characters in a filename
|
|
move_info_be equ 100 ;break-even point for moving bytes by hand rather thanÉ
|
|
;Éwith move_info |