Dec 092017
 
Random number generator with TASM and C source code. C visual test source & noise generator.
File RAND31.ZIP from The Programmer’s Corner in
Category C Source Code
Random number generator with TASM and C source code. C visual test source & noise generator.
File Name File Size Zip Size Zip Type
NOISE31.COM 610 323 deflated
PRNG31A.ASM 3878 1335 deflated
PRNG31A.COM 190 190 stored
READ.ME 3111 1354 deflated
TSTRND31.C 3055 1268 deflated
TSTRND31.COM 7400 5126 deflated
TSTRNDC.ASM 3533 1083 deflated
TSTRNDC.OBJ 337 310 deflated
TSTRNDTC.C 2877 1136 deflated
TSTRNDTC.COM 9810 6565 deflated

Download File RAND31.ZIP Here

Contents of the READ.ME file


================================================================
RAND31
I was fooling around with pseudorandom number generators the
other night and worked out these routines. I guess when it comes
right down to it, NOTHING is truly random. What we really mean to
say is "real mixed up - but representative". Along those lines,
I checked into some of the algorithms to generate pseudorandom
sequences and came across the "shift register" model. For me, this
has been described best by Lancaster (1974, 1989) although I have
seen implementations elsewhere. If you are interested in this
procedure, I urge you to consult the two references I include.
These files illustrate implementation of a 31-bit shift
register. The method is easy to understand, relatively quick, and
is reported to produce 2,147,483,647 non-repeating bits, although
I have not counted 🙂 . As far as the code that I have written,
feel free to use and distribute it in any productive (and legal) way
you want. I do ask that if you distribute the files, especially to
other BBSs, that you keep all the files together and unmodified!

Please direct any comments to:
R.F. Genovese
TEKNOMETRIKA
L-15, S-123
11160 Veirs Mill Road
Wheaton, MD 20902
================================================================
FILES AND DESCRIPTIONS:

PRNG31A.ASM-TASM code to print out pseudorandom sequences
a screen at a time (8-bit decimals).
PRNG31A.COM-Executable code of PRNG31A.ASM
TSTRND31.C-TC 2.0 program that gives you a visual
indication of the number sequences.
TSTRNDC.ASM - The C function in TASM for the generator.
TSTRNDC.OBJ - (from above)
TSTRND31.PRJ-TC project file used to compile TSTRND31.EXE
TSTRND31.COM-Executable file (from above).
TSTRNDTC.C-For Comparison, this code is nearly identical
to TSTRND31.C except that TC's generator is
used.
TSTRNDTC.COM-Executable file (from above).
NOISE31.COM - A silly little application of the generator as
suggested by Lancaster (1989). We generate the
sequence and spit the bits out the speaker.
The resulting "white noise" is harmless and can
be stopped by any key press. Run this AFTER you
have examined the other files so you will know
what's "going on". The noise starts as soon as
you press 'enter'!
================================================================
REFERENCES
Lancaster, D. (1974). The TTL Cookbook. Howard W. Sams & Co.,
Indianapolis, Indiana (in the 1982 printing check p 258-291).

Lancaster, D. (1989). Hardware Hacker, in Radio Electronics,
February, p 78-82.
================================================================


 December 9, 2017  Add comments

Leave a Reply