![]() |
Available news archives:
comp.lang.tcl
-
comp.lang.python
-
comp.security.firewalls
-
sci.crypt -
comp.lang.php -
comp.lang.javascript
|
|
sci.crypt archiveRe: 63/64 bit version of Delphi's function random( aRange : integer ) : integer; ?
From: Skybuck Flying <spam@hotmail.com>
Date: Fri Apr 28 2006 - 05:21:31 CEST
Ok,
Here is the first step in helping out with converting the assembler back to
During compile time only these lines get a blue dot in front of them which
asm
RandSeed is defined/declared as:
RandSeed: Longint = 0; { Base for random number generator }
This is just a 32 bit signed integer which can be set to anything (within
I am not an assembler expert...
But so far when looking at this code I think it does the following:
asm
// I know this trick ;), it's to make EBX zero.
// don't know what this does... I never understand what [ ] means...
// it also looks like an I for integer, multiply or so.
// oh yeah and store result in EDX
// this one is simple... increase EDX
// store edx in RandSeed probably for later use
// No idea what this means ?
// store EDX in EAX
// put value on stack back in EBX
Hmmm I can vaguely remember that MUL uses EAX to multiply with or so.. that
Since where does the aRange parameter go ?
Probably into EAX...
So that would mean EDX multiplied with EAX.. but why really ?
Oh well
I am just guessing.
Time to get my assembler bookie ;)
Who knows meanwhile one of you guys might beat me too it ;)
Bye,
|