Elliot Nunn 0ba83392d4 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-09-20 18:04:16 +08:00

99 lines
2.4 KiB
Plaintext

;
; File: StandardNBPUtilities.a
;
; Contains: xxx put contents here xxx
;
; Written by: xxx put writers here xxx
;
; Copyright: © 1990 by Apple Computer, Inc., all rights reserved.
;
; Change History (most recent first):
;
; <1> 3/14/90 BBH first checked in
;
; To Do:
;
;
; FUNCTION CallHook(hookProc:ProcPtr; itemHit:integer;
; theDialog : DialogPtr) : INTEGER ; EXTERNAL
CallHook PROC EXPORT
local EQU 0
theDialog EQU 8
itemHit EQU 12
hookProc EQU 14
LINK A6, #local ; Set up Stack frame
CLR.W -(SP) ; Save room for return val
MOVE.W itemHit(A6),-(SP) ; push parameters
MOVE.L theDialog(A6),-(SP)
MOVE.L hookProc(A6),A0 ; call hook procedure
JSR (A0)
MOVE.W (SP)+,D0 ; Save Return value
UNLK A6 ; Restore Frame
MOVE.L (SP)+,A0 ; Get RA
ADDA.L #10,SP ; Clear Parameters
MOVE.W D0,(SP) ; put return value
JMP (A0) ; Return
ENDPROC
; FUNCTION CallFilter(filterProc: ProcPtr; entity: EntityName)
; : Integer; EXTERNAL; {For name filter}
;
; OR
; FUNCTION CallFilter(filterProc: ProcPtr; zone: Str32)
; : Integer; EXTERNAL; { For Zone Filter}
;
; To call the following routine:
; FUNCTION FilterProc (zone: Str32) : Integer;
; or
; FUNCTION FilterProc (theEntity : entityName) : Integer;
CallFilter FUNC EXPORT
local EQU 0
theEntity EQU 8
filterProc EQU 12
LINK A6,#local ; Set up Stack frame
CLR.W -(SP) ; Save room for return value
MOVE.L theEntity(A6),-(SP) ; push parameter
MOVE.L filterProc(A6),A0 ; Call filterProc
JSR (A0)
MOVE.W (SP)+,D0 ; Save return value
UNLK A6 ; Restore frame
MOVE.L (SP)+,A0 ; Get RA
ADDA.L #8,SP ; Strip parameters
MOVE.W D0,(SP) ; Put Return Val
JMP (A0) ; Return
ENDFUNC
; Function CallDFilter(filterProc : ProcPtr; dlg : DialogPtr;
; Var evt : EventRecord; Var ItemHit : Integer)
; : Boolean; EXTERNAL;
CallDFilter FUNC EXPORT
local EQU 0
ItemHit EQU 8
Evt EQU 12
Dlg EQU 16
FilterProc EQU 20
LINK A6,#local ; Set up Stack frame
CLR.W -(SP) ; Save Room for return value
MOVE.L dlg(A6),-(SP) ; Push parameters
MOVE.L evt(A6),-(SP)
MOVE.L ItemHit(A6),-(SP)
MOVE.L FilterProc(A6),A0 ; Call filterproc
JSR (A0)
MOVE.W (SP)+,D0 ; Save return Value
UNLK A6
MOVE.L (SP)+,A0
ADDA.L #16,SP
MOVE.W D0,(SP)
JMP (A0)
ENDFUNC
END