Информационный сервер для программистов: Исходники со всего света. Паскальные исходники со всего света
  Powered by Поисковый сервер Яndex: Найдется ВСЁ!
На Главную Исходники Форум Информер Страны мира
   Управление Памятью    >>    tpwhuge
   
 
 HugeMem 0.1 - Huge Global Memory Blocks for Windows   Peter Sawatzki 05.08.1991

Модуль для работы с большими (больше 64k) блоками памяти.
HugeMem unit manages huge global memory blocks. This unit uses two undocumented windows 'functions': __AHShift and __AHIncr, both are used by Microsoft C and Borland C to handle the HUGE memory model, so i think it's ok to use it



1k 
 

{$A+,B-,I-,N-,R-,S-,V-,W+,X+} Unit HugeMem; { HugeMem - manage huge global memory blocks written by Peter Sawatzki <IN307@DHAFEU11> (c) 1-May-1991 ver.0.1 This unit uses two undocumented windows 'functions': __AHShift __AHIncr both are used by Microsoft C and Borland C to handle the HUGE memory model, so i think it's ok to use it } Interface Uses WinTypes, WinProcs; Procedure hRead (Var aFile: File; aHandle: THandle; Size: LongInt); Procedure hWrite (Var aFile: File; aHandle: THandle; Size: LongInt); Procedure hMove (srcHandle, dstHandle: THandle; Size: LongInt); Procedure hFillChar (aHandle: THandle; Size: LongInt; aByte: Byte); Procedure hPutByte (aHandle: THandle; aByte: Byte; aLoc: LongInt); Function hByteAt (aHandle: THandle; aLoc: LongInt): Byte; Procedure pMove (srcPtr, dstPtr: Pointer; Size: LongInt); Function IncPtr (aPtr: Pointer; anOffset: Word): Pointer; Procedure AHIncr; Procedure AHShift; {NOTE: all procedures operate on unlocked memory blocks. Easily one can add procedures to operate on locked memory blocks e.g. on Pointers, but one must be careful not to cross segment boundaries. For example a Move (x^,y^,$8000) will fail, if Word(x)>=$8001 !!!!! }