git-svn-id: https://svn.code.sf.net/p/kolmck/code@40 91bb2d04-0c0c-4d2d-88a5-bbb6f4c1fa07

This commit is contained in:
dkolmck
2009-09-22 13:45:43 +00:00
parent 04859a4a28
commit 5514982ce5
5 changed files with 60 additions and 33 deletions

View File

@ -54042,7 +54042,7 @@ end;
var SaveWinVer: Byte = $FF; var SaveWinVer: Byte = $FF;
//[function WinVer] //[function WinVer]
{$IFDEF nonononoASM_VERSION} {$IFDEF ASM_VERSION}
{$ELSE ASM_VERSION} {$ELSE ASM_VERSION}
function WinVer : TWindowsVersion; function WinVer : TWindowsVersion;
var MajorVersion, MinorVersion: Byte; var MajorVersion, MinorVersion: Byte;

View File

@ -17890,7 +17890,7 @@ asm //cmd //opd
//@@exit: XCHG EAX, ECX //@@exit: XCHG EAX, ECX
end; end;
{function WinVer : TWindowsVersion; function WinVer : TWindowsVersion;
asm asm
MOVSX EAX, byte ptr [SaveWinVer] MOVSX EAX, byte ptr [SaveWinVer]
INC AH // ���� <> 0 ����� ����������, �� AL �������� ����������� ������ INC AH // ���� <> 0 ����� ����������, �� AL �������� ����������� ������
@ -17900,21 +17900,31 @@ asm
XOR EAX, EAX XOR EAX, EAX
TEST EDX, EDX TEST EDX, EDX
XCHG DL, DH // DH=MajorVersion; DL=MinorVersion XCHG DL, DH // DH=MajorVersion; DL=MinorVersion
JL @@platform_9x JL @@platform_9x
MOV AL, wvNT MOV AL, wvNT
CMP DH, 5 CMP DX, $0400
JB @@save_exit
INC AL // wvY2K
CMP DX, $0501
JB @@save_exit
INC AL // wvXP
DEC DL
JZ @@save_exit JZ @@save_exit
INC AL // wvServer2003
CMP DH, 6 INC AL // wvY2K
JB @@save_exit CMP DX, $0500
JZ @@save_exit
INC AL // wvXP
CMP DX, $0501
JZ @@save_exit
INC AL // wvWin2003Server
CMP DX, $0502
JZ @@save_exit
INC AL // wvVista INC AL // wvVista
JMP @@save_exit CMP DX, $0600
JZ @@save_exit
INC AL // wvSeven
CMP DX, $0601
JZ @@save_exit
@@platform_9x: @@platform_9x:
CMP DH, 4 CMP DH, 4
JB @@save_exit // wv31 JB @@save_exit // wv31
@ -17928,7 +17938,7 @@ asm
@@save_exit: @@save_exit:
MOV byte ptr [SaveWinVer], AL MOV byte ptr [SaveWinVer], AL
@@exit: @@exit:
end;} end;
//======================================== THE END OF FILE KOL_ASM.inc //======================================== THE END OF FILE KOL_ASM.inc

View File

@ -49,7 +49,7 @@ var
{ DllProcEx passes the Reserved param provided by WinNT on DLL load & exit } { DllProcEx passes the Reserved param provided by WinNT on DLL load & exit }
DllProcEx: TDLLProcEx absolute DllProc; DllProcEx: TDLLProcEx absolute DllProc;
DataMark: Integer = 0; { Used to find the virtual base of DATA seg } DataMark: Integer = 0; { Used to find the virtual base of DATA seg }
CoverageLibraryName: array [0..128] of char = '*'; { initialized by the linker! } CoverageLibraryName: array [0..128] of Char = '*'; { initialized by the linker! }
{$IFDEF ELF} {$IFDEF ELF}
TypeImportsTable: array [0..0] of Pointer platform; { VMT and RTTI imports table for exes } TypeImportsTable: array [0..0] of Pointer platform; { VMT and RTTI imports table for exes }
_GLOBAL_OFFSET_TABLE_: ARRAY [0..2] OF Cardinal platform; _GLOBAL_OFFSET_TABLE_: ARRAY [0..2] OF Cardinal platform;

