Files
Shawn Quick dfcaae62dd Add qlink, the disk tools, and a bootable ProDOS 8 image.
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.
2026-10-16 14:41:55 -07:00

1 line
4.8 KiB
NASM

title 'Standard File'
**********************************************************************
*
* Standard File
*
* Copyright (c) Apple Computer, Inc. 1988-92
* All Rights Reserved
*
*
* 5/10/89 Mensch
* Made status return the status.
*
* 8/25/89 Yee
* Change the verison from $0301 to $8302.
*
* 18-Nov-90 Dave Lyons
* Changed version from $0302 to $8303.
*
* 5-Feb-92 Dave Lyons
*
* Version $0303.
*
**********************************************************************
*
* 17-Feb-92 Dave Lyons
*
* Version $8304 for 6.1d1.
*
* 2-Apr-93 Steve Stephenson
*
* Version $0304 for 6.0.1 (final)
*
**********************************************************************
print push
print off
INCLUDE 'all.macros'
INCLUDE 'E16.EVENT'
include 'e16.dialog'
INCLUDE 'E16.LIST'
INCLUDE '::sys.equs.asm'
INCLUDE 'GlobalEqu.aii'
print pop
string asis
SFVersionNumber equ $0304 ;2-Apr-93 SS
SystemTool equ $0000
SfToolNumber equ $0017
SFCallTable PROC
TheStart
dc.L (TheEnd-TheStart)/4
dc.L SFBootInit-1 ;$0117
dc.L SFStartup-1 ;$0217
dc.L SFShutdown-1 ;$0317
dc.L SFVersion-1 ;$0417
dc.L SFReset-1 ;$0517
dc.L SFStatus-1 ;$0617
dc.L SFReserved-1 ;$0717
dc.L SFReserved-1 ;$0817
dc.L SFGetFile-1 ;$0917
dc.L SFPutFile-1 ;$0A17
dc.L SFPGetFile-1 ;$0B17
dc.L SFPPutFile-1 ;$0C17
dc.L SFAllCaps-1 ;$0D17
dc.L SFGetFile2-1 ;$0E17
dc.L SFPutFile2-1 ;$0F17
dc.L SFPGetFile2-1 ;$1017
dc.L SFPPutFile2-1 ;$1117
dc.l SFSetInvisible-1 ;$1217
dc.l SFReScan2-1 ;$1317
dc.l SFMultiGet2-1 ;$1417
dc.l SFPMultiGet2-1 ;$1517
*
* additional new calls will be added here!
*
TheEnd
ENDP
SFAllCaps PROC EXPORT
**********************************************************************
* Takes 1 parameter off stack: But who really cares
* --------------------
* | Flag Value | Word
* --------------------
* | RTL | 3 bytes
* --------------------
* | RTL | 3 Bytes
* --------------------
* | | <- SP
*
**********************************************************************
DefineStack
Rtl1 block 3
Rtl2 block 3
flagval word
ldy #2
ldx #0
jml ToStrip
ENDP
SFBootInit PROC
ENTRY SFReset
SFReset
ENTRY SFReserved
SFReserved
lda #0
clc
rtl
ENDP
SFStartup PROC EXPORT
**********************************************************************
*
* SFStartup
*
* Takes 2 parameters off stack:
* --------------------
* | Direct Page Ptr | Word
* --------------------
* | User ID | Word
* --------------------
* | RTL | 3 bytes
* --------------------
* | RTL | 3 Bytes
* --------------------
* | | <- SP
*
*
**********************************************************************
DefineStack
origD word
Rtl1 block 3
Rtl2 block 3
directpage word
userid word
* lda >$00C061
* and #$0080
* beq @1
* brk $88
*@1
phd
lda directpage,s
*** added 7-Apr-91 DAL
bne @okay
pld
ldx #sfNotStarted
bra @error
@okay
*** end of 7-Apr-91 DAL
tcd ;and set it.
; tdc
jsr SetTheWAP
pha
_ListStatus
plx
bcc @2
PushWord #0028
PushWord #0000
_LoadOneTool ;list manager
@2
_ListStartUp
stz invisible ;default no invisible files
lda userid,s ;get passed id
sta MyID
pld
; ldy #4
; ldx #0
ldx #0
@error ldy #4
jml ToStrip
ENDP
SetTheWAP PROC
PushWord #SystemTool
PushWord #SfToolNumber
pea 0000
pha
_SetWAP
rts
ENDP
SFShutdown PROC
lda #0
jsr SetTheWAP
bra SFBootInit
ENDP
SFVersion PROC
DefineStack
RTL1 block 3
RTL2 block 3
VerResult word
lda #SFVersionNumber
sta VerResult,s
bra SFBootInit
ENDP
SFStatus PROC
; Modified to return the actual status 5/10/89 Mensch
DefineStack
RTL1 block 3
RTL2 block 3
StatResult word
cmp #0
beq NotStarted ; if the WAP is zero, we were not started yet
lda #-1 ; else, we were started
NotStarted
sta StatResult,s
bra SFBootInit
ENDP
SFSetInvisible PROC EXPORT
**********************************************************************
*
* SFSetinvisible
*
* Takes 1 parameters off stack:
* --------------------
* | space for results| Word
* --------------------
* | Flag value | Word
* --------------------
* | RTL | 3 bytes
* --------------------
* | RTL | 3 Bytes
* --------------------
* | | <- SP
*
*
**********************************************************************
DefineStack
origD word
Rtl1 block 3
Rtl2 block 3
invisibleVal word
old_results word
*** added 7-Apr-91 DAL -- make sure we're started
tay
bne @started
ldx #sfNotStarted
bra @error
@started
*** end of 7-Apr-91 DAL
phd
tcd
lda invisible
beq @1
lda #$FFFF ;force all bits on if not 0
@1
sta old_results,s
lda invisibleVal,s
beq @off
lda #0004 ;same bit in AUX type so I can do and AND
@off
sta invisible ;set invisible files
pld
ldx #0
@error ldy #2
; ldy #2
; ldx #0
jml ToStrip
ENDP
END