The old Apple II (6502) did an increment in RAM in the main program
loop. I would try the same by incrementing a 16 bit address,
so every time you read that address, the random number is between o and
65535.
Regards
Paul
ericshufro wrote:
>Does anyone know a way to generate psuedo random
numbers in assembly
>for the hc11 / hc12 / hcs12?
>
>Thank you for the help.
>
>--Eric
>
>--------------------
>
>">http://docs.yahoo.com/info/terms/
Reply by Gary Olmstead●July 11, 20032003-07-11
Yes, well Numerical Recipes in C has a whole chapter on the topic
(chapter
7 to be exact). It starts off with a critique of exactly this technique.
Related
functions usage void srand(unsigned seed);
Prototype in stdlib.h
Description rand uses a multiplicative congruential random number
generator with period 2^32 to return successive pseudo-
random numbers in the range from 0 to 2^15 - 1.
The generator is reinitialized by calling srand with an
argument value of 1. It can be set to a new starting point by
calling srand with a given seed number.