mac-rom/OS/NetBoot/ATBootUtils.a
Elliot Nunn 4325cdcc78 Bring in CubeE sources
Resource forks are included only for .rsrc files. These are DeRezzed into their data fork. 'ckid' resources, from the Projector VCS, are not included.

The Tools directory, containing mostly junk, is also excluded.
2017-12-26 09:52:23 +08:00

102 lines
2.9 KiB
Plaintext

;EASE$$$ READ ONLY COPY of file ÒATBootUtils.aÓ
; 1.1 PWD 12/12/1989 Added support for self-authenticating images
; 1.0 PWD 10/30/1989 Adding to EASE
; END EASE MODIFICATION HISTORY
INCLUDE 'SysEqu.a' ; System definitions
INCLUDE 'SysErr.a' ; System errors
; for the glue...
INCLUDE 'ToolEqu.a' ; Toolbox definitions
INCLUDE 'Traps.a' ; Traps definitions
INCLUDE 'SlotEqu.a'
;
; from IOTRAPS.TEXT -- Mac OS IO Interface routines for Pascal
;
; Argument- A0: param: Points to Parameter block.
;
; Results- D0: ec: error code.
; <0: OS Call failed.
; 0: All is well.
; Registers- D0: ec: error code
; A0: param: Paramater list address.
; A1: ra: Return Address.
;
MACRO
OsCall
Move.L (SP)+,A1 ;get return address
.**** check this out thoroughly before changing
Move.B (SP)+,D0 ;Get ASync flag. (why was this a word?)
Move.L (SP)+,A0 ;get param pointer.
BNE.S @1
.*
&SysLst[1] ;tell OS to do it Synchronously
BrA.S @2
.*
@1 &SysLst[1] ,async ;Tell OS to do it Asynchronously
@2 Move.W D0,(SP) ;save result
Jmp (A1) ;return to caller
ENDM
; This macro pops the return address into A1, then gets the parameter
; block pointer and puts it into A0. The selector value is passed to the
; macro and put into D0. Then the Slot Manager is called. Status returned
; in D0 is pushed on the stack. Return is made via a JMP (A1).
MACRO
SlotManager
MOVE.L (SP)+,A1 ;get return address
MOVE.L (SP)+,A0 ;get param block ptr
MOVEQ #&SYSLIST[1],D0 ;put selector in D0
_SlotManager
MOVE.W D0,(SP) ;push status
JMP (A1) ;return
ENDM
;FUNCTION ATSReadDrvrName(spBlkPtr: SpBlockPtr): OSErr;
ATSReadDrvrName FUNC EXPORT
_sReadDrvrName EQU $19
SlotManager _sReadDrvrName
ATSNextTypesRsrc FUNC EXPORT
_sNextTypesRsrc EQU $15
SlotManager _sNextTypesRsrc
;FUNCTION ATOpenSlot(paramBlock: ParmBlkPtr; aSync: BOOLEAN): OSErr;
MACRO
OSICall
Move.L (SP)+,A1 ;get return address
.**** check this out thoroughly before changing
Move.B (SP)+,D0 ;Get ASync flag. (why was this a word?)
Move.L (SP)+,A0 ;get param pointer.
BNE.S @1
.*
&SysLst[1] ,immed ;IMMED = special open for slot devices
BrA.S @2
.*
@1 &SysLst[1] ,async+immed ;no reason they can't be async.
@2 Move.W D0,(SP) ;save result
Jmp (A1) ;return to caller
ENDM
ATOpenSlot PROC EXPORT
OSICall _Open
ATPBControl PROC EXPORT
OsCall _Control
ENDP
ATPBOpen PROC EXPORT
OsCall _Open
ENDP
_EndATDrvr PROC EXPORT
ENDP
END