mirror of
https://github.com/elliotnunn/supermario.git
synced 2024-12-01 18:50:30 +00:00
152 lines
4.6 KiB
Plaintext
152 lines
4.6 KiB
Plaintext
|
;
|
||
|
; File: PPCGlue.a
|
||
|
;
|
||
|
; Contains: PPC Toolbox Glue Library
|
||
|
;
|
||
|
; Written by: Victor Chang, Sangam, and Eric M. Trehus
|
||
|
;
|
||
|
; Copyright: © 1989-1992 by Apple Computer, Inc. All rights reserved.
|
||
|
;
|
||
|
; This file is used in these builds: BigBang
|
||
|
;
|
||
|
; Change History (most recent first):
|
||
|
;
|
||
|
; <SM2> 10/28/92 SWC Changed INCLUDEs to a LOAD of StandardEqu.d.
|
||
|
; <8> 12/13/90 EMT <JSM> Change glue to support the standard calling conventions.
|
||
|
; Removed glue for PromptForUser.
|
||
|
; <7> 10/2/90 JAL Removed debugger symbols, changed adda.l to LEA.
|
||
|
; <6> 9/18/90 gbm Add an END statement to this file, to avoid warnings... also
|
||
|
; terrorized it a little
|
||
|
; <5> 9/15/90 JSM Should be adding instead of subtracting when cleaning up
|
||
|
; parameters after non-PB calls, remove glue for internal
|
||
|
; routines.
|
||
|
; <4> 9/14/90 VC DeleteUserIdentity now takes a parameter of unsigned long, so we
|
||
|
; need to remove 4 bytes from the stack before returning.
|
||
|
; <3> 8/10/90 S Fix glue for CloseAcceptedsessions and CountAcceptedSessions.
|
||
|
; <3> 8/10/90 S Fix glue for closeacceptednetworksessions.
|
||
|
; <2> 5/31/90 EMT Added glue code for new internal calls
|
||
|
; PPCCountAcceptedNetworkSessions and PPCCloseUserSessions
|
||
|
; <1.2> 11/28/89 CVC Added the StartSecureSession call.
|
||
|
; <1.1> 11/2/89 CVC Added access control calls.
|
||
|
; <1.0> 9/18/89 CVC Adding PPC toolbox for the first time.
|
||
|
;
|
||
|
|
||
|
BLANKS ON
|
||
|
STRING ASIS
|
||
|
|
||
|
PRINT OFF
|
||
|
LOAD 'StandardEqu.d'
|
||
|
INCLUDE 'PPCToolBox.a'
|
||
|
INCLUDE 'PPCPriv.a'
|
||
|
PRINT ON
|
||
|
|
||
|
EJECT
|
||
|
|
||
|
MACRO
|
||
|
PPCCall
|
||
|
MOVEQ &SYSLIST[1],D0 ;set the cmd code.
|
||
|
Move.L (SP)+,A1 ;get return address
|
||
|
Move.B (SP)+,D1 ;Get ASync flag.
|
||
|
Move.L (SP)+,A0 ;get param pointer.
|
||
|
BNE.S @1 ;do it the other way
|
||
|
DC.W $A0DD ;tell OS to do it Synchronously
|
||
|
BRA.S @2 ;skip around async call
|
||
|
@1 DC.W $A4DD ;Tell OS to do it Asynchronously
|
||
|
@2 Move.W D0,(SP) ;save result
|
||
|
Jmp (A1) ;return to caller
|
||
|
ENDM
|
||
|
|
||
|
;
|
||
|
; FUNCTION PPCInit (): OsErr;
|
||
|
; FUNCTION PPCOpen (ppcPb: PPCParamBlkPtr, aSync: BOOLEAN): OsErr;
|
||
|
; Function PPCInform(ppcPb: PPCParamBlkPtr, aSync: BOOLEAN): OsErr;
|
||
|
; FUNCTION PPCStart (ppcPb: PPCParamBlkPtr, aSync: BOOLEAN): OsErr;
|
||
|
; FUNCTION PPCAccept (ppcPb: PPCParamBlkPtr, aSync: BOOLEAN): OsErr;
|
||
|
; FUNCTION PPCReject (ppcPb: PPCParamBlkPtr, aSync: BOOLEAN): OsErr;
|
||
|
; FUNCTION PPCWrite (ppcPb: PPCParamBlkPtr, aSync: BOOLEAN): OsErr;
|
||
|
; FUNCTION PPCRead (ppcPb: PPCParamBlkPtr, aSync: BOOLEAN): OsErr;
|
||
|
; FUNCTION PPCEnd (ppcPb: PPCParamBlkPtr, aSync: BOOLEAN): OsErr;
|
||
|
; FUNCTION PPCClose (ppcPb: PPCParamBlkPtr, aSync: BOOLEAN): OsErr;
|
||
|
; FUNCTION IPCListPorts (ppcPb: PPCParamBlkPtr, aSync: BOOLEAN): OsErr;
|
||
|
;
|
||
|
|
||
|
PPCOpen PROC EXPORT
|
||
|
PPCCall #ppcOpenCmd
|
||
|
|
||
|
PPCStart PROC EXPORT
|
||
|
PPCCall #ppcStartCmd
|
||
|
|
||
|
PPCInform PROC EXPORT
|
||
|
PPCCall #ppcInformCmd
|
||
|
|
||
|
PPCAccept PROC EXPORT
|
||
|
PPCCall #ppcAcceptCmd
|
||
|
|
||
|
PPCReject PROC EXPORT
|
||
|
PPCCall #ppcRejectCmd
|
||
|
|
||
|
PPCWrite PROC EXPORT
|
||
|
PPCCall #ppcWriteCmd
|
||
|
|
||
|
PPCRead PROC EXPORT
|
||
|
PPCCall #ppcReadCmd
|
||
|
|
||
|
PPCEnd PROC EXPORT
|
||
|
PPCCall #ppcEndCmd
|
||
|
|
||
|
PPCClose PROC EXPORT
|
||
|
PPCCall #ppcCloseCmd
|
||
|
|
||
|
IPCListPorts PROC EXPORT
|
||
|
PPCCall #IPCListPortsCmd
|
||
|
|
||
|
;
|
||
|
; pascal OSErr PromptForUserIdentity ( UserRefNum *userRef,
|
||
|
; Name *userName,
|
||
|
; Boolean *guestSelected,
|
||
|
; Boolean allowGuest,
|
||
|
; Str255 prompt);
|
||
|
|
||
|
;
|
||
|
; pascal OSErr DeleteUserIdentity ( UserRefNum userRef);
|
||
|
;
|
||
|
; pascal OSErr GetDefaultUser ( UserRefNum *userRef,
|
||
|
; Name *userName);
|
||
|
|
||
|
;pascal OSErr StartSecureSession ( PPCStartParam startPb,
|
||
|
; StringPtr userName,
|
||
|
; Boolean useDefault,
|
||
|
; Boolean allowGuest,
|
||
|
; Boolean *guestSelected,
|
||
|
; StringPtr prompt);
|
||
|
;
|
||
|
DeleteUserIdentity PROC EXPORT
|
||
|
Move.L (SP)+,A1 ;get return address
|
||
|
Move.L SP,A0 ;A0 points to parameters on the stack
|
||
|
Moveq #DeleteUserCmd,D0
|
||
|
DC.W $A0DD
|
||
|
Addq.L #4,SP
|
||
|
Move.W D0,(SP)
|
||
|
Jmp (A1)
|
||
|
|
||
|
;
|
||
|
GetDefaultUser PROC EXPORT
|
||
|
Move.L (SP)+,A1 ;get return address
|
||
|
Move.L SP,A0 ;A0 points to parameters on the stack
|
||
|
Moveq #GetDefaultUserCmd,D0
|
||
|
DC.W $A0DD
|
||
|
Addq.L #8,SP
|
||
|
Move.W D0,(SP)
|
||
|
Jmp (A1)
|
||
|
;
|
||
|
StartSecureSession PROC EXPORT
|
||
|
Move.L (SP)+,A1 ;get return address
|
||
|
Move.L SP,A0 ;A0 points to parameters on the stack
|
||
|
Moveq #StartSecureCmd,D0
|
||
|
DC.W $A0DD
|
||
|
LEA 20(SP),SP
|
||
|
Move.W D0,(SP)
|
||
|
Jmp (A1)
|
||
|
|
||
|
END
|