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
1.5 KiB
NASM
1 line
1.5 KiB
NASM
include 'all.macros'
|
|
include 'e16.locator'
|
|
|
|
|
|
MMLoader PROC
|
|
|
|
bra RealStart
|
|
|
|
|
|
|
|
True equ $FFFF
|
|
False equ 0
|
|
|
|
|
|
|
|
TheUserID equ $4014
|
|
TheToolNumber equ $14
|
|
TheName str '1/tool020'
|
|
|
|
RealStart
|
|
|
|
|
|
;-----------------------------------------------------------
|
|
;
|
|
; Brk if necessary
|
|
;
|
|
lda >$C062
|
|
and #$0080
|
|
beq @NoBreak
|
|
brk 17
|
|
@NoBreak
|
|
|
|
|
|
|
|
;-----------------------------------------------------------
|
|
;
|
|
; Set dbr
|
|
;
|
|
|
|
phk
|
|
plb
|
|
|
|
|
|
;-----------------------------------------------------------
|
|
;
|
|
; Unload last patch
|
|
;
|
|
|
|
pha ; space for result
|
|
PushWord #TheUserID
|
|
PushWord #0
|
|
_UserShutdown
|
|
|
|
pla
|
|
|
|
;-----------------------------------------------------------
|
|
;
|
|
; Load the new one
|
|
;
|
|
|
|
|
|
pha ; space for dir page stack size
|
|
pha ; space for addr of dir page stack seg
|
|
pha ; space for starting addr
|
|
pha
|
|
pha ; space for user id
|
|
PushWord #TheUserID ; user id
|
|
PushLong #TheName ; ptr to path name
|
|
PushWord #True
|
|
_InitialLoad
|
|
bcs Die
|
|
|
|
pla ; ignore userid
|
|
pla ; put starting address
|
|
sta TableAddress
|
|
pla
|
|
sta TableAddress+2
|
|
pla ; ignore dir page
|
|
pla ; ignore dir page size
|
|
|
|
|
|
;-----------------------------------------------------------
|
|
;
|
|
; Install
|
|
;
|
|
PushWord #0 ; system call
|
|
PushWord #TheToolNumber ; install the patch
|
|
PushLong TableAddress
|
|
_SetTSPtr
|
|
|
|
_SetDefaultTPT
|
|
|
|
;-----------------------------------------------------------
|
|
;
|
|
; Quit
|
|
_Quit QuitParams
|
|
|
|
|
|
QuitParams DC.L 0
|
|
DC.W 0
|
|
|
|
|
|
TableAddress DS.B 4
|
|
|
|
|
|
|
|
|
|
|
|
Die ;
|
|
pha
|
|
PushLong #ErrorString
|
|
_SysFailMgr
|
|
|
|
ErrorString str 'Could not load. Error was $'
|
|
|
|
ENDP
|
|
|
|
END |