[comp.lang.pascal] TP 6.0: Where do variables defined in units go?

elmo@troi.cc.rochester.edu (Eric Cabot) (02/16/91)

Hi pascal.netters.

  From the memory maps in the manuals it looks like the
variables defined in units (both private and public) go
into the code seqment(s) rather than the data segment.

  On the other hand, overlaid units go into the overlay
buffer. 

   Am I correct in assuming that one can define
megabytes worth of variables using overlain units  thereby
surmounting that nasty old 640k barrier for data as well  as
code?  


--
=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
Eric Cabot                              |    elmo@uhura.cc.rochester.edu
      "insert your face here"           |    elmo@uordbv.bitnet
=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=

dmurdoch@watstat.waterloo.edu (Duncan Murdoch) (02/16/91)

In article <12226@ur-cc.UUCP> elmo@troi.cc.rochester.edu (Eric Cabot) writes:
>Hi pascal.netters.
>
>  From the memory maps in the manuals it looks like the
>variables defined in units (both private and public) go
>into the code seqment(s) rather than the data segment.

No, not since version 3.  All global data and local static data (i.e. typed 
constants) are put into the same single data segment, with a limit of 64K.

>  On the other hand, overlaid units go into the overlay
>buffer. 
>
>   Am I correct in assuming that one can define
>megabytes worth of variables using overlain units  thereby
>surmounting that nasty old 640k barrier for data as well  as
>code?  

Unfortunately, the data in an overlaid unit isn't overlaid, so this won't work.

Duncan Murdoch
dmurdoch@watstat.waterloo.edu