; LUCKY.Z80 Version 1.2 By G.F.Reding 06/08/87 ;-------------------------------------------------------------- ; ; 06/08/87 Bug fix, changed SET 1,L to SET 0,L in the DVHD ; v1.2 routine. ; ; 04/16/87 Release version. Corrects a bug which was found ; v1.1 in (unreleased) version 1.0. ; ;-------------------------------------------------------------- ; ; A (hopefully) universal lottery number generator/checker that ; will create lottery numbers for fun and frollic. The numbers ; picked by this program may be displayed on the console, your ; printer, or both, and optionally, may be saved as a disk file ; with a name related to the draw date. This latter capability ; enables the program at a later date to be able to search for ; any "winning" combinations which if found may be displayed on ; the console, printer, or both. Any of the "number" files that ; may have been saved to disk by the program cannot be directly ; viewed by "TYPE"ing them as they are completely binary. This ; type of storage affords disk space conservation and provides ; some privacy security (although not guaranteed), such that an ; ordinary person cannot just sit down and view your numbers or ; easily know how many combinations are there. ; ; The binary numbers, which the program creates or reads from a ; file (when checking for "winners"), are placed into memory in ; their binary form just above the end of the program code. The ; binary form also allows many more number combinations to be ; created compared to a similar program written in basic, e.g., ; picking 2-thousand 6-number combinations will only use 12,000 ; bytes of memory. Saved to disk, the file size would be about ; 94 (128-byte) records. Speed of creation, or checking for any ; "winners", is optimized by usage of this binary format, e.g., ; creation of 2000 combinations took approximately 1.8 minutes ; and checking for 6-number "winners" took only about 0.5 sec. ; where 33 winners were found in the test run. Time, for lesser ; or greater quantities, will be respectively effected. Output ; of the combinations created to your console or printer are in ; a format which is dependent upon the quantity-of-numbers-per- ; combination and your console-screen-width so that the program ; may be used on Osborne's 52 character screen or any other odd ; width consoles. The format sent to the printer is the same as ; the console. For example, with 6-number combinations and a 80 ; character screen width the output is 4 combinations per line. ; Sorry, pagination for console or printer is not provided. ; ; PROGRAM USAGE ; ; To create numbers, simply input the quantity of combinations ; that you want and hit return. If a zero and return, or return ; only, is entered at the prompt for the quantity, you will be ; returned to the main menu. This quantity is only limited by ; the memory of your system (set by the maximum value specified ; at the beginning of the program code) and as is mentioned in ; this documentation. If the quantity entered is valid you are ; then prompted to hit any key to start the generation of your ; number combinations. The time it will take depends upon the ; quantity. You will next be prompted for the display location ; which will be your console, printer (LST device), or both. If ; the test mode is valid, an additional option to SKIP display ; and save to file is available. You are prompted for the date ; of the drawing in the format of year, month, day (two digits ; each) which becomes the file name, the default extent is LOT. ; For example: 870331 for the draw date saves the combinations ; to 87/03/31.LOT file. ; ; To check for winners, you are promted for the draw date which ; (or whatever 6 digits) that was used when you saved the data. ; You are prompted for the winning numbers which are entered as ; one-or-two digits followed by a return after each until they ; are all entered. You may backspace to correct the immediate ; number. If a return only is entered while it is waiting for ; the one or two digits of a number you will be returned to the ; main menu. You will also be prompted for a "bonus number" as ; one or two digits. If no bonus number is used, just enter a ; return only. No checking for duplication or range is done on ; the winning numbers you entered, as they would be unique and ; within the range of the combinations. If you made an error, ; just do it again. The winning numbers you entered do not have ; to be in numerical sequence as they are sorted order prior to ; checking the combinations in memory. Display of winners will ; be made on the console, printer, or both as desired. It will ; show the number of matches in each combination. The MINIMUM ; number of matching numbers required for a winning combination ; is dependent upon the value which you set at the beginning of ; the program code. ; ; Redisplay of memory is useful if you created combinations and ; displayed them on the console only, then decide that you want ; a printed copy. It is also used to redisplay combinations in ; the draw-date-file after you check for winners. ; ; LIMITATIONS ; ; Limitations and constraints on usage of this program are such ; that it must be used on a computer with a Z80 microprocessor ; as Z80 code is utilized frequently throughout the program but ; most importantly in the random number generator routine (from ; Microsystems magazine 10/83) which uses the refresh register. ; M80 and L80, or ZASM or similar z80 assembler is required for ; assembly, else you may have to write some equivilent macros. ; ; This program may not be sold in whole or part for any type of ; personal gain, nor may it be included in any software package ; which is sold in whole or part for any type of personal gain. ; No modifications may be made to any portions of this program, ; with exceptions to z80 code (personal assembly requirements) ; and those specified variables before the start of the program ; code. Users of this program assume any and all risks related ; to its usage. No guarantees of any type are provided. Other ; limitations may also exist. ; ; The program source code is placed into the "Public Domain" to ; enable the program to be used for most any lottery or similar ; game on most any machine. Request for exception to any of the ; limitations, comments, bugs, suggestions, or gratuity (if the ; program actually picks a major "winner" for you and if you so ; desire to provide same), etc should be directed to the author ; of this program. This documentation/notice should also remain ; with the program and/or its source code. By using, retaining, ; or possessing this program, source code, and/or documentation ; /notice you are in agreement with the author. ; ; George F. Reding (Author) ; P.O. Box 86386 ; North Vancouver, B.C. ; CANADA V7L 4K6 ; - - - - - - - - - - - - - - ; CompuServe user # 72436,45 ; ; ; Note: If a COM file is found with this documentation and the ; source code, it is configured for the British Columbia 6/49 ; Lottery game in which the user plays six number combinations ; where the unique numbers are in the range of 1 through 49. On ; the draw date 6 unique numbers plus a bonus number are drawn. ; To win the user must match 3, 4, 5, or 6 of those numbers, or ; match 5 of the main numbers plus the bonus. ; ;-------------------------------------------------------------- ; ; Thanks to David Bowerman who beta tested this program and for ; making some modfications/improvements to the program code and ; for making other suggestions. ; ;-------------------------------------------------------------- ;