Microsoft KB Archive/69794

From BetaArchive Wiki

Description of Pascal Compiler’s Memory Model PSS ID Number: Q69794 Article last modified on 03-07-1991 PSS database name: S_PasCal

3.20 3.30 3.31 3.32 4.00 | 4.00

MS-DOS | OS/2

Summary:

All versions of the Microsoft Pascal Compiler utilize the medium memory model, supporting multiple code segments (up to 64K per segment) and one data segment of up to 64K. In addition, you may also allocate data dynamically on the far (or long) heap, in blocks up to 65516 bytes, using the Microsoft Pascal library routines allmqq and fremqq.

This information applies to the Microsoft Pascal Compiler versions 3.20, 3.30, 3.31, and 3.32 for MS-DOS and the Microsoft Pascal Compiler version 4.00 for MS-DOS and MS OS/2.

More Information:

Please query on the following words for an example of using the allmqq and fremqq routines to perform dynamic memory allocation on the far heap:

Pascal and example and allocating and far and heap and memory and allmqq and .r and .s

When running under MS OS/2 protected mode, the Microsoft Pascal Compiler version 4.00 can also dynamically allocate data in blocks larger than 64K by making OS/2 kernel API function calls. Please query on the following words for an example of allocating huge blocks of memory when running under MS OS/2 protected mode:

kernel and API and DosAllocHuge and DosGetHugeShift and DosFreeSeg

Copyright Microsoft Corporation 1991.