
		CASE	OBJECT 

;-----------------------------------------------
;
;   Imported addresses
;
;-----------------------------------------------
	IMPORT	_SPAddWord
	IMPORT	_SPCheck
;	IMPORT	_SPCloseUDict
	IMPORT	_SPEditUDict
	IMPORT	_SPErrNum
	IMPORT	_SPHandler
	IMPORT	_SPNewUDict
	IMPORT	_SPOpenUDict
	IMPORT	_SPShutDown
	IMPORT	_SPStartUp
	IMPORT	_SPSuggest
	IMPORT	_SPXVal

;-----------------------------------------------
;
;   Forward addresses and entries
;
;-----------------------------------------------

	ENTRY	_SPretaddr
		PRINT	OFF 

****************************************************************
*															  ;
*   SPINT.SRC - Assembly-language interface routines for SP	;
*															  ;
*   Robert A. Hearn											;
*   StyleWare, Inc.					 8/14/87				;
*															  ;
****************************************************************


	LOAD 'macros.dump'
	
****************************************************************

SPStartUp	PROC		EXPORT
			;Using SPIntData

		phb					  ; must do this since we can't screw
		pulllong >_SPretaddr		; up the stack

		phk
		plb

		call _SPStartUp
		moveword _SPXVal,x

		pushlong _SPretaddr
		plb

		lda >_SPErrNum
		cmp #1

		rtl

		ENDP

****************************************************************

SPShutDown	PROC		EXPORT
			;Using SPIntData

		phb					  ; must do this since we can't screw
		pulllong >_SPretaddr		; up the stack

		phk
		plb

		call _SPShutDown
		moveword _SPXVal,x

		pushlong _SPretaddr
		plb

		lda >_SPErrNum
		cmp #1

		rtl

		ENDP

****************************************************************

SPCheck	PROC		EXPORT

		phb					  ; must do this since we can't screw
		pulllong >_SPretaddr		; up the stack

		phk
		plb

		call _SPCheck
		moveword _SPXVal,x

		pushlong _SPretaddr
		plb

		lda >_SPErrNum
		cmp #1

		rtl

_SPretaddr		DS.B 4			; Other routines may be called while SPCheck
;							  ; is active - can't use same _SPretaddr.
		ENDP

****************************************************************

SPSuggest	PROC		EXPORT
			;Using SPIntData

		phb					  ; must do this since we can't screw
		pulllong >_SPretaddr		; up the stack

		phk
		plb

		call _SPSuggest
		moveword _SPXVal,x

		pushlong _SPretaddr
		plb

		lda >_SPErrNum
		cmp #1

		rtl

		ENDP

****************************************************************

SPOpenUDict	PROC		EXPORT
			;Using SPIntData

		phb					  ; must do this since we can't screw
		pulllong >_SPretaddr		; up the stack

		phk
		plb

		call _SPOpenUDict
		moveword _SPXVal,x

		pushlong _SPretaddr
		plb

		lda >_SPErrNum
		cmp #1

		rtl

		ENDP



; еее Dead Code

;****************************************************************
;
;SPCloseUDict	PROC		EXPORT
;			;Using SPIntData
;
;		phb					  ; must do this since we can't screw
;		pulllong >_SPretaddr		; up the stack
;
;		phk
;		plb
;
;		call _SPCloseUDict
;		moveword _SPXVal,x
;
;		pushlong _SPretaddr
;		plb
;
;		lda >_SPErrNum
;		cmp #1
;
;		rtl
;
;		ENDP

****************************************************************

SPNewUDict	PROC		EXPORT
			;Using SPIntData

		phb					  ; must do this since we can't screw
		pulllong >_SPretaddr		; up the stack

		phk
		plb

		call _SPNewUDict
		moveword _SPXVal,x

		pushlong _SPretaddr
		plb

		lda >_SPErrNum
		cmp #1

		rtl

		ENDP

****************************************************************

SPAddWord	PROC		EXPORT
			;Using SPIntData

		phb					  ; must do this since we can't screw
		pulllong >_SPretaddr		; up the stack

		phk
		plb

		call _SPAddWord
		moveword _SPXVal,x

		pushlong _SPretaddr
		plb

		lda >_SPErrNum
		cmp #1

		rtl

		ENDP

****************************************************************

SPEditUDict	PROC		EXPORT
			;Using SPIntData

		phb					  ; must do this since we can't screw
		pulllong >_SPretaddr		; up the stack

		phk
		plb

		call _SPEditUDict
		moveword _SPXVal,x

		pushlong _SPretaddr
		plb

		lda >_SPErrNum
		cmp #1

		rtl

		ENDP

*****************************************************************

; This sucks, but it's the only way I can call the handler from C.

_SPMetaHandler	PROC		EXPORT

		lda _SPHandler
		sta slot+1
		lda _SPHandler+1
		sta slot+2
slot	jmp >0

		ENDP

*****************************************************************

SPIntData	PROC		EXPORT
		EXPORT	_SPretaddr,_toolErr

_SPretaddr		DS.L 1
_toolErr		DS.W 1

		ENDP
		END

