*\ :ts=8 bk=0
* ---- special Manx-specific GenericStub function, small data model ----
*	Takes the function pointer in a2 and the args in a0,a1,d0,d1
*	and calls the given function using Manx conventions as
*	if it takes two pointer and two LONG arguments.  The called
*	function should declare itself as:
* func (A0, A1, D0, D1)
* LONG A0, A1, D0, D1;
*
*	There needs to be a GenericStub entry point available to the
*	client programer in every language for the IFF Parse library
*	to be supported in that language.  It does the generic
*	translation from the library's register convention to the
*	calling convention of the target language.
*/

		public	_GenericStub
		public	_geta4
_GenericStub:
		movem.l	d2-d7/a2-a6,-(sp)
		jsr	_geta4		; Get A4 for convience of client
		move.l	d1,-(sp)	; Push registers
		move.l	d0,-(sp)
		move.l	a1,-(sp)
		move.l	a0,-(sp)
		jsr	(a2)		; Library put final target in A2
		lea	16(sp),sp	; Flush stack
		movem.l	(sp)+,d2-d7/a2-a6	; Restore registers
		rts

		end
