
		IFND	MAC_INTERFACE
MAC_INTERFACE	set	1

; public port name
FusionPortName	MACRO
		dc.b	'FUSION Public Port',0
		ENDM


; FUSION Message
		STRUCTURE FSNMSG,MN_SIZE
		ULONG	FM_OP		; interface operation command
		ULONG	FM_FLAGS	; operation flags
		ULONG	FM_TIMEOUT	; operation timeout (N x .1s)
		ULONG	FM_ARG1		; function entry pointer
		ULONG	FM_ARG2		; function variables pointer
		ULONG	FM_RES1		; function primary result
		ULONG	FM_RES2		; function secondary result
		LABEL	FM_SIZE

; Flags
FMFB_NoFinder	equ	0		; don't check for Finder in front
FMFB_NoDeskTop	equ	1		; don't check AtDeskTop
FMFB_Switch	equ	6		; attempt switch to finder
FMFB_NoWait	equ	7		; don't wait on check fail

FMFF_NoFinder	equ	1<<0		; don't check for Finder in front
FMFF_NoDeskTop	equ	1<<1		; don't check AtDeskTop
FMFF_Switch	equ	1<<6		; attempt switch to finder
FMFF_NoWait	equ	1<<7		; don't wait on check fail

; Error Codes
ERR_INVALID_CMD	equ	-1
ERR_CANT_EXEC	equ	-2
ERR_TIMEOUT	equ	-3
ERR_SHUTDOWN	equ	-4

; Operation Commands
FMCMD_EXECUTE	equ	'exec'
FMCMD_FRONT	equ	'frnt'
FMCMD_SUSPEND	equ	'susp'
FMCMD_RESUME	equ	'rsme'
FMCMD_VERSION	equ	'vers'


; These macros MUST be used around any AmigaOS call from the MAC side that
; could wind up calling Wait(), WaitIO(), or WaitPort()!

TrapTask	EQU	$3E00

INIT_MULTI	MACRO
		addq.l	#1,TrapTask.w
		move.w	sr,-(a7)
		move.w	#$2000,sr
		ENDM

EXIT_MULTI	MACRO		
		move.w	(a7)+,sr
		subq.l	#1,TrapTask.w
		ENDM


		ENDC