View File

@ -1251,6 +1251,8 @@ function Ln(const X: Extended): Extended;
function ArcTan(const X: Extended): Extended; function ArcTan(const X: Extended): Extended;
function Sqrt(const X: Extended): Extended; function Sqrt(const X: Extended): Extended;
{ Procedures and functions that need compiler magic }
procedure _ROUND; procedure _ROUND;
procedure _TRUNC; procedure _TRUNC;
@ -1616,7 +1618,11 @@ type
reVarDispatch, reVarArrayCreate, reVarNotArray, reVarArrayBounds, reVarDispatch, reVarArrayCreate, reVarNotArray, reVarArrayBounds,
reAssertionFailed, reAssertionFailed,
reExternalException, { not used here; in SysUtils } reExternalException, { not used here; in SysUtils }
reIntfCastError, reSafeCallError); reIntfCastError, reSafeCallError
{$IFDEF LINUX}
, reQuit, reCodesetConversion
{$ENDIF}
);
{$NODEFINE TRuntimeError} {$NODEFINE TRuntimeError}
procedure Error(errorCode: TRuntimeError); procedure Error(errorCode: TRuntimeError);
@ -2640,14 +2646,8 @@ end;
{$ENDIF} {$ENDIF}
{X- by default, system memory allocation routines (API calls) ////
are used. To use Inprise's memory manager (Delphi standard) {$I FastMM.inc}
call UseDelphiMemoryManager procedure. }
var
MemoryManager: TMemoryManager = (
GetMem: DfltGetMem;
FreeMem: DfltFreeMem;
ReallocMem: DfltReallocMem);
const const
DelphiMemoryManager: TMemoryManager = ( DelphiMemoryManager: TMemoryManager = (
@ -2655,6 +2655,17 @@ const
FreeMem: SysFreeMem; FreeMem: SysFreeMem;
ReallocMem: SysReallocMem); ReallocMem: SysReallocMem);
HeapMemoryManager: TMemoryManager = (
GetMem: DfltGetMem;
FreeMem: DfltFreeMem;
ReallocMem: DfltReallocMem);
{X- by default, system memory allocation routines (API calls)
are used. To use Inprise's memory manager (Delphi standard)
call UseDelphiMemoryManager procedure. }
var
MemoryManager: TMemoryManager;
procedure UseDelphiMemoryManager; procedure UseDelphiMemoryManager;
begin begin
IsMemoryManagerSet := IsDelphiMemoryManagerSet; IsMemoryManagerSet := IsDelphiMemoryManagerSet;
@ -19155,7 +19166,6 @@ end;
{X} end; {X} end;
initialization initialization
{$IFDEF MSWINDOWS} {$IFDEF MSWINDOWS}
{$IFDEF USE_PROCESS_HEAP} {$IFDEF USE_PROCESS_HEAP}
HeapHandle := GetProcessHeap; HeapHandle := GetProcessHeap;
@ -19163,6 +19173,9 @@ initialization
HeapHandle := HeapCreate( 0, 0, 0 ); HeapHandle := HeapCreate( 0, 0, 0 );
{$ENDIF} {$ENDIF}
{$ENDIF} {$ENDIF}
SetMemoryManager(HeapMemoryManager);
//UseDelphiMemoryManager;
Install_FastMM;
{$IFDEF MSWINDOWS} {$IFDEF MSWINDOWS}
//{X (initialized statically} FileMode := 2; //{X (initialized statically} FileMode := 2;
@ -19219,4 +19232,3 @@ finalization
UninitMemoryManager; UninitMemoryManager;
{$ENDIF} {$ENDIF}
end. end.

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
22.09.09
-------------------------------------------------------------------
* �������� ������� ������� WinVer (MTsvDN)
------------------------------------------------------------------- -------------------------------------------------------------------
09.09.09 %) 09.09.09 %)
------------------------------------------------------------------- -------------------------------------------------------------------