Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
Variable Storage and Memory Use
◄Variable Storage & Memory Use► ◄Variables► ◄Contents► ◄Index► ◄Back►
──────────────────────────────────────────────────────────────────────────────
Variable Storage and Memory Use - Description
Under the DOS and OS/2 operating systems, RAM stores the resident portion
of any BASIC program that is running currently. This includes the various
constants and data needed by the program, variables, and any other
information needed by the computer while the program is running.
RAM used by a BASIC program is divided into two categories: near memory
and far memory. Near memory and far memory each contain a "heap" which
is an area of memory used to store dynamic variables. "Near memory," also
referred to as "DGROUP," is the single segment of memory (maximum size
of 64K) that includes, but is not limited to, the near heap (where near
strings and variables are stored), the stack, and the state information
about the BASIC run-time. "Far memory" is the multiple-segment area of
memory outside of DGROUP that includes, but is not limited to, the BASIC
program (run-time and generated code) and the far heap (where dynamic
arrays and far strings are stored).