From: Frank Kotler on
Betov wrote:

....
> shhhhhtttt. I am still trying to understand why Herbert
> would not make use of an Assembly Random, that could be
> initialized on RDTSC... Where is the problem?

Well... apparently Herbert wants it to work on machines that don't have
rdtsc. I think I'd use "gettimeofday" (mov eax, 78). Returns a
"structure"/"clump of bytes" (two dwords) (pointed to by ebx) indicating
seconds and milliseconds since the "dawn of time". I'd take
milliseconds, shift it up a bit, and xor it with seconds (to avoid an
ever-increasing value), and use that as a seed.

> Then, a good and simple RND we have found, right here,
> was the delphi one:
> ________________________________________________________
>
> [Seed: Q$ 06227_8134]
>
> Proc DelphiMaxRandom:
> Arguments @Max
> Uses ecx, edx
>
> mov eax D(a)Max
> imul edx D$Seed 0808_8405
> inc edx
> mov D$Seed edx
> mul edx
> mov eax edx
> EndP
> ________________________________________________________
>
> So... what?

So... no Mersenne Twister??? :)

I assume we initialize seed before using this (or we'll get the same
sequence every time). Linux does provide /dev/rand, but otherwise the
numbers don't know they're on Linux.

Best,
Frank
From: Betov on
Frank Kotler <fbkotler(a)verizon.net> �crivait news:Ro3Bi.540$J65.106
@trndny08:

> I assume we initialize seed before using this (or we'll get the same
> sequence every time).

No risk with Herbert LandScape... :))

Only the first view could be identical.


> Linux does provide /dev/rand, but otherwise the
> numbers don't know they're on Linux.

As you said, any time function would do easily. But i still
doubt there will be many users with a old 486 runing Linux,
and, if there exist one, i wish him, that this would not be
.... Ubuntu. :))


Betov.

< http://rosasm.org >





From: Herbert Kleebauer on
Betov wrote:
> Frank Kotler <fbkotler(a)verizon.net> �crivait news:Ro3Bi.540$J65.106

> > I assume we initialize seed before using this (or we'll get the same
> > sequence every time).
>
> No risk with Herbert LandScape... :))
>
> Only the first view could be identical.

No, with the same seed you always get the identical landscape.
It doesn't matter how far you fly, all you see is only a 256x256
random field and the same one is used for the ground and the sky.

> > Linux does provide /dev/rand, but otherwise the
> > numbers don't know they're on Linux.
>
> As you said, any time function would do easily. But i still
> doubt there will be many users with a old 486 runing Linux,
> and, if there exist one, i wish him, that this would not be
> ... Ubuntu. :))

I'm running Linux 1.18 on a 486 with 8 Mbyte RAM. And I have
saved 8 identical PC's for replacement parts (needed only an
ethernet card and two CPU fans for 13 years continous uptime).
From: Betov on
Herbert Kleebauer <klee(a)unibwm.de> �crivait
news:46D53C80.34ECFFFF(a)unibwm.de:

>> No risk with Herbert LandScape... :))
>>
>> Only the first view could be identical.
>
> No, with the same seed you always get the identical landscape.
> It doesn't matter how far you fly, all you see is only a 256x256
> random field and the same one is used for the ground and the sky.

Oh, yes, you are right... euuuuhhhh... no: I am wrong.

:)

> I'm running Linux 1.18 on a 486 with 8 Mbyte RAM. And I have
> saved 8 identical PC's for replacement parts (needed only an
> ethernet card and two CPU fans for 13 years continous uptime).

Haven't you always been a bad example?

:))

Betov.

< http://rosasm.org >


From: CodeMonk on
Herbert Kleebauer wrote:
>
> I'm running Linux 1.18 on a 486 with 8 Mbyte RAM. And I have
> saved 8 identical PC's for replacement parts (needed only an
> ethernet card and two CPU fans for 13 years continous uptime).

13 Years Continuous Uptime - WOW. I've got a spare razor if you need
to trim those "tin whiskers" - it should be a mighty bearded beast by now.

- Scott