NAME

def seg - define the current segment

SYNOPSIS

def seg [= NumExpr]

DESCRIPTION

Def seg is used to set the "segmentation register" variable seg for use by peek and pokeSeg is a pre-defined variable which holds the current 16 high-order address bits.  If the NumExpr argument is not specified, def seg sets the seg variable to reference the data segment.  NumExpr may be any numeric expression.  Def and seg must be separated by a space or a tab. 

EXAMPLE

To assign 42 to absolute memory location 1234AB78 (hexadecimal):
	def seg = &H1234
	poke &HAB78, 42

SEE ALSO

peek, poke, varptr, varptr$, seg

USAGE NOTES

In most Basmark QuickBASIC implementations, 32 bit addresses are assumed.  Def seg is used to set the high-order 16 bits of an address for future peeks and pokes (although these have questionable utility in a UNIX environment).  Seg is a variable provided to obtain the high-order 16 bits from a prior invocation of varptr or varptr$.  In Microsoft BASIC, "pointers" (or addresses) are customarily stored in integer variables.  This works out nicely on systems with 16-bit addresses because integer variables are also 16-bits.  In Basmark QuickBASIC implementations with 32-bit addresses, the high-order 16 bits must be correctly set before using peek or poke

from The Basmark QuickBASIC Programmer’s Manual by Lawrence Leinweber