mirror of
https://github.com/elliotnunn/supermario.git
synced 2024-11-22 04:31:30 +00:00
117 lines
2.9 KiB
Plaintext
117 lines
2.9 KiB
Plaintext
;
|
|
; File: CommRsrcMgrExtensionsGlue.a
|
|
;
|
|
; Contains: Glue for Comm Resource Mgr Extensions
|
|
;
|
|
; Written by: Byron Han
|
|
;
|
|
; Copyright: © 1990 by Apple Computer, Inc., all rights reserved.
|
|
;
|
|
; Change History (most recent first):
|
|
;
|
|
; <7> 7/10/91 BH remove FakeXXXX garbage to avoid duplicate wierd symbols in
|
|
; object file - now use Lib in SysObj.make
|
|
; <6> 7/9/91 BH add CRMGetToolNamedResource
|
|
; <5> 7/3/91 BH added CRMParseCAPSResource
|
|
; <4> 7/1/91 BH use _Gestalt correctly by passing arguments in registers instead
|
|
; of on the stack
|
|
; <3> 6/26/91 BH use Gestalt instead of using CRMGetCRMVersion to check to see if
|
|
; we are to use glue version of code or system version of code
|
|
; <2> 7/16/90 gbm Give it an END
|
|
; <1> 3/15/90 BBH first checked in - moved routines from CommResourceMgrGlue.a
|
|
;
|
|
; To Do:
|
|
;
|
|
|
|
INCLUDE 'Traps.a'
|
|
INCLUDE 'CommToolboxPriv.a'
|
|
INCLUDE 'GestaltEqu.a'
|
|
|
|
;
|
|
; FUNCTION CRMGetToolResource(procID: INTEGER; theType: ResType;
|
|
; theID: INTEGER): Handle;
|
|
;
|
|
CRMGetToolResource FUNC EXPORT
|
|
IMPORT __CRMGetToolResource
|
|
|
|
MOVE.L #gestaltCRMAttr,D0
|
|
_Gestalt
|
|
BEQ.S @gestaltOK
|
|
@useGlueCode
|
|
BRA __CRMGetToolResource
|
|
@gestaltOK
|
|
MOVE.L A0,D0 ; get return value
|
|
BTST.L #gestaltCRMToolRsrcCalls,D0
|
|
BEQ.S @useGlueCode
|
|
|
|
_CTBTrap #$0523 ; major selector 5, minor $23
|
|
EndCTBTrap #$A,L
|
|
|
|
ENDFUNC
|
|
|
|
;
|
|
; PROCEDURE CRMReleaseToolResource(procID: INTEGER; theHandle: Handle);
|
|
; finds folder named Communications in system folder
|
|
;
|
|
CRMReleaseToolResource PROC EXPORT
|
|
IMPORT __CRMReleaseToolResource
|
|
|
|
MOVE.L #gestaltCRMAttr,D0
|
|
_Gestalt
|
|
BEQ.S @gestaltOK
|
|
@useGlueCode
|
|
BRA __CRMReleaseToolResource
|
|
@gestaltOK
|
|
MOVE.L A0,D0 ; get return value
|
|
BTST.L #gestaltCRMToolRsrcCalls,D0
|
|
BEQ.S @useGlueCode
|
|
|
|
_CTBTrap #$0524 ; major selector 5, minor $24
|
|
EndCTBTrap #$8
|
|
ENDPROC
|
|
|
|
;
|
|
; FUNCTION CRMParseCAPSResource(procID: INTEGER; theType: ResType;
|
|
; theID: INTEGER): CRMErr;
|
|
;
|
|
CRMParseCAPSResource FUNC EXPORT
|
|
IMPORT __CRMParseCAPSResource
|
|
|
|
MOVE.L #gestaltCRMAttr,D0
|
|
_Gestalt
|
|
BEQ.S @gestaltOK
|
|
@useGlueCode
|
|
BRA __CRMParseCAPSResource
|
|
@gestaltOK
|
|
MOVE.L A0,D0 ; get return value
|
|
BTST.L #gestaltCRMToolRsrcCalls,D0
|
|
BEQ.S @useGlueCode
|
|
|
|
_CTBTrap #$0525 ; major selector 5, minor $23
|
|
EndCTBTrap #$E,W
|
|
|
|
ENDFUNC
|
|
|
|
;
|
|
; FUNCTION CRMGetToolNamedResource(procID: INTEGER; theType: ResType;
|
|
; name: Str255): Handle;
|
|
;
|
|
CRMGetToolNamedResource FUNC EXPORT
|
|
IMPORT __CRMGetToolNamedResource
|
|
|
|
MOVE.L #gestaltCRMAttr,D0
|
|
_Gestalt
|
|
BEQ.S @gestaltOK
|
|
@useGlueCode
|
|
BRA __CRMGetToolNamedResource
|
|
@gestaltOK
|
|
MOVE.L A0,D0 ; get return value
|
|
BTST.L #gestaltCRMToolRsrcCalls,D0
|
|
BEQ.S @useGlueCode
|
|
|
|
_CTBTrap #$0526 ; major selector 5, minor $26
|
|
EndCTBTrap #$C,L
|
|
|
|
ENDFUNC
|
|
|
|
END |