Offs	equ	(word ptr 0)
Segm	equ	(word ptr 2)

Argm	macro	Symbol,SType,Count
	local	Offset
	@AP = (@AP + SType * Count + 1) and 0fffeh
	Offset = @AP
Symbol	equ	(SType ptr [bp+@AF-Offset])
	endm

@AP = 0
@AF = 0

Loc	macro	Symbol,SType,Count
	local	Offset,S
	@LP = @LP + SType * Count
	Offset = @LP
Symbol	equ	(SType ptr [bp-Offset])
	endm

@LP = 0

Entry	macro	Name
	public	Name
Name	proc	far
	push	bp
	mov	bp,sp
	@AF = @AP + 6
	if	@LP ne 0
		sub	sp,@LP
	endif
	endm

Exit	macro	Name,X
	if	@LP ne 0
		mov	sp,bp
	endif
	pop	bp
	retf	@AP
	@AP = 0
	@LP = 0
	endp	Name
	endm

	locals	@@
