Short: Random Number Generator script for ADE Author: wisecracker.bazza@gmail.com (Barry Walker, G0LCU) Uploader: LAG (Lincolnshire Amiga Group) Type: dev/gcc Version: 1.00.00 Architecture: generic ============================================================================ Architectures: Classic AMIGAs, WinUAE, FS-UAE, OSX 10.15.7, Linux Mint 19. -------------------------------------------------------------------------- MINIMUM Requirements Are:- -------------------------- Stock A1200, 4MB Fastram and HDD. WinUAE 3.4.0, minimum. FS-UAE 2.8.1, minimum. Standard OS 3.0.x install or better. Full ADE UNIX environment install, (full install on AMINET): https://aminet.net/package/dev/gcc/ADE Library file ixnet.library version 48.0 Library file ixemul.library version 48.0 Both files are here if you have NOT got them: https://aminet.net/package/util/libs/ixemul-48.0 (It might even work under CygWin but it is untested so you use it at your own risk, see 'The Legal Stuff:-' below.) ---------------------------------------------------------------------------- History:- --------- 06-02-2021. ----------- Version 1.00.00. Probably the one and only upload for this archive. ---------------------------------------------------------------------------- General:- --------- Consider this the MNAUAL too! ----------------------------- (Apologies for any typos, etc...) This DEMO is a random number generator for ADE the _UNIX_ emulator for the classic AMIGA. The variable 'TEST_NUM' in the code is set at 256 to give an integer range from 0 to 255, byte sized in fact. ;oD The minimum and maximum ranges for 'TEST_NUM' is 2 and 1000, and the method is based around the URL below: https://en.wikipedia.org/wiki/Wichmann%E2%80%93Hill The minimum 2 gives a random selection of 0s and 1s, the maximum 1000 gives a minimum of 0 to a maximum of 999. All integer values. The range is similar to the ARexx random number depth and is good enough for most uses. It is FULLY POSIX compliant and requires NO floating point calculations nor external utilities at all except for GCC, and even this is not required if the timer is not needed, (see the code), just a FULLY POSIX, (32 bit), compliant shell. Inside the script is a C source 'epoch_microsecs.c' that is generated and compiled under GCC 2.95.3, that is part of the ADE installation, to give an executable 'epoch_microsecs'. This is ONLY for a timer in the format 1234567890.987654; that is, epoch time to the microsecond - in theory. Both files are saved to the ADE's '/tmp' directory|folder|drawer. As noted above this is not absolutely required for SEEDs as there is a manual input and fixed input for the SEEDs if necessary shown inside the script. This is a DEMO with all the ingredients inside to add to any of your scripts and is CC0, (public Domain), issued. Just download the file 'WH_RANDOM.sh.txt' to your drawer of your choice and rename it to 'WH_RANDOM.sh'. Start your ADE *NIX _emulator_, go to the drawer where the shell script is and start the script as you would ANY UNIX shell script. It is SLOW so be aware. It will compile on the first cold run only and store the two files inside the '/tmp' drawer and will not compile again so long as those file[s] remains inside the '/tmp' drawer. Enjoy... Bazza... ---------------------------------------------------------------------------- Lincolnshire Amiga Group: https://lincsamiga.org.uk/wordpress/ ---------------------------------------------------------------------------- This archive is issued under the CC0 Licence. Public Domain. ---------------------------------------------------------------------------- IMPORTANT:- ----------- The Legal Stuff:- ----------------- This code is CC0 licenced, Public Domain. The author is not responsible for any damage to, or loss of, or failure of equipment or data caused in any way by the use of this code. There is NO warranty with the use of this software release and YOU USE IT AT YOUR OWN RISK. ---------------------------------------------------------------------------- Testing Evaluation:- -------------------- All WinUAE, FS-UAE and Classic AMIGA test conditions were/are running standard OS 3.0.x and using standard ~topaz 8~ fonts throughout. The minimum hardware and software requirements ARE needed however. I have no idea what strange configuration setups will create so refer to the ~The Legal Stuff~ above. ---------------------------------------------------------------------------- Barry Walker, G0LCU. ---------------------------------------------------------------------------- A very useful HardWare related site, (C) Anthony Hoffman, for modifications, schematics, repairs and the like is:- http://amiga.serveftp.net/ ============================================================================