' random numbers since didn't have access to stronger hardware. ' fact, a lot of old video games would use an algorithm like this to generate ' weak hardware like an old 8-bit computer can ultilize it with ease. ' algorithm uses very little memory and CPU cycles power, so even extremely ' generator, for example, somewehere in the sequence you will always see the The result is by no means a quality random number ![]() ![]() ![]() ' in an order that looks kind-of random, but are fully determined from the The result is all the numbers from 0-255 rearranged ' This program uses a linear-feedback shift register (LFSR) to generate However, there is a link to how you would write the program using 8-bit 6502 assembly. As it is written, it actually uses 16-bit integers, but, that's only because FreeBASIC doesn't have native access to the CPUs registers. However, it was very popular with 8-bit computers because it uses very little memory, takes only around a dozen clock cycles, and random enough for non-secure use.īelow is the source and beyond that a compiled Windows binary. This method of generating pseudorandom numbers was developed in 1965 and is no longer used in modern programming because the random sequence has various problems. 8-bit LFSR Randomizer is a program I wrote in FreeBASIC which demonstrates one of the ways programmers used a linear-feedback shift register to generate pseudorandom numbers.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |