
farcode = 0
fardata = 0

ifdef MEDIUM
	farcode = 1
endif


_DATA	SEGMENT  WORD PUBLIC 'DATA'
_DATA	ENDS
CONST	SEGMENT  WORD PUBLIC 'CONST'
CONST	ENDS
_BSS	SEGMENT  WORD PUBLIC 'BSS'
_BSS	ENDS
DGROUP	GROUP	CONST, _BSS, _DATA

ASSUME  DS: DGROUP

if farcode eq 0
	_TEXT   SEGMENT  BYTE PUBLIC 'CODE'
	_TEXT   ENDS
    ASSUME  CS: _TEXT
	textsegment macro 
		_TEXT  	segment
		endm
	textend 	macro 
		_TEXT  ends
		endm
	extproc macro extname
		extrn extname:near
		endm
	pubproc macro pubname
		public pubname
		pubname proc near
		endm
	procedure macro procname
		procname proc near
		endm
	SPOFF = 0					; StackPointerOFFset = 0 fuer near_ret
	memcall   macro mem
	   	call	word ptr mem
		endm
	localcall macro routine
		call	near ptr routine
		endm
else
	_TOMLIB_TEXT   SEGMENT  BYTE PUBLIC 'CODE'
	_TOMLIB_TEXT   ENDS
    ASSUME  CS: _TOMLIB_TEXT
	textsegment macro 
		_TOMLIB_TEXT  	segment
		endm
	textend 	macro 
		_TOMLIB_TEXT  ends
		endm
	extproc macro extname
		extrn extname:far
		endm
	pubproc macro pubname
		public pubname
		pubname proc far
		endm
	procedure macro procname
		procname proc far
		endm
	SPOFF = 2					; StackPointerOFFset = 0 fuer near_ret
	memcall   macro mem
	   	call	dword ptr mem
		endm
	localcall macro routine
		call	far ptr routine
		endm
endif


