****************************************************************************
*
*	This Amiga shared library is based on example source code
*	written by Gary Samad & Bill Hawes. It also employs basic
*	library concepts introduced by Jimm Mackraz (ELib) and
*	Edwin Hoogerbeets (MkLib). This library was generated using
*	a customized version of the MkLib utility.
*
****************************************************************************
*
*	These are the library glue routines for the rexxhost.library,
*	needs a change (see below) to assemble with any other assembler
*	than the Manx 3.6a.
*
****************************************************************************

	INCLUDE	'exec/types.i'
	INCLUDE	'exec/nodes.i'
	INCLUDE	'exec/libraries.i'

	LIBINIT
	LIBDEF	_LVOCreateRexxHost
	LIBDEF	_LVODeleteRexxHost
	LIBDEF	_LVOSendRexxCommand
	LIBDEF	_LVOFreeRexxCommand
	LIBDEF	_LVOReplyRexxCommand
	LIBDEF	_LVOGetRexxCommand
	LIBDEF	_LVOGetRexxArg
	LIBDEF	_LVOGetRexxResult1
	LIBDEF	_LVOGetRexxResult2
	LIBDEF	_LVOGetToken
	LIBDEF	_LVOGetStringValue
	LIBDEF	_LVOBuildValueString

Put	MACRO
	MOVEM.L	D2-D7/A2-A5,Keep
	ENDM

Get	MACRO
	MOVEM.L	Keep,D2-D7/A2-A5
	ENDM

;	SECTION DATA	; Manx doesn't understand it, remove the semicolon
			; above and delete the next line to assemble
			; it with Lattice, Masm, Cape, etc.
	DSEG

Keep:
	DCB.L	14

	SECTION CODE

	XREF	_RexxHostBase

	XDEF	_CreateRexxHost
	XDEF	_DeleteRexxHost
	XDEF	_SendRexxCommand
	XDEF	_FreeRexxCommand
	XDEF	_ReplyRexxCommand
	XDEF	_GetRexxCommand
	XDEF	_GetRexxArg
	XDEF	_GetRexxResult1
	XDEF	_GetRexxResult2
	XDEF	_GetToken
	XDEF	_GetStringValue
	XDEF	_BuildValueString

_CreateRexxHost:
	MOVE.L	4(SP),D0
	MOVE.L	_RexxHostBase,A6
	JMP	_LVOCreateRexxHost(A6)

_DeleteRexxHost:
	MOVE.L	4(SP),D0
	MOVE.L	_RexxHostBase,A6
	JMP	_LVODeleteRexxHost(A6)

_SendRexxCommand:
	MOVE.L	4(SP),D0
	MOVE.L	8(SP),D1
	MOVE.L	12(SP),A0
	MOVE.L	16(SP),A1
	MOVE.L	_RexxHostBase,A6
	JMP	_LVOSendRexxCommand(A6)

_FreeRexxCommand:
	MOVE.L	4(SP),D0
	MOVE.L	_RexxHostBase,A6
	JMP	_LVOFreeRexxCommand(A6)

_ReplyRexxCommand:
	MOVE.L	4(SP),D0
	MOVE.L	8(SP),D1
	MOVE.L	12(SP),A0
	MOVE.L	16(SP),A1
	MOVE.L	_RexxHostBase,A6
	JMP	_LVOReplyRexxCommand(A6)

_GetRexxCommand:
	MOVE.L	4(SP),D0
	MOVE.L	_RexxHostBase,A6
	JMP	_LVOGetRexxCommand(A6)

_GetRexxArg:
	MOVE.L	4(SP),D0
	MOVE.L	_RexxHostBase,A6
	JMP	_LVOGetRexxArg(A6)

_GetRexxResult1:
	MOVE.L	4(SP),D0
	MOVE.L	_RexxHostBase,A6
	JMP	_LVOGetRexxResult1(A6)

_GetRexxResult2:
	MOVE.L	4(SP),D0
	MOVE.L	_RexxHostBase,A6
	JMP	_LVOGetRexxResult2(A6)

_GetToken:
	MOVE.L	4(SP),D0
	MOVE.L	8(SP),D1
	MOVE.L	12(SP),A0
	MOVE.L	16(SP),A1
	MOVE.L	_RexxHostBase,A6
	JMP	_LVOGetToken(A6)

_GetStringValue:
	MOVE.L	4(SP),D0
	MOVE.L	_RexxHostBase,A6
	JMP	_LVOGetStringValue(A6)

_BuildValueString:
	MOVE.L	4(SP),D0
	MOVE.L	8(SP),D1
	MOVE.L	_RexxHostBase,A6
	JMP	_LVOBuildValueString(A6)

	END
