diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2009-10-08 13:38:22 +0200 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2009-10-08 13:38:22 +0200 |
commit | ede5956d705d3a5c213870e8e0aebb0468f4b0c2 (patch) | |
tree | 9bb22002fe8ef154c4f38716fc9d516abbfcbb36 /src | |
parent | 676016b23748efd87b3b3e1ad6a2e791a8b5fc4d (diff) | |
download | fpGUI-ede5956d705d3a5c213870e8e0aebb0468f4b0c2.tar.xz |
Replace ASM with Object Pascal. It was not 64bit friendly.
Diffstat (limited to 'src')
-rw-r--r-- | src/DataTypes.pas | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/src/DataTypes.pas b/src/DataTypes.pas index 5ac9e8aa..d5d97503 100644 --- a/src/DataTypes.pas +++ b/src/DataTypes.pas @@ -47,15 +47,24 @@ Implementation procedure FillInt32Array( pArray: Int32ArrayPointer; Size: longint; Value: Int32 ); +var + i: integer; begin assert( Size > 0 ); - Asm - Mov EAX, Value - Mov EDI, pArray - Mov ECX, Size - CLD // direction = up - REP STOSD // store double word, until ECX = 0 - End; + if Size < 1 then + Exit; + for i := 0 to Size-1 do + begin + pArray^[i] := Value; + end; + + //Asm + // Mov EAX, Value + // Mov EDI, pArray + // Mov ECX, Size + // CLD // direction = up + // REP STOSD // store double word, until ECX = 0 + //End; end; Initialization |