mirror of
https://github.com/marketideas/qasm.git
synced 2026-10-24 22:02:28 +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
3.6 KiB
Plaintext
1 line
3.6 KiB
Plaintext
;====================================================================================================
|
|
;Direct page equates used by Loaders
|
|
;====================================================================================================
|
|
|
|
DirectPage Record 0
|
|
;
|
|
; System Loader's Zero Page
|
|
;
|
|
TempZero ds.l 2 ;temporary use only
|
|
Handle ds.l 2 ;temporary handle
|
|
Pointer ds.l 1 ;temporary pointer
|
|
Counter ds.l 1 ;temporary counter
|
|
TempBuff ds.l 1 ;address of temporary buffer
|
|
Pass ds.w 1 ;current Loader Pass
|
|
Pass2_Needed ds.w 1 ;pass 2 needed flag
|
|
CFileNum ds.w 1 ;current File Number
|
|
CSegNum ds.w 1 ;current Segment Number
|
|
CAddress ds.l 1 ;current Segment Address
|
|
FileBuff ds.l 1 ;address of File Buffer (same as Global)
|
|
Op_Mark ds.l 1 ;File Mark of current OP code
|
|
MarkList ds.l 1 ;address of Mark List
|
|
FirstMemSeg ds.l 1 ;handle of 1st Memory Segment entry
|
|
Memory_Load ds.w 1 ;loading from memory requested
|
|
Keep_Open ds.w 1 ;keep Load File open
|
|
Segment_Skipped ds.w 1 ;a Load Segment was skipped during Initial Load
|
|
|
|
;
|
|
; ExpressLoad's direct page
|
|
;
|
|
HET_ptr ds.l 1 ;points the header entry table
|
|
HET_entry_ptr ds.l 1 ;points to an entry in the HET
|
|
temp_handle ds.l 1 ;temp area used for handles
|
|
base_ptr ds.l 1 ;points to a segment in memory.
|
|
seg_header_ptr ds.l 1 ;points to a segment header
|
|
reloc_dict_ptr ds.l 1 ;points to the relocation dictionary
|
|
patch_cnt ds.w 1 ;word that contains the patch count
|
|
shift_cnt ds.w 1 ;word that contains the shift count
|
|
patch_ptr ds.l 1 ;address that we have to patch
|
|
patch_value ds.l 1 ;value that we patch with
|
|
temp_ptr ds.l 1
|
|
interseg_addr ds.l 1 ;used to patch the segments
|
|
super_size ds.w 1 ;size of the super record
|
|
cnt_word ds.w 1
|
|
super_ptr ds.l 1 ;used to relocate a super record
|
|
temp_word ds.w 1
|
|
segment_base ds.l 1 ;base address of other segment
|
|
user_id_handle ds.l 1 ;handle to User ID list
|
|
user_id_ptr ds.l 1
|
|
temp_long ds.l 1
|
|
path_ptr ds.l 1 ;points to a GString output buffer
|
|
ExpressHandle ds.l 1 ;Handle to ExpressHeader
|
|
jmp_tbl_ptr ds.l 1 ;pointer to the Jump_table Entry
|
|
reloc_handle ds.l 1 ;handle to the relocation dictionary
|
|
seg_handle ds.l 1 ;handle to the segment in memory
|
|
curr_id_handle ds.l 1 ;Handle to ID list
|
|
segment_entry ds.l 1 ;entry point inside the segment
|
|
|
|
hold_long ds.l 1 ;used by unload segment
|
|
partial_match ds.w 1 ;used by rename
|
|
local_mark ds.l 1 ;our current mark in the file
|
|
id_flag ds.w 1 ;used by delete_user_id.
|
|
search_seg ds.w 1
|
|
jmp_patch_value ds.l 1
|
|
spec_mem_flag ds.w 1 ;special memory flag used by Initial load
|
|
file_open ds.w 1 ;flag used to indicate that the load file is open
|
|
LConst_Size ds.l 1 ;size of the segment
|
|
seg_kind ds.w 1 ;used by conv_attributes
|
|
search_addr ds.l 1 ;used by allocate lconst routine
|
|
org_address ds.l 1
|
|
loaded_seg_num ds.w 1 ;segment just loaded
|
|
search_kind ds.w 1 ;used by find segment
|
|
kind_mask ds.w 1 ;AND mask used by find segment
|
|
flags_mask ds.w 1 ;flags used by find segment
|
|
stack ds.w 1 ;holds stack pointer
|
|
|
|
|
|
;
|
|
; shared-use direct page
|
|
;
|
|
PathnamePtr ds.l 1 ;points to current full, expanded pathname
|
|
save_statereg ds.w 1 ;use to save state register during JumpLoad
|
|
free_mem_size ds.l 1
|
|
mem_attr ds.w 1 ;memory attributes used when allocating a segment
|
|
stack_addr ds.w 1
|
|
stack_size ds.w 1
|
|
mm_attr ds.w 1
|
|
|
|
input_parms ds.b max_input ;maximum size of input parameters on any call
|
|
|
|
dp_end equ *
|
|
if (dp_end MOD 2) <> 0 then
|
|
ds.b 1 ;make it an even # of bytes
|
|
endif
|
|
dir_page_size equ * ;Size MUST be EVEN EVEN EVEN EVEN EVEN EVEN
|
|
if dir_page_size > 256 then
|
|
aerror 'Direct page too large.'
|
|
endif
|
|
endr
|
|
|