home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- MEMORY ALLOCATION SYSTEM 1.0
-
- For Turbo Pascal Version 5.0
-
-
-
-
-
-
-
-
-
-
-
-
- Copyright 1990, 1991 By
-
- Software Technology International
-
- All Rights Reserved
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -1-
- NOTICE
- ------
-
-
-
- All parts of this manual and the accompanying soft-
- ware are copyrighted material. You, as a registered
- user, are granted permission to make as many copies of
- the software, or manual, as you wish, as long as they
- are for your personal use. You may not copy this soft-
- ware, or manual, in any form whatsoever for usage
- outside of your personal use. This includes, but is not
- limited to, duplication of the disk, the files on the
- disk or the manual, by manual or electronic means.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -2-
- TABLE OF CONTENTS
- -----------------
-
-
- Subject Page
- -----------------------------------------------------
-
- GENERAL DESCRIPTION ...................... 4
- Introduction ........................... 4
- The software ........................... 4
-
- THE SOFTWARE IN DETAIL ................... 5
- Functions and Procedures ............... 5
- Usage Pointers ......................... 6
-
- INDEX .................................... 7
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -3-
- GENERAL DESCRIPTION
- -------------------
- Introduction
- ------------
-
- Welcome to Version 1.0 of Software Technology Inter-
- nationals' Memory Allocation System. This group of
- functions will enable your Turbo Pascal Version 5.0 to
- allocate blocks of data up to the size of available
- memory. The functions were written to be flexible, as
- fast as possible, and as easy to use as possible. We
- hope they live up to your expectations. Please feel
- free to write to us anytime with bug reports or sugges-
- tions for future versions. If you are a registered
- user, this will entitle you to a free upgrade.
- Remember that this software is copyrighted, so
- please don't copy and distribute it, this is a federal
- offense.
-
- The Software
- ------------
-
- These are a group of functions and procedures that
- allow your programs to allocate large blocks of data.
- They are loosely based on the functions provided as PDS
- by Turbopower, but they have been entirely rewritten
- for speed and clarity.
-
- They allow your program to dynamically allocate
- memory blocks larger than 64k. Of course, they are
- entirely compatible with the standard Turbo Pascal
- routines. Also, of course, they can allocate blocks
- smaller than 64k. These routines will enable you to
- provide your programs with huge arrays, as in the
- demonstration program.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -4-
- THE SOFTWARE IN DETAIL
- ----------------------
-
-
- The Functions And Procedures
- ----------------------------
-
- procedure STI_GetMem(var Point; NoBytes : LongInt);
-
- This procedure is functionally identical to the
- standard Turbo Pascal GetMem, except that it can allo-
- cate blocks of data larger than 64k. The variable POINT
- is any Turbo Pascal pointer, and the variable NoBytes
- is the size of the block to allocate. Point will be set
- to NIL if the available memory is less than NoBytes.
-
- procedure STI_FreeMem(var Point; NoBytes : LongInt);
-
- This procedure is functionally identical to the
- standard Turbo Pascal FreeMem, except that it can
- deallocate large blocks of data. It checks POINT to
- make sure that it is valid, and not NIL. If it succeeds
- to deallocate NOBYTES, POINT will be set to NIL.
-
- function STI_Ptr2Linear(Point : Pointer) : LongInt;
-
- This function converts a pointer into a linear
- address. This is useful for doing pointer arithmetic.
-
- function STI_Linear2Ptr(Long : LongInt) : Pointer;
-
- This function returns a normalised pointer from the
- linear address provided in LONG.
- function STI_Difference(Point1,Point2 : Pointer) : LongInt;
- This function calculates the address difference
- between POINT1 and POINT2. It returns the number of
- bytes they are apart.
-
- function STI_Normalise(Point : Pointer) : Pointer;
-
- This function return a normalised pointer from the
- pointer POINT.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -5-
- USAGE POINTERS
- --------------
-
- Basically, you can feel free to use these routines
- in exactly the same way as you would the standard Turbo
- Pascal functions. In the demonstration program you can
- see how to use them to create a very large array, but
- some other areas where they would be useful would be in
- graphics. In this case, if you are saving a large area
- of the screen, Turbo Pascals' standard routines do not
- suffice.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -6-
- INDEX
- -----
-
- Topic Page Number
- -------------------------------------------------------
-
- Address...................................... 5
-
- Contents..................................... 3
- Conversion................................... 5
- Copying...................................... 2
- Copyright.................................... 2
-
- Descriptions................................. 5
-
- Functions.................................... 5
-
- General Description.......................... 4
-
- Introduction................................. 4
-
- Linear Address............................... 5
-
- Memory....................................... 4
- Memory Allocation............................ 4, 5
- Memory Deallocation.......................... 5
-
- Pointers..................................... 5
- Procedures................................... 5
-
- STI_Difference............................... 5
- STI_FreeMem.................................. 5
- STI_GetMem................................... 5
- STI_Linear2Ptr............................... 5
- STI_Normalise................................ 5
- STI_Ptr2Linear............................... 5
-
- Turbopower................................... 4
-
- Usage........................................ 6
- Users........................................ 2
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -7-