mirror of
https://github.com/elliotnunn/supermario.git
synced 2024-11-26 16:49:18 +00:00
174 lines
4.6 KiB
Plaintext
174 lines
4.6 KiB
Plaintext
;
|
|
; File: ConnectionMgrExtensionsGlue.a
|
|
;
|
|
; Contains: Glue to the Connection Manager Extensions
|
|
;
|
|
; Written by: Byron Han
|
|
;
|
|
; Copyright: © 1988-1990 by Apple Computer, Inc., all rights reserved.
|
|
;
|
|
; This file is used in these builds: BigBang
|
|
;
|
|
; Change History (most recent first):
|
|
;
|
|
; <10> 7/10/91 BH remove FakeXXXX garbage to avoid duplicate wierd symbols in
|
|
; object file - now use Lib in SysObj.make
|
|
; <9> 7/1/91 BH fix gestalt selector calling - it is not register based. also
|
|
; added fix to CMGetErrorString glue to automatically clear the
|
|
; returned string to fix bug in CommToolboxCore.c
|
|
; <8> 6/28/91 BH oops - CMDisposeIOPB was CMDisposeOIPB. Now fixed.
|
|
; <7> 6/26/91 BH remove wierd async open /listen calls
|
|
; <6> 1/14/91 CP Call Getstalt instead of CMGetCMVersion <BBH>
|
|
; <5> 1/14/91 CP ;Removed CMConnectPrep and added CMListenPrep and CMOpenPrep.
|
|
; ;Renamed CMFreeIORec to CMDisposeIOPB.
|
|
; ;Renamed CMAllocateIORec to CMNewIOPB.
|
|
; ;Removed param block from CMPBAccept, CMPBListen, CMPBClose,
|
|
; CMPBOpen, and CMConnectCleanup.
|
|
; ;Added async, completor, and timeout parameters to CMListenPrep
|
|
; and CMOpenPrep.
|
|
; ;Renamed CMIORec to CMIOPB <BBH>
|
|
; <4> 11/27/90 kaz Renaming CMHCalls to CMPBCalls; Added new calls like CMPBOpen,
|
|
; etc <jng>
|
|
; <3> 4/11/90 BBH changed tests against specific version number of the connection
|
|
; manager to testing bitfields for specific functionality
|
|
; <2> 3/14/90 BBH fixed up header
|
|
; <1> 3/14/90 BBH first checked in
|
|
;
|
|
; To Do:
|
|
;
|
|
INCLUDE 'Traps.a'
|
|
INCLUDE 'CommToolboxPriv.a'
|
|
INCLUDE 'GestaltEqu.a'
|
|
INCLUDE 'GestaltPrivateEqu.a'
|
|
|
|
; PROCEDURE CMGetErrorString(hConn: ConnHandle; id: INTEGER; VAR errMsg: Str255);
|
|
; Major Selector -> 1;
|
|
; Minor Selector -> 2F;
|
|
;
|
|
CMGetErrorString PROC EXPORT
|
|
IMPORT __CMGetErrorString
|
|
|
|
MOVE.L 4(SP),A0 ; to correct for bug in CommToolboxCore.c
|
|
CLR.B (A0) ; set errMsg to empty string
|
|
|
|
MOVE.L #gestaltConnMgrAttr,D0
|
|
_Gestalt
|
|
BEQ.S @gestaltOK
|
|
@useGlueCode
|
|
BRA __CMGetErrorString
|
|
@gestaltOK
|
|
MOVE.L A0,D0 ; get selector return value
|
|
BTST.L #gestaltConnMgrErrorString,D0 ; test
|
|
BEQ.S @useGlueCode
|
|
|
|
_CTBTrap #$12F
|
|
EndCTBTrap #$C
|
|
ENDPROC
|
|
|
|
; FUNCTION CMNewIOPB(hConn: ConnHandle; VAR theIOPB: CMIOPBPtr): CMErr;
|
|
; Major Selector -> 1;
|
|
; Minor Selector -> 30;
|
|
;
|
|
CMNewIOPB FUNC EXPORT
|
|
IMPORT __CMNewIOPB
|
|
|
|
MOVE.L #gestaltConnMgrAttr,D0
|
|
_Gestalt
|
|
BEQ.S @gestaltOK
|
|
@useGlueCode
|
|
BRA __CMNewIOPB
|
|
@gestaltOK
|
|
MOVE.L A0,D0 ; get selector return value
|
|
BTST.L #gestaltConnMgrMultiAsyncIO,D0 ; test
|
|
BEQ.S @useGlueCode
|
|
|
|
_CTBTrap #$130
|
|
EndCTBTrap #$A,W
|
|
ENDFUNC
|
|
|
|
; FUNCTION CMDisposeIOPB(hConn: ConnHandle; theIOPB: CMIOPBPtr): CMErr;
|
|
; Major Selector -> 1;
|
|
; Minor Selector -> 31;
|
|
;
|
|
CMDisposeIOPB FUNC EXPORT
|
|
IMPORT __CMDisposeIOPB
|
|
|
|
MOVE.L #gestaltConnMgrAttr,D0
|
|
_Gestalt
|
|
BEQ.S @gestaltOK
|
|
@useGlueCode
|
|
BRA __CMDisposeIOPB
|
|
@gestaltOK
|
|
MOVE.L A0,D0 ; get selector return value
|
|
BTST.L #gestaltConnMgrMultiAsyncIO,D0 ; test
|
|
BEQ.S @useGlueCode
|
|
|
|
_CTBTrap #$131
|
|
EndCTBTrap #$A,W
|
|
ENDFUNC
|
|
|
|
; FUNCTION CMPBRead(hConn: ConnHandle; theIOPB: CMIOPBPtr; async: BOOLEAN): CMErr;
|
|
; Major Selector -> 1;
|
|
; Minor Selector -> 32;
|
|
;
|
|
CMPBRead FUNC EXPORT
|
|
IMPORT __CMPBRead
|
|
|
|
MOVE.L #gestaltConnMgrAttr,D0
|
|
_Gestalt
|
|
BEQ.S @gestaltOK
|
|
@useGlueCode
|
|
BRA __CMPBRead
|
|
@gestaltOK
|
|
MOVE.L A0,D0 ; get selector return value
|
|
BTST.L #gestaltConnMgrMultiAsyncIO,D0 ; test
|
|
BEQ.S @useGlueCode
|
|
|
|
_CTBTrap #$132
|
|
EndCTBTrap #$C,W
|
|
ENDFUNC
|
|
|
|
; FUNCTION CMPBWrite(hConn: ConnHandle; theIOPB: CMIOPBPtr; async: BOOLEAN): CMErr;
|
|
; Major Selector -> 1;
|
|
; Minor Selector -> 33;
|
|
;
|
|
CMPBWrite FUNC EXPORT
|
|
IMPORT __CMPBWrite
|
|
|
|
MOVE.L #gestaltConnMgrAttr,D0
|
|
_Gestalt
|
|
BEQ.S @gestaltOK
|
|
@useGlueCode
|
|
BRA __CMPBWrite
|
|
@gestaltOK
|
|
MOVE.L A0,D0 ; get selector return value
|
|
BTST.L #gestaltConnMgrMultiAsyncIO,D0 ; test
|
|
BEQ.S @useGlueCode
|
|
|
|
_CTBTrap #$133
|
|
EndCTBTrap #$C,W
|
|
ENDFUNC
|
|
|
|
; FUNCTION CMPBIOKill(hConn: ConnHandle; theIOPB: CMIOPBPtr): CMErr;
|
|
; Major Selector -> 1;
|
|
; Minor Selector -> 34;
|
|
;
|
|
CMPBIOKill FUNC EXPORT
|
|
IMPORT __CMPBIOKill
|
|
|
|
MOVE.L #gestaltConnMgrAttr,D0
|
|
_Gestalt
|
|
BEQ.S @gestaltOK
|
|
@useGlueCode
|
|
BRA __CMPBIOKill
|
|
@gestaltOK
|
|
MOVE.L A0,D0 ; get selector return value
|
|
BTST.L #gestaltConnMgrMultiAsyncIO,D0 ; test
|
|
BEQ.S @useGlueCode
|
|
|
|
_CTBTrap #$134
|
|
EndCTBTrap #$A,W
|
|
ENDFUNC
|
|
|
|
|
|
END |