mirror of
https://github.com/elliotnunn/mac-rom.git
synced 2025-01-05 08:30:14 +00:00
4325cdcc78
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.
280 lines
8.0 KiB
Plaintext
280 lines
8.0 KiB
Plaintext
;
|
|
; File: CommToolboxUtilitiesCoreGlue.a
|
|
;
|
|
; Contains: Core Glue
|
|
;
|
|
; Written by: Byron Han
|
|
;
|
|
; Copyright: © 1990-1991 by Apple Computer, Inc., all rights reserved.
|
|
;
|
|
; This file is used in these builds: BigBang
|
|
;
|
|
; Change History (most recent first):
|
|
;
|
|
; <2> 2/18/91 kaz BBH, #83194: Fix CTBGetErrorMsg to pop the right size off the
|
|
; stack.
|
|
; <1> 3/14/90 BBH first checked in
|
|
;
|
|
; To Do:
|
|
;
|
|
|
|
;
|
|
; CTBGlue.a
|
|
;
|
|
; Core CTB glue to the Communications Toolbox common functions
|
|
;
|
|
; Written by Jerry Godes.
|
|
; Copyright © 1989-1990 by Apple Computer, Inc. All rights reserved.
|
|
;
|
|
; Modifications
|
|
; 4/8/89 JNG Initial coding
|
|
; 4/11/89 JNG Added CTBGetAResource and CRMGetAResource (translation of CTBVersion
|
|
; to assembler)
|
|
; 4/17/89 JNG Added CTBValidate, moved resource calls to Utilities:ResourceUtils
|
|
; Added CTBDefault and CTBGetToolName
|
|
; 4/18/89 BBH Added glue for CTBSetupSetup, Cleanup, Preflight, Postflight, Item, Filter
|
|
; Added glue for CTBIntlToEnglish, EnglishToIntl, GetConfig, SetConfig
|
|
; Added glue for CTBGetProcID.
|
|
; 4/20/89 BBH CTBValidate was adding 4 instead of 6 to the stack to strip parameters
|
|
; off of the stack. this is now fixed.
|
|
; 6/2/89 JNG New Glue/Entry interface
|
|
; 2/15/90 BBH Added CTBGetErrorMsg
|
|
|
|
INCLUDE 'Traps.a'
|
|
INCLUDE 'CommToolboxPriv.a'
|
|
|
|
MACRO
|
|
_InternalCore &selector
|
|
move.w 4(SP),D0 ; Get the Manager Selector
|
|
move.w &selector, 4(SP) ; replace with CTB selector - major selector 4, minor selector 1
|
|
lea 4(SP),A0 ; Set the Param Pointer
|
|
_CommToolboxDispatch ; Trap
|
|
ENDM
|
|
|
|
|
|
;
|
|
;
|
|
; FUNCTION InitManager(selector: integer) : OSErr;
|
|
;
|
|
; Major selector 4, minor selector 9
|
|
;
|
|
; called to initialize Connection/FileTransfer/Terminal managers
|
|
;
|
|
InitManager FUNC EXPORT
|
|
_InternalCore #$0409 ; major selector 4, minor selector 9
|
|
EndCTBTrap #$2,W ; we don't add 2 for the selector for _InternalCore macro
|
|
ENDFUNC
|
|
|
|
;FUNCTION CTBGetVersion(hCore: CoreHandle;MgrSel:integer): Handle;
|
|
;
|
|
CTBGetVersion FUNC EXPORT
|
|
_InternalCore #$40E ; major selector = 4, minor selector = 0E (CTBGetVersion)
|
|
EndCTBTrap #$6,L
|
|
ENDFUNC
|
|
|
|
; Procedure CTBGetToolName(procID : Integer; VAR name : Str255; mgrsel: INTEGER);
|
|
; Major Selector -> 4;
|
|
; Minor Selector -> F;
|
|
;
|
|
;
|
|
CTBGetToolName PROC EXPORT
|
|
_InternalCore #$40F ; major selector = 4, minor selector = 15 (CTBGetToolName)
|
|
EndCTBTrap #$8
|
|
ENDPROC
|
|
|
|
|
|
;FUNCTION CTBValidate(hCore: CoreHandle; MgrSel:integer): BOOLEAN;
|
|
;
|
|
CTBValidate FUNC EXPORT
|
|
_InternalCore #$410 ; major selector = 4, minor selector = 10 (CTBValidate)
|
|
EndCTBTrap #$6,B
|
|
ENDFUNC
|
|
|
|
;Procedure CTBDefault(VAR theConfig : Ptr ; procID : INTEGER; allocate : BOOLEAN ;
|
|
; MgrSel:integer);
|
|
CTBDefault PROC EXPORT
|
|
_InternalCore #$411 ; major selector = 4, minor selector = 10 (CTBDefault)
|
|
EndCTBTrap #$A
|
|
ENDPROC
|
|
|
|
; FUNCTION CTBSetupPreflight(procID : INTEGER; VAR magicCookie:LONGINT;
|
|
; mgrsel: INTEGER) : Handle;
|
|
; Major Selector -> 4;
|
|
; Minor Selector -> 12;
|
|
;
|
|
;
|
|
CTBSetupPreflight FUNC EXPORT
|
|
_InternalCore #$0412 ; major selector = 4, minor selector = 12 (CTBSetupPreflight)
|
|
EndCTBTrap #$8,L
|
|
ENDFUNC
|
|
|
|
|
|
|
|
; PROCEDURE CTBSetupSetup( theProcID : integer; theConfig : Ptr; count : INTEGER;
|
|
; theDialog : DialogPtr;VAR magicCookie:LONGINT;
|
|
; mgrsel: INTEGER);
|
|
; Major Selector -> 4;
|
|
; Minor Selector -> 13;
|
|
;
|
|
CTBSetupSetup PROC EXPORT
|
|
_InternalCore #$0413 ; major selector = 4, minor selector = 13 (CTBSetupSetup)
|
|
EndCTBTrap #$12
|
|
ENDPROC
|
|
|
|
|
|
; Procedure CTBSetupItem( procID : integer; theConfig : Ptr; count : INTEGER;
|
|
; theDialog : DialogPtr; Var theItem : integer;
|
|
; VAR magicCookie:LONGINT; mgrsel: INTEGER);
|
|
; Major Selector -> 4;
|
|
; Minor Selector -> 14;
|
|
;
|
|
CTBSetupItem PROC EXPORT
|
|
_InternalCore #$0414 ; major selector = 4, minor selector = 14 (CTBSetupItem)
|
|
EndCTBTrap #$16
|
|
ENDPROC
|
|
|
|
|
|
; Function CTBSetupFilter(procID : INTEGER; theConfig : Ptr; count : INTEGER;
|
|
; theDialog : DialogPtr; VAR theEvent : EventRecord
|
|
; VAR theItem : INTEGER; VAR magicCookie:LONGINT;
|
|
; mgrsel: INTEGER) : Boolean;
|
|
; Major Selector -> 4;
|
|
; Minor Selector -> 15;
|
|
;
|
|
;
|
|
CTBSetupFilter FUNC EXPORT
|
|
_InternalCore #$0415 ; major selector = 4, minor selector = 15 (CTBSetupFilter)
|
|
EndCTBTrap #$1A,B
|
|
ENDFUNC
|
|
|
|
; Procedure CTBSetupCleanup( procID : integer; theConfig : Ptr; count : integer
|
|
; theDialog : DialogPtr; VAR magicCookie:LONGINT;
|
|
; mgrsel: INTEGER;);
|
|
; Major Selector -> 4;
|
|
; Minor Selector -> 16;
|
|
;
|
|
;
|
|
CTBSetupCleanup PROC EXPORT
|
|
_InternalCore #$0416 ; major selector = 4, minor selector = 16 (CTBSetupCleanup)
|
|
EndCTBTrap #$12
|
|
ENDPROC
|
|
|
|
; Procedure CTBSetupXCleanup( procID : integer; theConfig : Ptr; count : integer
|
|
; theDialog : DialogPtr; OKed: BOOLEAN; VAR magicCookie:LONGINT;
|
|
; mgrsel: INTEGER;);
|
|
; Major Selector -> 4;
|
|
; Minor Selector -> 16;
|
|
;
|
|
;
|
|
CTBSetupXCleanup PROC EXPORT
|
|
_InternalCore #$0427 ; major selector = 4, minor selector = 16 (CTBSetupCleanup)
|
|
EndCTBTrap #$14
|
|
ENDPROC
|
|
|
|
; Procedure CTBSetupPostflight( procID: INTEGER; mgrsel: INTEGER );
|
|
; Major Selector -> 4;
|
|
; Minor Selector -> 17;
|
|
;
|
|
CTBSetupPostflight PROC EXPORT
|
|
_InternalCore #$0417 ; major selector = 4, minor selector = 17 (CTBSetupPostflight)
|
|
EndCTBTrap #$4
|
|
ENDPROC
|
|
|
|
; Function CTBGetConfig(hCore : CoreHandle; mgrsel: INTEGER ) : Ptr;
|
|
; Major Selector -> 4;
|
|
; Minor Selector -> 18;
|
|
;
|
|
CTBGetConfig FUNC EXPORT
|
|
_InternalCore #$0418 ; major selector = 4, minor selector = 18 (CTBGetConfig)
|
|
EndCTBTrap #$6,L
|
|
ENDFUNC
|
|
|
|
|
|
; Function CTBSetConfig(hCore : CoreHandle; thePtr : Ptr; mgrsel: INTEGER) : INTEGER;
|
|
; Major Selector -> 4;
|
|
; Minor Selector -> 19;
|
|
;
|
|
;
|
|
CTBSetConfig FUNC EXPORT
|
|
_InternalCore #$0419 ; major selector = 4, minor selector = 19 (CTBSetConfig)
|
|
EndCTBTrap #$A,W
|
|
ENDFUNC
|
|
|
|
|
|
; Function CTBIntlToEnglish( hCore : CoreHandle; inputPtr : Ptr; VAR outputPtr : Ptr;
|
|
; language : integer; mgrsel: INTEGER ) : integer;
|
|
; Major Selector -> 4;
|
|
; Minor Selector -> 1A;
|
|
;
|
|
;
|
|
CTBIntlToEnglish FUNC EXPORT
|
|
_InternalCore #$041A ; major selector = 4, minor selector = 1A (CTBIntlToEnglish)
|
|
EndCTBTrap #$10,W
|
|
ENDFUNC
|
|
|
|
|
|
; Function CTBEnglishToIntl(hCore : CoreHandle; inputPtr : Ptr; VAR outputPtr : Ptr;
|
|
; language : integer; mgrsel: INTEGER) : integer;
|
|
; Major Selector -> 4;
|
|
; Minor Selector -> 1B;
|
|
;
|
|
CTBEnglishToIntl FUNC EXPORT
|
|
_InternalCore #$041B ; major selector = 4, minor selector = 1B (CTBEnglishToIntl)
|
|
EndCTBTrap #$A,W
|
|
ENDFUNC
|
|
|
|
|
|
; Function CTBChoose(VAR hCore : CoreHandle; where: Point; idleProc:ProcPtr;
|
|
; mgrsel: INTEGER) : INTEGER;
|
|
; Major Selector -> 4;
|
|
; Minor Selector -> 1C dec;
|
|
;
|
|
CTBChoose FUNC EXPORT
|
|
_InternalCore #$041C ; major selector = 4, minor selector = 1C (CTBChoose)
|
|
EndCTBTrap #$E,W
|
|
ENDFUNC
|
|
|
|
; Function CTBPChoose(VAR hCore : CoreHandle; where: Point; VAR cRec: ChooseRec;
|
|
; mgrsel: INTEGER) : INTEGER;
|
|
; Major Selector -> 4;
|
|
; Minor Selector -> 26 dec;
|
|
;
|
|
CTBPChoose FUNC EXPORT
|
|
_InternalCore #$0426 ; major selector = 4, minor selector = 26 (CTBPChoose)
|
|
EndCTBTrap #$E,W
|
|
ENDFUNC
|
|
|
|
; Function CTBGetProcID(name : Str255; mgrsel: INTEGER) : Integer;
|
|
; Major Selector -> 4;
|
|
; Minor Selector -> 1d;
|
|
;
|
|
;
|
|
CTBGetProcID FUNC EXPORT
|
|
_InternalCore #$041D ; major selector = 4, minor selector =1D (CTBGetProcID)
|
|
EndCTBTrap #$6,W
|
|
ENDFUNC
|
|
|
|
; Function CTBKeystrokeFilter( theDialog: DialogPtr;
|
|
; VAR theEvent: EventRecord; flags: LONGINT): BOOLEAN;
|
|
; Major Selector -> 4;
|
|
; Minor Selector -> 25;
|
|
;
|
|
CTBKeystrokeFilter FUNC EXPORT
|
|
_CTBTrap #$0425 ; major selector = 4, minor selector =25 (CTBKeystrokeFilter)
|
|
EndCTBTrap #$E,B
|
|
ENDFUNC
|
|
|
|
|
|
; PROCEDURE CTBGetErrorMsg(hConn: ConnHandle; id: INTEGER; VAR errMsg: Str255; mgrSel: INTEGER);
|
|
; Major Selector -> 4;
|
|
; Minor Selector -> 28;
|
|
;
|
|
;
|
|
CTBGetErrorMsg PROC EXPORT
|
|
_InternalCore #$0428 ; major selector = 4, minor selector =28
|
|
EndCTBTrap #$A
|
|
ENDPROC
|
|
|
|
END
|
|
|