antoine-source/appleworksgs/Spell/Src/SPINT.s

1 line
4.3 KiB
ArmAsm
Raw Normal View History

2023-03-04 02:45:20 +00:00
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 ; <20><><EFBFBD> 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