Basic Software Library Volume 4 - General Purpose Programs
Basic Software Library Volume 4 - General Purpose Programs
I B·RARY ·~- •
.,I..
. ,.. e- . ...
UME
., \
by R.W.
BASIC
E
L ME IV
GENERAL
PURPOSE
PROGRAMS
THIS BASIC SOFTWARE LIBRARY IS MADE AVAIL
ABLE, FREE OF RESTRICTIONS AND ROYALTIES
TO SCHOOLS, COLLEGES, UNIVERSITIES, INDI-
VIDUALS, HOBBYIST & BUSINESS CONCERNS FOR
USE ON THEIR OWN COMPUTERS AND OR COMPUT-
ING SYSTEMS. REPRODUCTION IN ANY PART OR
FORM OF THIS ENTIRE LIBRARY IS STRICTLY
FORBIDDEN. USE OF ANY PART OR FORM OF THIS
ENTIRE LIBRARY FOR COMMERCIAL USE OF ANY
KIND IS STRICTLY FORBIDDEN WITHOUT THE EX
PRESSED WRITTEN PERMISSION OF SCIENTIFIC
RESEARCH.
ii
I NT R0 DUCT I 0 N
The pMglta.m6 pJr.uented heJr.e a1r.e !let out 6oJr. :the .i.ndlv.ldual who hJu a. !lpecl6.ic.
need -ln mln.d. Be.c.a.u.6e a. de,t.a.,U.e.d dlilc.wi.&ion 06 :thue plloglta.m6 would Jr.e.qu.Ute. a.
text .&e.ve.Jutl :Umu the. p1r.ue.nt .&ize. 06 .t1U..6 UbJUVr.y it hall been omltted. Indl-
v~ who have a. llpe.cl6)..c Jr.e.qu.Ute.me.nt wil.i. have to be a.t lea.6t knowledge.able.
.i.n :the. a1r.e.a :the. pMgJtam ill WILUte.n a.bout; -le: S:ta.ti..6Uc.o.i. plr.OgJt.alnil Jr.eq<Wte :the
u..6eJL i:iJ be. fia.mi.Utvr.. w.Uh :the te/IJ'lll; me.an, meclla.n, etc. Th-l.6 ill bec.a.u.6e :the pM-
gJtalnl> a1r.e WILU.ten bt :the veJr.na.culaJl. o 6 :thw ll ub j e.ct matte.Jr.. WUh th-l.6 know-
tedg e. a.lane., no pMgl!.aJ1lmi..ng expvvi.ence. on :the palr.t ofi :the u..6eJr. .l6 Jr.eq<Wted .i.n
oJr.deJL to U6e a.ny 06 :thue pMgJt.alnll -ln mollt llyllte.mll. Once. U ill de:te.Junbted :that
a. palr.UCJda.Jr. pMgJUJm may be 1U>e6ui. the U6eJr. meJr.ely typu -ln a. copy 06 :the BASIC
i.oWtc.e code exa.V:ly dll U a.ppetVr..6 bi :the pJr.OgJt.am LUiUng. Then 6oUaw :the .ln-
.ed:Jr.ucti.on!l 601t. JtWUt..i.ng the pJr.OgJt.am M pll.Me.nted .i.n the. In.&bw.ction poll.Uon 06
:the WIU:te up, -i.mme<Lia.te.ly pJt.ecedlng :the. pMgJr.am. Af...60 -lnci.uded .i.n the WIU:te upll
Me llW:e.men.h that a.ppe.a.Jr. .i.n :the lloWlce code which ma.y poll!libty need to be
changed to Jr.u.n .i.n the. U6Vl' ll c.omputeJL lly4:te.m; .le: Rf.JV t.W:e.men.h may have. to be
c.hanged to FRANV .i.n oJr.deJL to c.ompUe ,fo c.eJL.ta..ln .6 y.6te.m.6.
iii
iv
TABLE OF CONTENTS
VOLUME ONE
Preface
Part 1 - Business & Personal Bookkeeping Programs
NAME DESCRIPTION
Bond Computes price and interest for bond purchases.
Building Analyzes the cost of building design proposals.
Compound Computes effective compound interest rates.
Cyc Ii c Determines seasonal coefficients for two cycles.
Decision 1 Makes a lease/buy decision for you.
Decision 2 Makes a decision on whether to buy a component or make it.
Depreciation Calculates depreciation by 4 different methods.
Efficient Cal. the most efficient assignment of resources and/or personnel.
Flow Predicts your yearly cash flow.
lnstal lment Performs monthly installment accounting.
Interest Computes interest accruals, monthly.
Investments Computes annual rates of return on investments.
Mortgage Makes a comparison of mortgage terms.
Optimize Optimizes the layout for a plant, shop, office, etc.
Order Determines your economic order quantity for inventory items.
Pert Tree Performs an analysis of a pert network.
Rate Computes true annual interest rates.
Return 1 Computes lessor's rate of return for uncertain assets.
Return 2 Computes a lessor's rate of return after taxes.
Schedule Schedules N jobs in a shop with M machines.
v
TABLE OF CONTENTS
VOLUME ONE (CONTo)
PICTURES
NAME DESCRIPTION
Introduction
A. Newman He's absolutely MADI MADI MADI
J.F.I<. Our 35th. president.
Linus Loveable "Peanuts" character, w/blanket.
Ms. Santa A modern miss to put a twinkle in your eye.
Nixon Former "United States" president.
Noel Noel Christmas or anytime this is a beautiful creation.
Nude A true work of art for anyone's gallery.
Peace A message for all seasons.
Pol iceman True and blue, he's the law.
Santa's Sleigh In banner form, perfect for decorating the mantle.
Snoopy That paragon of Dogdom even plays football.
Virgin A picture you can read as well as see.
TABLE OF CONTENTS
VOLUME TWO
Part 3 - Math & Engineering Programs
NAME DESCRIPTION
Beam Evaluates and selects steel beam sizes.
Conv. Calculates convolutions.
Filter Calculates low pass filter components.
Fit Performs interpolations by spline fits.
Integ ration 1 Uses Gaussion Quadrature to do integration.
Integration 2 Integrates a function by spline fits.
Intensity Cale. and plots RF or Acoustic intensities.
Lola Cale. Long. and Lat. from interstellar fix or distance.
Macro Simulates a language compiler.
Max. Min. Cale. the max. & min. values of funct. over a spec. interval.
Nava id Cale. position from altitude and azimuth of celestial bodies.
Optical Calculates Blackbody energies, w/filter look-up tables.
Planet Calculates Sun and Moon positions, hourly.
PSD Calculates Power Spectral Densities and FFT's.
Rand 1 Generates random numbers between 0 and 1.
Rand 2 Generates random integers between (X) and (Y).
Solve So 1ves po 1ynomia1 s by ''Bai rs tows Method''.
Sphere Tri an Solves any spherical triangle.
Stars Locates 50 stars (celestial).
Track Cale. course and distance and incremental vectors.
Triangle Solves for all parts of any triangle.
Variable Finds all variables in Basic programs.
Vector Cale. final position; given start and motion vectors
vi
TABLE OF CONTENTS
VOLUME TWO (CONT,)
TABLE OF CONTENTS
VOLUME THREE
Part 5 - Advanced Business Programs
NAME DESCRIPTION
vii
TABLE OF CONTENTS
VOLUME FOUR PAGE
General Purpose Programs
NAME DESCRIPTION
Bingo An age old favorite. 11 B9, C23, D4, E13, F21, BINGO! 684
Bonds Computes the yields for a bond for different periods. 690
Bull If you ever dreamed of being a Matador, here's your chance. 696
Enterprise Take charge of the Enterprise while Capt. Kirk is on leave. 702
Footba 11 Authentic NFL version of this well known sport. 710
Funds 1 Calculates long-term predictions of funds. 722
Funds 2 Plots the results of Funds 1. 728
Go-Moku Ancient Chinese game of chance. 736
Jack Plays Blackjack, las Vegas style. 742
Life Life is truly a battle for survival, a real challenger! 750
loans Calculates annuities, loans and mortgages. 763
Mazes Generates unique maze puzzles for you to solve. 771
Poker Five card draw - for up to 5 players. 777
Popul Performs population projections for defined areas. 784
Profits Determines the profitability of a firms various depts. 787
Qubic 3-Dimensional Tic-Tac-Toe. 791
Rates Cale. the effective annual interest rate for stated interest. 799
Retire Calculates your Civil Service Retirement benefits. 803
Savings Computes savings plan profiles. 808
SBA Calculates repayment schedules for SBA loans. 811
Tic-Tac-Toe An all time favorite for young and old alike. 817
TABLE oF CONTENTS
VOLUME FIVE
Experimenter's Programs
NAME DESCRIPTION
Andy Cap Draws this famous cartoon character.
Baseba 11 Plays a full 9 innings of baseball.
Compare Compares two groups of data.
Conf id 10 Determines the confidence limits for a normal population.
Descrip Provides a description of uni-variant data.
Differ Computes the diff. of the means for data of equal variance.
Engine Calculates the otto cycle of engines.
Fourier Th!s program evaluates fourier series.
Horse Draws a picture of a horse.
Integers Computes integers as the sum of other integers.
Logic Determines conclusions from logic statements.
Playboy Draws the playboy symbol.
Primes Factors numbers into their primes.
Probal Cale. Chi-Sq. and probabilities from 2X2 data sets.
viii
TABLE OF CONTENTS
VOLUME FIVE (CONT,)
Experimenter's Programs
NAME DESCRIPTION
Quadrac Solves quadratic equations
Red Baron Draws a picture of the infamous Red Baron.
Regression 2 Calculates linear regressions.
Road Runner "Beep! Beep!" Draws a picture of the Road Runner.
Roulette Computerized "Wheel of Fortune 11 , plays roulette.
Santa Old Saint Nick appears as jolly as ever.
Stat 10 Calculates quantities for two groups of paired data.
Stat 11 Computes sample statistics.
Steel Calculates steel beam capacities.
Top Computes cost for surfacing a road or driveway, etc.
Vary Performs an analysis of a vari. table; one-way random design.
Xmas Gene rates a 11 S I NG I NG" Christmas ca rd.
TABLE OF CONTENTS
VOLUME SIX
A Complete Business System
NAME DESCRIPTION
Ledger Maintains ALL Company accounts and generates ALL financial
reports. Includes routines for: Pyrl, Inv, Depr, A/R, A/P,
Balance Sheets and Profit & Loss statements, etc.
ix
x
PREFACE
The information contained in these pages represents the culmination of a
very large project. That of compiling a versatile and complete Software
Library that will be of use to a large number of diverse individuals. The
programs presented here when combined in a system will represent a very
powerful 1 ibrary bank. Such a work as this has been attempted in the past
in such areas as cook books, electronic source books, mathematical tables
and even computer games. But to date such a collection as this has yet to
be offered to the average individual to use as he chooses. The word 11 at-
temped11 was used as no work is ever considered complete by everyone regar
dless of its thoroughness.
The programs presented here were chosen for their uniqueness and general
usefulness. There should be at least one program included that will be of
use to every type of individual whether they have access to a computer or
not. Computers are a wonderful and very useful tool. Through this Library
I hope to interest more people into becoming involved with computers. The
Library is written so that little or no computer programming experience
is required to invoke any of the programs. The programs that are present-
ed here are all written in the computer language called BASIC. Each pro -
gram has been successfully run on a G.E. 635 computer. The entire source
code is presented as well as a short narrative page which defines the pro
gram, tells who might be interested in using it, a brief set of instruc-
tions or how to get them and then any limitations in the program are no-
ted. In the limitations section the storage length in K Bytes is given so
the prospective user will know how much memory to allow for the program.
Where possible the amount of memory space required for full execution is
given for the programs, this space is independent of the space already oc
cupied by your BASIC compiler.
The programs are broken down into five sections or parts. Each part deals
with a specific type of program. Part 1 contains business type programs.
These programs will be of interest to individuals who have businesses,
play the stock market, balance their own checkbooks, do installment buy-
ing, figure taxes, etc. There are a total of 20 programs in this section.
Part 2 is the lighter side of the Library as it contains 16 games and 12
picture programs. No computer library is complete without some fun. Among
the games presented in this section is one called Checkers. The game is
rather long but it is virtually machine independent as it doesn 1t use over
lay techniques or use files. Most of the other games included here are as
exciting as this version of Checkers. Each was chosen so as not to mimic
others that the reader may have seen. The pictures are as unusual in their
own way as are the gan~s. Most of the pictures are spread over several pa
ges, this was done not only so the reader will need to run the program to
see the details of a particular picture but also in the hopes of getting
as many of these programs into use as possible. As the picture programs
are very simple it is an easy place for the novice to start learning about
programming.
xi
technical but they can perform every day calculations quickly and easily
and they are extremely simple to use. There are 23 general usage programs
presented in this section.
Part 4 is made up of Plotting and Statistical Analysis programs. These
programs can be readily utilized by a number of people In widely differ-
ent disciplines from fishermen to statisticians. The data gathered may
be from a poll, a census, a te~t sample or even the number of fish cau-
ght on various days. The stat programs will be of invaluable aid to any-
one who gathers data of any kind. The plotting routines wi11 be of use
to most of the people who use the stat programs or programs in Parts 1
and 3. The plotting is done on any standard teletype or terminal and
does not require a special plotter or plotting terminal. There are a tot
al of five direct plotting programs and 18 stat programs in this section.
A11 of the programs presented here may be run by simply typing the source
code as listed, exactly as it is, into your computer. Now before the pro-
gram will run it will have to be converted into machine code. This is done
automatically and requires no forethought except to make certain the oper-
ating system you are working in is BASIC. In the larger computer systems
you are asked what system you want to this type BASIC; the smaller sys
terns only have BASIC, in these you are O.K.
Immediately following Part 4 is Appendix A. Here, all of the Basic State-
ments used throughout these pages are defined. Each statement is explained
sufficiently well to enable one unfamiliar with this subset to modify any
necessary statements so that the program or programs wl11 compile and exe-
cute with the Basic compiler or interpreter available with their particu-
lar computer. Most of the Basic compilers available today, that require
more then 10K Bytes of storage, will execute all of the programs presented
in these volumes with the possible exception of a few of the games and the
program "Variable". Multiple 1ine statements are not used in most of the
programs and only a few programs use string manipulations extensively. A
few of the programs may require more on line storage then is available on
some of the sma11 micro computer systems; these longer programs will not
be executable due to the limited amount of memory. However most of the
programs will execute in 10K Bytes of memory or Jess, thereby making most
of the programs in this Library executable in virtually any Basic speaking
computer without any required modifications.
Volume I II is comprised of ADVANCED BUSINESS programs, part 5. This volume
as well as subsequent volumes are intended to make this Library complete
and useful to al 1 Individuals.
Each of these programs are written in a subset of the Dartmouth language.
The specific subset is that which was used by General Electric on their
635 systems. These programs have operated without problem on a variety of
small and Jarge machines even several of the new micro computers. The pro
grams that use string manipulations may require slight modifications be-
fore fully executing on some systems. These programs are mainly found in
Part 2 ~ Games.
xii
All of the programs in this Library were written or edited by the author.
All of the programs edited by him were given for Inclusion, "swapped" for
traded, or made publ le. A few of the original authors of the "swaps" are
not known, for this I apologize. The others, unless specifically mentioned
In the text, are presented here. In addition I would like to thank the fol
lowing for their cooperation in making this work possible.
ACKNOWLEDGMENTS
M Y W I F E MA R Y A N D M Y F A M I L Y
DONALD ALVAREZ G E T I ME S H A R I N G
DAVE B E E T L E B I L L J 0 NE S
M0 R T 0 N B E R G E R GE 0 RGE L0 NG
C0 P Y CAT I NC T 0 M R 0 S E
A R T W0 R K C 0 U R T E S Y 0 F ME L I S S A
xiii
xiv
GENERAL
PURPOSE
PROGRAMS
BINGO:
DESCRlPTION
This program simulates that old family favorite 11 Bingo 11 • The game is played
between you and the computer, although another may play using the computer's
card. The computer will tumble the balls and select the numbers at random.
USERS
Individuals who enjoy matching their luck against chance will like playing
this game. Bingo will also appeal to persons who enjoy a leisure game of
chance without the tension of house betting.
INSTRUCTIONS
After the program is loaded into memory type RUN. All necessary instructions
and inputs will be prompted as this program is self instructing. For a de-
tailed operation of the game, list the program.
LIMITATIONS
This program uses two dimensional arrays; see line 210. Line 230 contains a
Restore statement and line 490 contains a SPC ( ) statement. The SPC ( )
statement is used to set the print position for the Bingo cards and could be
replaced by a TAB ( ) statement, if your instruction set does not include the
SPC ( ) instruction. A definition of the SPC ( ) statement can be found in
Appendix A, in Volume II. The source code requires 6K Bytes of memory for stor-
age and the program will execute in most 8K Basic compilers in only 7K Bytes
of memory, this is in addition to the amount of memory required to store your
Basic compiler.
684
(=1 j 1C1 FiE!.;1
i·~'.:i t :: i~i
1
F~FJ:·J
~~~: ::t: =::~: n-f 1L ; i
!."'•
r.:=F f) C;t?f~ t·!
1 ~6: :~t;
=-=~ ::;:: ~-;-: ~~ ::::: ;¢:: ~!: :,-::: ::;:-:
i:'.'i j 7'0 F'RHff H\'OU fiF£ t!CIL·I r~OH·iC:i TO PLAY !-'":! CC!i"'!F'UTEPIZE:D IJ[F-'.'.~;ION OF HHiCO-·-"
01 :::fi LET F= 1
r1 c::o~:::; LET w=O
0210 DIM BC10, 101
0220 nIM LC7'5J,Fl$(5)
1~~C ::::!~~1
1
~~E~:;TCIF.'E
0240 READ A$(1J,A$(?),8$C3J,A$C4l,A$(5)
685
8540 FOR Y=F TO G
O:='i'::~!2l IF f:C:=:,Y)=PfF+c.·,F+E'.) THDJ 5::;:0
0560 PRINT BCX,Yl ,T~B(1J;
:;=1650 F'P Hff" crrnF· nrF AF""TFP MAC:HJt!E: 1:1uTOMF1TICALL\' ADUAt··ICE'.::; PFIPEPJ 11
~;'l66Ci n:ip V9=1 TU ·:::1
0670 PPHff
~:16:::0 MD·::T ~=::9
0b90 lF F=6 THO~ 720
0700 LET F=6
ff? 10 GOTO E?O
ff?;:'.Ci PF-'. I r·iT
cr?~:::c1 F'R r MT 1··10L·~ 1_,1r:, PE FILL SET ro PLF1\' THE ci=w1r.
11
U'.:;E A PEt·1c r L TO MflF-:K OFF"
o74ti PPHff 11 THE r·1u1··1:t:fP'.::; cin \'OUP CAPr1 AS THEY AF.:E cF1LLED. 11
0?50 PPIMT 11 !'.F'LEF6E PLffi' MY CAF-:tr i=c::; ~·!ELL F1~:: \'OUP m·~n:i"
0760 PF-'It·ff DCtt~' T CET '.;:;MAPT mm TP'r' TO CHEFIT H:;
11 11
686
~~': 960 F'F' I t-n
i,'1970 IF F'HI.1 !.;~!:! .:· .. ;~· ·rHFl! lOOO
09~=:0 F'P Hff" IT co1·1i:::::; UF' ~ ", n=ri:: c?cn ,
l citJ~] IF. F:t ·II1 t I)) .·· II ~· ·r~·!FJ--i J ~~r~:t1
li~i1ia F'F'.I!iT"THE t!l.. lt·ff:EP I::;: ",T!=!BC::·o·1,
i ~~i2ti GOTO i 100
10::0 IF f:'.MD 10) > •; : , THEJ! l>360
H'i4~i F'PIHT"L·.!E Hfil.1~ 1=1~ ", T;=ff C~ti),
1050 GOTO 1100
i ~~.lE,~=i IF ~~t·iII ( G!) > 0 ::~ ~ri lE~t··i 1j~·r:.iC1
l 07!21 F'P I HT Ip ·:::; 1=1:
i; I! , TAP c:::'.~n '
10'3(~ F'F.~ I t·rr 11 ·rHE t·~E~.::-::-r Ir~~: II , TAI~ f ~~~(~) !i
1 E10 PF'.Hff A$ f H"iT i: CJ- 1) ,.. 1':d +1); U
687
1 44~3 CiOTCJ 1470
1 i:.1°5f"i t··JE>=:T ;..:
l ·~-f.1 ~2i t"-IE:=<T tl
1·~70 PEM TH I::;; I·:. TH[ HOP TZO!·ffAL CHECY FOF'. I: I t·K~O**-:.;.; ( l.. I t·it:::'.; 1450-· 1610)
l 4B(i LET !~~==F+4
1490 FOR X==F TO G
J ':';0~3 FOP '-1'=F TO (;
l ::; 1ti IF. B ( >=::: r' :t :::: >~i T!··IE:rt
1
j t::3f~1
1~?A IF Y{F+4 THEN 1620
1 :~;n3~~1 IF F ::::E~ ·rHEJ',i i 5f:t1
1 '540 PRU-ff
1 '::;'':i0 PF:'. I HT II YOU, I.)[ GOT i=1
1 '560 LET L·i== 1
1 i:;7i;::1 !?ETURN
1 '.:i '.::o PF.'. Hff
1 '::i90 F'RHff" I' 1) [ GOT Fl B I t·I G 0 :i;.: :.;.: :.;.: *- '*'"
l 6ti0 LET I):::: 1
161(i GOTO 1650
l 6c~0 ND::T Y
1 t:,::::~~1 t·1E:=·=:T :=<
1 E.40 REM TH I:;::; I::;; THE ·:;LAMT CHECK f M=- l ) FOP F.: I r1GO*'*'~ ( L. I NE::; 16;;::(1-1 77~?1)
1650 LET /=:F
1 E.6(1 LET \'==F
1 i:.70 IF 'B ( ;:.,;, \')<;:.qi THEJ-·! 17::~0
1 E1 ;;:;~J LET ::<=::-::+1
1 t==,·~~i LET 'l=\ +1 1
688
1 ·;;:;:'.(i LET l.J=-~ 1
t ::r31z; F~ETIJF~t1
1
;::'.090 PFUMT
c:'. i 00 PRJ NT
c' 110 GOTO 1 ·;1::::~~1
;::· 12(1 PEM TH I:::; I'.;:; THE II \'OU L·~ It·~ II ·::;E:OUEJ·K:[
c'. i 3(i PR I MT
c'.14~3 PPHff" YOU l_,IHi..... 'r'UU l·HN....... \'OU ~·-IHI ••••••• "
689
BONDS:
DESCRIPTION
Bonds calculates bond yields to maturity for a bond. The yields are computed
before and after taxes. The user must supply the tax rates, the redemption
value, price, annual coupon and the maturity for the bond before any calcu-
lations are made. This program is more comprehensive then the program BOND.
USERS
Persons or companies interested in investing in bonds, or already having bond
investments could benefit from using BONDS.
INSTRUCTIONS
The input data for the bond may be entered in data statements prior to program
execution or it may be entered after execution through the prompting provided
in the program. After the program has been loaded into memory, type RUN. Bonds
will then ask if you want instructions. There are three valid responses to this
question: YES, NO and DATA. If you answer YES, the program will prompt for the
required inputs. If your response is NO, then you are expected to enter the
seven (7) required data inputs. If the response is DATA, the program will expect
to find the data previously entered in Data Statements prior to operation. Data
for a sample problem is contained in line 190.
LIMITATIONS
The program should execute in most Basic compilers with 5K Bytes of available
memory. The source code requires 4K Bytes of memory for storage.
690
r.;
I I
1 ?\::FEM
1 ·;::t;;'1F.EM
691
500 PEAD c,?,M1,M2,P,T1,T2
'=' i o PF:'. I nr "couPot··I" ; c, "F'[DEMPT I OM AT" ; ::;:'., "PR r c E" ; P
':·40 PRHff
545REM SEMI-F~NUAL COUPC~
•::; '.:i 0 LET C=:C/c'.
::15 SF:'. Et i TI ME TO i ·!f!TUF.' IT\' I H :::;EM I -At1NI..IAL COUF'Ot-1 PER I ODS
1
692
780 IF M3>6 THEN 810
~::i ·::1 ~3 C;;C1~:;;iJl:: 1Cl 1f2i
9;?:(1 FTTUF.'.H
9 :;:o LET J=:U 1;.;;:e:-::F· C'r':i:i:M!:i)
940 LET Ul ~:*C1-EXPC-M4•YJ)/(EXPCYJ-1)
950 LET !J?=:U2:i:i:D<P (--\':s:i:M4)
96(1 LET l.)J =
1.Ji:''*'l·i4-P:i:i:M5
9?0 LET iJJ=l.IJ+ 1.C/ CE>:P (\') -1) le'.)* CE'.:<P f\')- C!-14/['.:::P I\'*- CM4-1 ) ) )
9:::0 LET 1,1·:::=U3+CC ··CD<PC\'l-1Jlc'.)=Q:f fM4-1't/(t)::P(\':<i:(M4-·i)))
99(1 PETUPt1
i OOOPE:M f!LGOF.'. I THM FOF.: DETEF:M I t·1 I MG E::<ACT PATt.: OF PETUPt·~
1010 LET \'=. 000l
10i:'.O GOSUB i (1:::~:::1
l 03(i LET l):::i)-.. (I) 1 +Ui:·)
l 04(1 IF f"fBS r: D/l)J :i ::· • ~x10Q(1(1(15 THEt1 1(170
11215~3 LET Y=Y-Il/1)3
1 06(1 GO TO 1 Oc~O
1 !21?(1 F.:ETUPt··I
10:::(1 LET I.) 1 =U::::=(I
109(1 LET Q=U 1
1100 LET U2=U2~~XP(-Y:i:i:M3)
1110 FOR I=O TO M4
1120 LET !.J 1=U1 +C'*'D<P C-Y=Q: ( M5+ I) )
1 l ::::0 LET '· 13=t.JJ+ CM~~+ I J *-C*E::·::p ( -Y:<i: ( M5+ I ) )
11 40 t·1C<T I
l 15~) LET 1.J3=U3+M~:*Uc'.*D=:F' (-Y*f'13)
l 16~~1 F.'.ETUPM
1l7!21 END
693
TO ~-IllD TH[ 1~:[FCI!:;::[ fl!!Tl HFTET: T1=1::=: YTE1 . fi'.::; FCC: 1=:1 smrn, 1~:i:::;·::::ut·IIllC THE": FULL.J:11. 1111c;
DATA~ l - Fl :;::':'• 1:i! IHUF!L c:oui::·on, ; : '. ·- PE:DD·!PT I C!l i l.J!1U.J[ UF' ~:: l !?10, ::: -· 1·:1:rruP J T\'
OF $9?, AND TAX RATES OF
F:'IJI I
DO \'O!J 1.. 1i=1t IT I 1·y::;TF'UCT I cnt:::; F OF.: E! ITF!? I! IC, n1=1TH ~:"y'l;:'"3
FJITET' HI[ F OLLC!i. 1I I-IC rn=1T~~1 I TEI"!'.::;
I TEJ'! l Fit·li-!tWIL 1::0l IPf.l!· 1 (I!·! DOi.. L HF:..::; :i -:.i::,
,., ..
I TF r··• c:' PF:OCE[Ir:::; Ut! FF::Il[l"IPT I on ? J i;:'lO
I !TY! -.....: 1::.; ::l :·11:n1. . n~:'. IT\' I 1·1 \THI;:·'.:::;, t•IO' ITH::::
1'°:'
?6, ~:;" ,:,:.r::;
PRICE ?97
I ...,
I l"E,l'='i ..
·~·!
.-, 1:::'
J TEJ-1 (::1 l~t "? :' tl ·~I , II
COUPOrl 1:::
·-' flEJ!PTICHi 1rr 108 PRICE
1··1t=1TUP I T-1' 1:..."1'C1:11:;;:::::; •:;:,. E:::::, i•!!Jt!1li'.:::;
TF1::< F::i=!TE:·::; • •=', i"I! ! I HCOMF. .25 ON CAPITAL GAINS
YIELD BEFORE TAX 5.560054 PERCENT
2.907394 PFRCENT
694
!IC! \'1 11.i i·!H! fT l' 1:~.>T F'.t 1r>r I f:n· 1,=·;
!TFT' l TEi'i.:; 'T!-·lh'.Cl!Jt;a- 1 "'.'
i·iHTUF' I 1 \'
\·
1
IE LJl E:E.F'f'!F:'F. rr:i;:-:: ·r
\
1
IE L.. TJ F1F··rF-·F:'. --1· 1~·:1;:.:: "T"
i
PUrl
CCllJPOll ~ RFDEMPTION
MflTUP I T'r'
1T1>< F'HTES
;:~:1F'T't:1? ·rr::1;:.::
695
BULL:
DESCRIPTION
In this program you will be transformed into a Matador. Have you ever been
a Matador? Well, in any event you will have the opportunity to test your
skill and courage in killing a bull or in the reverse being killed by a Bull!
USERS
Anyone who is looking for a good, fast, moving game where the probabilities
for "loosing" or "winning" are Equal, will enjoy playing Bull. This game is
extremely unique and is full of unexpected events.
INSTRUCTIONS
All instructions necessary for execution are included in the program. After
the program has been loaded, type RUN; you will then be asked if you want
instructions. If you type NO to this question the game will commence, any
other response will yield the full set of instructions. The game is self
contained and provides for all necessary inputs automatically.
LIMITATIONS
This program uses multiple line statements throughout, i.e.: lines 460, 730,
780, 970, 1030, etc. In addition, line 413 contains a Restore statement. The
source code requires SK Bytes of memory for storage and 6K Bytes for execution.
696
"!": ·r :~·.
j : j !..:!
ii
;:~'.~.:;liF;F~1t·iT
11
C:1=:l.lEJ~~Cli·IIC"Fi rrn=1r·tC:1E~F.J)l_t!:; l 'H:1i)E' CJF" T~!F . c:AF F:),
If"··~'::3IIiE 1 1
H
;:· i:. L:'iPP r t-rr" 1::::Lt·:;-::; DHMr ,;[F'.OU'.::; ouT·:; I ·nE t·1c111E· OF THE. c:i=:PF. ~ op 11
c: .~?~2iF=~~, r t·. 11i:1= =CiF~I) Ir ·!F1F \i ~.:;k.t T1~ L ciF- 1l-tE~ c·RF:E~
1 1 1 1 111
1: "T(l •
;~c1l1F F~ I t"·~T u
1
c1t··1 r-:Jf·/ 1-1JF~'.J ·! ~ 4·=CH.JE~F.i Tt-~E J-iCH:;~:r·-1~:;, c.i= 1 r-1 -r·HE c·t-iE:~:;T; I!
41 c~ F:Ef'1
697
~:~·;~'.;CiF;F~Ir·iTf!cic~i=1I! LJ.JC"l"i: '·1 :·n..t==
11
L.L.~ t·iEEii IT= u
560REM PICADORES
~:', ::: 0PR I r-iT
~=;·=.;n;::1LET A.;:= II p I c1=iri0Rc=.:; II
600CiO'.:;UB i t.10
6 1OL ETD f 1 ) =C
b20REM TOPEADORES
i;:;.-::0LET A$=:" TC!REF!IIOF'.E:~:;"
?90PPIMT
11
L·~HAT MOl.JE DO \'OU MAKE l·~JTH THE CAPE";
:::OOINPUT E
810IF E<>INTCElTHEN 830
820IF E<3 THEN 850
:::3(1PF.'.Hff"DOM' T PF1t-nc, '/OU IDIOT I PUT Drn•.lt1 A COPPECT MUMBEP";
698
j (i40PF.'.IhT"CO!·~fiF.'.D
11
H:i50LETD (4) =0
E'i60GOTO LH~~!
j ~~i(fiF'P I HT I! YOU ffr£ BF.:RI I[. '.::;TUPI D' BUT "[;!?~:11.1[ II
JOSli Fi=INT(Fi:ND(-·j):¢:?)+1···.0tl Fi c;OTO 1(1 90, 111(i
l ;:·.11z1pp I MT" YOU Pf!M I ClTD. THE HULL CiOPE.D YCiU. "
1 c'.cJ:iGOTO 97ti
li:'30 t-::=(6-·RJ'*'1tf¢:i=.:t·K•l.-1) ( f[i(1)+D(2)'r.>:S:i>:D(:3)))
1240IF .J=4 THEN 1290
1 ::'.50IFK>. c'.THHi 960
i c'.60PRHff 11 YOU l<ILLED THE I:ULL"
i E 7'0LETD ( ~i :i =C'.
1 ;::-:;;a~1GOTO 131ti
1 ;:'.9t1IF K>. eTHEtl 96(1
699
l510GOT015;::0
1520PPI!-iT"BOTH LflP:::; (IF" T'-lt: BULL"
1 ':.l"::::OPPHff"OLE ! II
1 ':'40GOTO 1 ':i:;:::o
1 ':i51aPPit"IT"ONE [HF.'. or TH[ F:ULL Ii
1 ':i60CiOTO 15H!21
1 i:; ?OPP I 1-n" ncm-i r nc"
1 ::;;::opp I !'ff
1':i90 PRIHT "DO \-'OU 1,.lfiHT TO TP'/ ~:1CiAIH 11
;
1 ':i 91 H~PUT z~: ··.. IF :;:: :*::::: "'-;-'[::;:;" GOTO 410
1 t:.~:::i~?:IGOT02~33(1
1610 LET s=3/R*RNo(-1)
1620IF B<.37 THEN 1740
1630 IF B-::: 1-'··2 THETl 17;::(-1
1640 IF B< • 63THEH 1?(10
1650IF B<.87 THEN 1680
1660LET C=l/1(1
1670CiOTO 1750
1 6:::0LET C=c'./ 10
169t-iCOT0175t1
1 70tiLET C:=J/ 10
1 711~KiOTO 17~i(i
17;::•:'.:iLET C =::4/ 1 ~3
1 730 COTO 17':i(i
174tiLET C=i/2
1750LET T=INTC10~C+2/10)
1 760PPIMT THE "; F1~:; " flID ri "; t_:;.: 1 T :i 11
11
JCIB"
177!21IF 4>T THEM 1900
17S~HF 5=T THEt--1 1:::7~?1
179(1 Fl=INT(Fi:ND(-1)*-c'.)+j·,.oN Fi GOTO 1G~)(1, 190(1
1 :::1;::1(1 IF A$= TOPEF!DOF.:ES It THEM 1 ::::20
II
700
!.:iii ETiCH F'f:1::::s UF THF BULL., \'C!IJ Mff/ TF:'.Y
Cl::::! IE.Rotn CFI CDFlt ICiFF'OIJ•:; n1·:::; I DE MOl)F OF THF CFIF'F ) ,
1 =LL:::/::; f!Ai iGET'OU'.:::; nu1 ·:::;HI[ t·lOI)[ OF THE" c·F:F'F , UF
D1r·~AF.'':' ::;L·~ I F.'.L OF ·rHt: Cf!PE
THE: BETTER f~ .JUB THE F' I CADOF.'ES t=1Hfl TOF'EF!Tll iF'E ·:: no,
THE BETTER YOUR CHANCES ARE
F)ri~-:;~:; tit.1t·i1F.:r:·:F.'. j
THE B~-L IS CHARGING AT YOU! YOU ARE THE MATADOR--
DO '/OU 1. .1Atff TO TF."1' TO VI LL THE BULL?rT::::;
IT I'.:::; THE MOMENT OF" T!?UTH. Hrn·~ DO \'OU TF'\' TO KI LL THE BULL.?1
YOU PANICKED. THE BULL GORED YOU.
\'OU AF£ DEFU.1
701
ENTERPRISE:
DESCRIPTION
The federation is in dire need of a commander to takeover the Enterprise while
Captain Kirk is on leave. Prior military experience helpful as the Enterprise
and a Klingon battle cruiser face each other in a simulated battle mission on
your computer. Designed to test your abilities, this version of the game will
require considerable skill on your part to avoid total destruction. GOOD LUCK!
USERS
Starfleet Captains and other individuals interested in keeping the Star Trek
tradition alive and well, as well as having a lot of fun, will find this sim-
ulation space battle both exciting and fascinating. **WARNING** This game may
be habit forming ~ players have been known to become addicted!
INSTRUCTIONS
Type RUN after the program is loaded and the program will ask you if you want
instructions. The program is self instructing and easy to use.
LIMITATIONS
Line 230 contains a TAB ( ) statement, 670 an ON GOTO statement and 2270 a
Restore statement. Lines 330 and 2810 contain Multiple line statements. The
source code is 7K Bytes long and the program will execute in BK Bytes of mem-
ory. For those of you experiencing extreme difficulty in bringing back the
Enterprise in one piece, the weapon control constraints are located in lines:
700, 800, 870, 2010 and 2020.
702
ENTERPRISE
ENTERPRISE
c1 i 4L~i PP I rn· " =-· FfiF'L·:1=1FT1 F'!·iH::;EP t::RM~s, F:'.F:r·1ci::: ::;::(10, c1(10 t<M. 11
i?2:3(i F F~ I t·il""
1
[i~?i:.1-0 F.~Et,·1
(:1;:::5(1 PF.'.IHT 11 1-FI F:'.E FOP~·-lflF.'.D n!A'.:£F.:·::;"
0260 PF.'.Hff "E:-F-lFT PE.AF.'. PHfl'.::;EP"
02?0 PPHH 11 ::::-·FIF.'E. FOPt·jFIF.'.D PHOTOtl TOF'.PEflO"
1X:'.80 PPIMT 11 4-F"JPE: PEFW PHOTOti TOF:'.F'ED0 11
0290 PF.'.Hff "'5-fiCTIUflTE. F!UTO DISTF.:UCT"
o '.;:i;:K1 PP I MT "::.--:::;1_.1pF£tmEF.'."
e1::;::10 PF.'.Hff "?-fHTEMPT TC1 BPEAK COt·ffACT-·-·CO HffO HFlF:'.P DPif..JE"
0320 PPHff 11 :::-·MOUF CLO::'.;EP TO THE KLIMCiOtl"
0330 PF.'.Hff"···.PF-'.Hff "FILL UECTOP HEFIIIH·!C8 ~·HL.L. BE BEnJEEM 0 F:tm 1:=::a Dt:CF'.ETS"
034li F.:EM
0::::5(1 PPHff "KLit"·ICotl COMIMG IHTO PAMGE--:::;HIELD:::; ot·i"
0360 READ R,H,p,x,A
039(1 PEM
0 400 PP It-ff I! ~'~HAT I"::; .;'CHJF:'. COMPUTEF.: DEF"Ett:;E t ·IUMF:EP f l -C::::;) II ;
0 4 l (1 I t·iPUT t"i2
0420 IF N2<1 GOTO 400
703
0430 IF N2>25 GOTO 400
044(1 REM
0450 F.'.EM
0460 FOR I-=1 TC! n;:::
(14 7li B=Pt·m ( :>::)
04B0 l·~E::-ff I
~J491Z1 Ci0:3UB 137[1
05(1(1 pp I NT II THE PAt·K:;E= II ; F.'.; II KM. AT A UETTOP HEAD I t·IG OF II ; A; II IlEC:iF.'.EE:::; II
0510 e;o:::;uB 6E:o
0520 IF H>B THEtl c~560
0530 IF E=6 GOTO 2700
054(1 IF E=5 GOTO 2610
0550 IF R>1.00000E+6 THEN 2690
0::i60 GOSUB 1100
~Y:i70 IF P>:::: GOTO ,::6Ei
ti58(1 IF 1<=7 GO TO !:i00
(159(1 GOTO 49(1
06(1(1 F.'.EM
061121 F-'.EM
0620 ~·J=;:'.'.
06:30 PPHIT "~ . lHFff I::; 'r'OUF.' MOl..JE 11 ;
064(1 INPUT E
~~65(1 GOt;IJB 1490
(166(1 IF O>C1 THEt"-1 630
0670 ONE GOTO 680,790,910,950,900,940,990,1030
0680 IF A>90 THEN 730
~:169(1 B=PND i:::·::)
0700 IF B>.2 GOTO 770
0705 F.'.EM THIS E; FOP THE FPOMT PHFISEP::;
071(1 PF.'.IMT "COMPLETE MI::;::;;, YOUR AIM I::; OFF"
0 72(1 PETUF.'.t. !
o730 PF.: I NT "MI s::;, r NCOPF.:ECT '...IECTOF.: ANGLE"
0740 PFUrff "PEMEMBEF.'. THF!T ~BETl·JEEM (i Arm '31(1 DEGREES IS FORl·~AF.:It 11
0750 PPHff " At--ID THAT BEn.IEEN 90 AMD i::::~] DEGF.:EES IS PEAF.'.l•.JAF.'.D"
(176t1 RETUF.:M
077(1 GOSUB 2(1(10
(i?f:0 RETURM
121790 IF Fl< 90 THEN ?:?.:0
08(10 IF B>.4 GOTO 770
0803 REM THIS IS FOR THE REAR PHASERS
(18(15 GOTO 710
0810 IF A>90 THEN 730
(i820 B=RMD i:::-=::i
0830 IF B>.1 GOTO 770
08:?.:5 F.'.EM THIS I::; FOF:'. THE FPONT PHOTOM TOF.:PEDOES
(1840 GOTO 71(1
IF A<90 THEM 7:30
(185(1
0860 :B=F.'.MD C>::)
704
0:::9(1 PEM
(19(10 PR I t-iT TAI: ( ;:'.O ·.1 ,' II
F! !-.. ,...
i I u A T ·-·--· D"
!::'1910 PEM
~~:i'3;~C1 F·F~It·iT ·:.i :-.-·.
-, .- c:·
" j ~i ' -' I i
U930 F'.ETUF:'.N
0940 Pl?Hff "Oti t:E:HALF or THE KLHiGOM EMF'JP[, I fiCCEPT YOUR '.:::;UPF.'.ElffiER"
09":;0 REM
0960 F'Fd MT TAB i: ;::~121 :i ; "PF.'EPARE ro BE -i::oAPDE.D"
n9?0 F£T'UF'.ti
09:::0 P=F+ 1200@ao. *-F:t-m f >=: :i :i
0990 IF 1.00000E+06 THEN 1010
101210 PETUF.'.t-1
1010 PP I MT 11
corn·F1c1· r·1or BROKEth t·1Ell n1'.:;TF1tK:t:= 11 ; p;" ~'M.
11
1020 RETUF.ti
1030 IF R<200000. lHEN 1060
1040 R=R-200000.~RND(X)
1050 PETUPN
1 060 R=R/c'.
1 tl 7~3 PETURN
10:::0 FTM
109(1 REM
1 1 (i(1 ~'~= 1
1110 K=INT(C7•RND(X)J+1l
11 c'.0 149(1
GO~;IJB
1130 IF N>0 THEN 1110
114•3 OM K GOTO l 150, 1150, 11 ::::0, 11 ::::ra, 11 ::;:(1, 1 E~::::o, i 290
1150 PF.'. I MT "KL r r··1crn·1 F 1PES PHOTOM TOF.:PEDO"
116(1 GO'.::;UB 20(10
1 1 7(1 F.'.ETURN
11::;:(1 PRit'ff "KLit·IGOt·i FIPES PHf·6EP:::; AT ElffEF.PPI'.:;E"
11 9(1 LET B=F.'.MD (>=: )
1200 IF B>.2 THEN 1160
1 c'.10 PRHff "You ouTMAt..1E:u•.__1i:::F.'.ED HIM, MI'.::s. 11
1220 F.'.ETUPt·1
123(1 PF-'.IMT "KLit··IGOt--1 ATTEMPTING TO 'BPEFIK COHTACT •••• II;
124(1 P=F.'.+ ( 2(10000. :<i:F.tm ( >=:) )
1 c'.50 IF F.'.< 1. ~30000E +06 THEN 1C.?(1
1 c'. 6(1 F.'.ETUF.'.t·1
1 i::'.7(1 PF-:Hff "COMTACT t10T BF.:OKH·I"
12B(1 F.'.ETUF.'.N
1290 PR I NT II KL I t·1GOH flPPPOACH I NG II
1 ::::0p IF R< 200(1(10. THH·l 1:;:3(1
1310 R=R-200000.•RND(X)
1320 F.'.ETURM
705
134~3 RETUF.'.M
135~:::1 REM
l ·:::E.0 F.~E~t;1
1 :::7(1 B==RND C:=-::)
1380 IF B>.5 THEN 1410
1 ::::90 !?==P+ C10(100•PND ( ::-:; J )
1460 GOTO 142(1
1410 R==ABSCR-C10000*RNDCXJJ)
1420 A==A+C100•RNDCXJ)
1430 IF A>1SO THEtl 14~i(1
1440 RETUF.'.t-1
1450 fi==A-1 :;::(1
1460 GOTO 1430
147(1 F.'.EM
14S0 F.'.EM
1490 IF W==1 THEN 1750
1 ::;oc1 IF E< 5 THEt"·l 1530
1510 0==0
15c'.(i F.ETUPN
1530 IF E< :::: THEJI 1 71210
1 ':i4~3 IF R >6€10000. THEJ1 159~3
1550 IF D==5 THEM 16:i(1
1 560 IF R< 2(1000. THEl1 l :;9(1
1::;70 P=0
158(1 RETUF.'.N
1590 PR I MT II THE F.:Flt·K;E OF A PHOTON TOPPEDO I::; 2(1, (10(1 TO 600' (U3fl KM. II
706
1840 IF R>300000. THEN 1820
1 :::50 IF H >6 THEJi 1::::;::0
1860 t·i=(1
1 ::: 70 F.'.ETUPN
180) IF P>H+l THEN 1950
1RgR IF P<H-1 THEN 1920
l 9ti0 M=l'l
1 910 r::'.ETUF.'.t·i
i:'. 1[1(1
P=P+ 1
c'. 11 (i
CiOTO 21 ;::o
2120 IF W=1 THEH 2160
c:: 1::::t:1
PF.: Hff "DI PE.CT HIT OM KL I MGON 1...•1c:;'.:;EL, DAMAGE PEPOF.:T-"
214(1 H=H+2
215(1 C:iOTO c'.:380
c'.16(1 PRINT "DIRECT HIT ON E..tffERPRI'.:;E, Dflt'IF"iGE REPORT-"
21 7€1 P=P+c'.
c'. 1 B0 IF P< 9 TH Hi ;:'.c'. 1 (i
2190 D=l
c'.20(1 F.:ETUF.'.t-i
2210 IF P=6 THEN 2290
c'.22(1 IF P=7 THEt·i c'.31(1
c'.2:'.::1-3 IF P=::: THEN i:'.:34121
2240 IF P:::<.:: THEM 22?(1
c'.c'.50 PRHff "SHIELDS HOLDING - NO IIAMAGE"
c'.E~60 RETUF.'.t-1
;:· 27iz1 PF.: I NT "SH I ELD::; ~·IEAKH~ I MG - MI MOP rn=1MACi[ IM MIDSHIP::;"
E:2f:0 RETUF.:N
2290 PF.'.Hff "ALL '.:;HIEL.DS DE::;TF.'.OVED - DfiMAGE TO OUTE:P HULL II
E:::::oo RETIJF.'.M
c.::::: 1€1 It=4
707
;::: ::::21;:1 F'F.'. I MT "F'HF1SEP'.=.:; DE ACT I t)ATED - It IL I TH I I.JM CHP\''.:;TALS 01..JERHEAT I NG"
C.'.:::::30 f:ETUF.'.N
c.:;:40 D=5
;:::350 PRI~ff "ALL ~·-IE:F1P0tt:; DESTF.:OYED - POL·~E:P DF'OPPitiG"
C.'36(i PF.:Hff "Mfl.JOF'. DfiMAGE TO f,JARP EtiGit1E'.:;"
c'.'.3?~1 RETURN
2380 IF H<9 THEN 2410
i:~ :::: ~3t1 T1=:=:
c'. 4~X1 F.'.ETUF.:N
•'.=: 410 IF H=8 THH1 c'.530
2420 IF H=7 THEN 2510
c~43(1 IF H=6 THEt··I ;;::4•31(1
E'.44€1 IF H>:3 THEN ;::470
;::45(1 PRINT "SHIELDS HOLDIMG - MO DAMAGE"
E:46(1 RETUF.'.N
2470 PRINT "::;HIELD'.:; L·~EAKENU1G - MINOF.'. DF1MAGE 11
c'. 4::;:(1 F.:ETUF.:N
c'.49(1 PF.'.INT "ALL '.:;HJELI6 DESTF.:O'r'ED - HULL DAMAGE"
c'.5(1(1 F.:ETUF.:M
c'.510 PFUNT "PHA'.:;EP BArn::s DESTPO\'Eit - MA.JOF.: DAMFICiE FOPE mm AFT"
c'5i::0 F.'.ETUl·?.N
;:'. i:;:3(1 It=7
2541'.1 PRINT "ALL ~·~EFIF'ott:; ClM KLH1GOM !..JESSEL DEACTIUATED, POl·JEF.'. DF.:OPPH1G"
2550 F.:ETUF.:N
2':i60 PF.:Itff TAB ( 1':i); 11 C 0 H C.; ~'. A T U L A T I 0 t-1 ::;:;"
c'.570 PR Hff
258~3 PRIMT "KLIMGOM UES'.:;EL DE'.:TF.:O\'ED"
259(1 PF.:INT
2600 GOTO 2700
2610 PRINT TAB (20J; "EMTERPF.:I:::;E DESTRO\'ED"
262(1 PF.'.Hff
263(1 IF E=5 THEM 26!:i0
c'.640 D=100(1*RND i:::-:::i ····.GOTO 266(1
c'. 65(1 D= 1(1(1(100. *RMD t: >::)
c::660 PRitff "RAnrus or MATTEF.:-AtffIMATTER D<PLOSION="; ri; 11 KM. 11
267(1 IF R<D THEM ;::580
26:30 GOTO 270€1
c~69(1 PRitff "COMTACT BF.:m::Et·h F.'.ETUF.'.N TO BA'.:;E"
2 70(1 PR Hff II AGA IM (YE::; OR MO) II ; ...... GOTO E'.76(1
c'.71(1 PFUNT "STAR FLEET HAS IIETEF.:MINEI1 THAT 'r'OU ARE TOO BLOOD-THIF.'.ST\' 11
272€1 PF.:INT "THEF.:EFOF.:E, IT HAS BEEN DECIDED THAT YOU l.ULL NOT BE "
27:30 PF.:Hff "AL.LOl·JED TO COMTINUE ON THIS F.:AMPAGE OF KILLING POOF.:"
274(1 PF.:INT "LITTLE DEFEMSELESS KLINGons. ADMIRAL 1.-JESTLAKE, II
2750 PF.:INT " '.:n1=1R FLEET COMMFINI•" . . ·.GOTO c:::::2i;:1
27E.0 INPUT A$
C:'.770 RESTORE
278(1 IF S4>=4 THEt·1 c'.?1(1
c:~ 79€1 IF A$= .. YEs 11 THEt·1 2:::: 10
2:::00 IF A$( >11 VES 11 THEM c'.82(1
c'.810 S4=S4+1·-....GOTO ::.:5(1
2:::20 PF.:INT 1111
E:::::::::i.3 EMD
708
DU 'r'UU 1-IHtlT Ht=;TPI IC:T I Ott:=; C/E·::: OR tKn ~:"rT'.::
l·IH I LE Ot·1 PFffROL. t IF:f!P TR I ::;~::ELL I ON--7' ...
Tl-IE u·:;·:;; Et-ITEPPP I'.=:[ J ::: COtiFPOt·ffE::::; I:Y
A K L I t I Ci U I i I : f: I T T L F C F' U I ·:: F F'.
\·IEJtF'Ot1F"f'
c'. F0Rl·4ARD PHF6EP I:AtJK::~;, PF!t1GE: :::t1f1, 000 U·1.
PEAR PHASER, RANGE:SAME
2 FORWARD PHOTON TORPEDO BANKS, RANGE: 20,000 TO 600,000 VM.
1 !?FAR PHOTOtl TORPEDO I:Arn:::, RANCE: ::;f1ME
t·I Ft ti F. 1. I I) E F.: '.:;
1-F JPE FORWARD PHASERS
c:·-FIF'E REAR F'HF6EF:
3-FIPE FORWARD PHOTON TORPEDO
4-FJRE REAR PHOTON TORPEDO
5-ACTIUATE AUTO DISTRUCT
6-'.::;tJRREJmER
7-ATTH1F'T TO I:REFtK COtlTACT--GO J t--ITO l·~FiF'.P DR I 1.JE
8-MOUE CLOSER TO THE KLINGON
ALL UECTOR HEftDHiC::; l·IIL.L BE BEHIEEN 0 At·ID 1:::0 DEGF::E:ES
KLH-IGON COMIMG HffO PFINGE-·-SHIELDS ot·1
THE RANGE= 91332.36 KM. AT A UECTOR HEADING OF 144.9378 DEGREES
WHAT IS YOUR MC~E?4
COMPLETE MISS, YOUR AIM IS OFF
KLINGON APPROACHING
THE RANGE= 45666. 1::;: l<M. fff A UECTOR HEftD I t·iG OF 1. 44. 937::: DEGPEE:::
WHAT IS YOUR MOUE?4
COMPLETE MISS, YOUR Ff IM IS OFF
KLINGON FIRES PHASERS AT ENTERPRISE
MEAR MI::;s
THE RANGE= 53897.81 KM. AT A UECTOR HEADING OF 62.60793 DEGREES
t·JHAT I:;::; \'OUF.: MOt..JF.:~?3
DIRECT HIT Ot·~ KL.HiCiot1 I.JESSEL., DflMACiE REPORT-
SHIEL..DS HOLDING - MO DflMAGE
KLINGOM FIRES PHOTON TORPEDO
NEAR ME;::;;
THE RANGE= 63323.14 KM. AT A UECTOR HEADING OF 100.1475 DEGREES
t·JHAT I::;; YOUF.' MOUE?4
COMPLETE MISS, YOUR AIM IS OFF
KL HiGOH FI F:E::; PHA::;EF.:S flT ElffERPR I ::;E
HIT ON THE us::; El·ITERPR I::;(' DAMFiGE REPORT-·
SHIELDS HOLDING - NO DAMAGE
THE RANGE= 61206.09 KM. AT A UECTOF.' HEADIMG OF 109.9991 DEGREES
WHAT IS YOUR MOUE?2
DI F.:ECT HIT ON KL I t··IGON UE::;SEL, DAMAGE REPORT-
SH I ELDS WEAKENING - MINOR DAMAGE
KLINGON FIRES PHASERS AT ENTERPRISE
HIT ON THE u::;::;; ElffE:PPR I ~:;E, DAMAGE F.:EPORT-
SH I ELDS HOLDING - NO DAMAGE
THE RANGE= 57123.84 KM. AT A UECTOR HEADING OF 154.9717 DEGREES
WHAT IS YOUR MOUE?
709
FOOTBALL:
DESCRIPTION
If you're a football fan this program should be right up your 50 yard line.
This is an authentic football game simulation. The game adheres to the NFL
rules and the play generated is as stimulating as you're up too.
USERS
NFL and AFL fans will find this game very enjoyable. The game will appeal to
anyone who has an interest in football, regardless of their expertise.
INSTRUCTIONS
The program contains all necessary prompts and instructions for playing the
game. To use ~ load the program and then type RUN. For detailed program op-
erations list the program before playing.
LIMITATIONS
This program uses the DEF FNX ( ) function and the FNX ( ) function exten-
sively, starting in program line 1090. Line 2030 contains an ABS ( ) state-
ment and line 6080 contains a Restore statement. The source code requires
llK Bytes for storage and 13K Bytes of memory for storage and execution.
710
l ;~'HJ FEM TH I'.:; I::;; FOCITBFILL
l30 REM THIS P~JGRAM SIMULATES A FOOTBALL GAME
1 4 ti REM THE: USEP CHoo::;;[::;:; H l ~=; om i TEAM 1=1tf[I HI ::; OPF'ot·iHff AND THEt-i
i :;iz1 REM ACT:; 1::i::; THE: C!UflPTEPBACK At·m DE:FDt:;JI)[ ::;IGt·iflL-·CFiLLEP FOP HVi; TEF°lt'1
1 ::4 F.'.EM TH I::; PF'.OCPF!M ::;AMPLE:::; THE OPPO::; IT I ot·1::; PLF1Y::; FPOM fl t·mM-L I t-IEF!P Tl I ·::;T.
c'.10 PF-'.Hff" THI::; E; PPo-·=nvLE FOOTBALL. 'r'OU UILL BE THE"
c'.2(1 F'PHff"OUAFffERE:ACK AND DEFEt~Sii)E SIGtiAL-CALL.EP FOP \'OUP"
;:'.:;:e PRHff "TE1=iM. '/OU HA'.JE 14 OFFEMSIUE Pl.A\''.:; c::: PUM:=.;; i::. PAS'.::;E::;:i"
c::4~~; PPit·ff"Fltm 4 DEFDt:;11..1E ALIGMMEMT::;.
11
c'.5!~i PPHff" THEF.E I::; i=J "fl~O-·MH·IUTE L,~fll?tHt·iG BEFOPE TH[ Hm"
c'. 6(1 PR r MT 11 OF E:ACH HF1L.F. FI UE ro '.:Eur:Ji PLA"i"::; APE. LEFT In THE"
c'7(i PF.'.Hff"Hf!LF fff THF!T POI MT a II
c:' :;:: 0 PF.: Hff
3'::10 REM
630 PRitff
E.::;:(1 PRINT"YOUP TEFIM 11 ;
711
6 9(1 1r·iPUT ,- .:?
700 LET G' 1l=A$
7 c'.0 PP· :·n" OPPOHEJ·IT" ;
II ,/UT B$
?·;::~~i
740 PPHff
750 LET 0$C3l=B$
760 IF B$<>A$ THlN 800
7?0 PF'Hff"YOU AF:'.E II; A$; II. TP\' AGAIM. II
1 1 30 PF.: I !'·ff
11 4(1 GOTO 120l1
1 15(1 PF-; I NT 0$ C1 ) ; " !...!OM THE TO~::;::;. "
1160 PPIMT"DO \'OU ELECT TO l<ICK OF-: PECEil..JE";
11 70 It"!PIJT C$
1. 1 :::0 PRINT
1. 190 IF C$="KICK" THEt·i l;::'.20
120[1 C!=-1 '¢!0
1210 IF Z9>0 THEN 5990
123t1 Y=::::o+ 1MT c40:.:i:n1r 1: 1 :i )
1;:::40 PRIMT v;E$:c1J;" ";E$CE:)
1 2 50 >=:=::~:: + i: G!:Q:'y
1
)
712
l ::'.?0 THEH 1:.::50
l2B0 GOTO 1·:::i)O
IF >=:·:::100 THEJ·I 13:=;0
PR I t·-ff E$: ( ·::;: )
l 3 lCi D=O
1 ::32~::1 :=<=5(iwf-· ( ::::~J:¢:t))
1 ·;:::::f1 G!=-1 :¢:C!
1 340 GOTO 1 ¥'.n?1
1~~~ IF P>14 THEN 1370
1360 R=INTC40*FNFC1)J
713
1890 IF D>2 THEN 2000
1 920 IF At:::; f 10-3) /3 THEN 1950
1930 P=12+INTC3*RND(-11)
1 ·;.14c1 GOTO 2330
1 950 IF P 1 >12 THHI 1;:::?O
1960 IF P1>8 THEN 1990
1 97~:1 P=P 1 + 1
714
C'.::;2~:1 :D=~::;=~~.i
2530 IF Y>FNTfX,QJ T~lEN 1300
2550 R=INTCFNFl1l~YJ
;~'.SE,[i C~1]TC1 27:::121
2590 IF RNDC-ll>.20 THEN 2630
i~~'. Ei(i(i F'F:~ I r·u·IT ( ;~4·) ; JI F'FI TI _.Eii II
~::, f, 1!-~1 F"~=[i
2670 Y=20+INT!30~FNFC1))
;::i:.;:;:(i PPit-iT y; II 'r'f~!RD PUNT"
2700 R=INTC35~FNFC1J)
c:? 1 ti e;cno 27::::0
;~:'.7:3~3 F.:Et:1
;::·? 40 Y=3~-i+ r r·ff f 2o:r:i:n1r i: 1 :i .,
E?s0 PPnff v; 11 \'flPD KICK"
C.~ 7 E,~:::i ::<=::-:: + t: G!*\')
2770 R=INTC10•FNF(1Jl
c~?::=:0 GOTO :~:·36(j
2840 IF Q(0 THEN 2940
;;:·:;::50 IF Ft-ff i:::·::, I]) >;:·0 THEJ1 2:::::::~3
C'.~::E,(1 Ir3=:3
C~:::7~1 i:;t]TCI :::,:(11 ~~I
2880 IF ABSC10-Sl<20 THEN 2910
;;:· e9t1 D9=4
;:: 9(10 GOTO 3(110
2910 D9=1+INTC2~RND(-1))
c'.920 CiOTO 3010
E'.94(1 PPHff"DEFEJ·l::;E 11 ;
c'. ·35(1 I MPUT D9
2960 IF D9>4 GOTO 2966
2962 IF D9<1 GOTO 2966
c'.964 GOTO 184~3
;::966 PPHff"YA PPIMADOMt·1A ! CALL A PEAL DEFTr·IES, OKAY?"
2968 GOTO 2940
301(1 REM
302(1 IF P>8 THEl1 °::'.:C.:::::0
::.:0::::~:::1 IF P >4 THEM J0~i(i
304(1 OM P GOTO 3E::.:0, :;:0:::(1, 31c'.(1, ::::120
305(1 ON P-4 GOTO ::::0:::(1, :?:160, ::::160, 32(10
3080 IF P1<>1 THEM 3230
3t19t1 GOTO 3210
3120 IF P1<>2 THEN 3230
:;: 130 GOTO 3c'.10
715
3160 IF P1<>5 THEN 3230
:::: 170 GOTO 3210
3200 IF P1<9 THtN 3230
::=:c~ 1~~1 LI= 1 a C'.5
3c~20 GOTO 3;:'.60
3C.'.30 U=1
3260 IF D9<>1 THEN 3290
3270 IF P>5 THEN 3410
3280 ON P GOTO 3430,3410,3390,3410,3430
329(1 IF D9< >2 THn·I :::::3c'.0
3300 IF P>5 THEN 3410
3310 ON P GOTO 3410,3430,3410,3390,3430
3320 IF D9<>3 THEN 3360
::::::::::::i:1 IF P >5 THEM 3::::50
3340 ON P GOTO 3430,3430,3410,3410,3430
::::350 IF P<>9 THEM 34H:J
3360 IF P<13 THEN 3380
:337(1 GOTO :-;:43~)
:::::380 IF P< >B THD-1 3410
:3::::·30 t~1=1. C~5
3400 GOTO 348(1
::::410 M=1
3420 GOTO 348(1
716
::Jjt~:1 ("j1JTC1 4.cr3t:1
:;: ·=.t:3t1 F1 F.~ I t"1TE~: f -~!:::~ J
>~:=>< + f C!* Y' :t
1
:3 34(1
1
3950 R=INTC15~FNFC1J J
'3'3E;~3 F·=1 ~=~
~3 t3 7~:t 1)=~::; =Ci 1 =f~
C;C1TCi 4.;:;7(1
~:::·;1~:::~:1
i:.l !J:3C1 IF f;F:~:; ( F.~f"iII ( -· 1 J .. _.is ~:;) :.>. C.:.14 THEt·i 4 5i'fi
4 0 4(1 p:=:= i
,~. i?t 5li C:iCiT Ci 4. 71 t~i
4060 IF INTC2•RNDC-1ll=O THEN 4130
4070 L·l=-1
4080 IF INTC2~RNDC-1ll=0 THEN 4110
i:l li '3l1 F·:=:= 1 ~i
4100 GOTO 4150
4 120 GOTO 41 72!
717
= =
.-
:;:
..:....
(lj ....
::
.-. 0::.
c:::i
l=J
.-. co
l~t l~I
·-·
((1
0.1
I
((I
Ld
r-1
r--
OJ OJ ::; i:i:i 1=:;:; ::-
LI°)
":'j'
if)
~r
((I
i;s1
1T:
..._. ·-·
((1
·-·
l_i ·ifr µ::, I-·
..,...
~
:z: ..J
....
j=f 1I:
....... ~
t;J
:r.
I-
w
I
I-
::;
..:....
1-1
,::-.;
c.i:::
= ~fr
i=I
(S:i 1:S:i
1i·1 >t-f
fr-:, •!)
·-·l=·
0...
•:S:i
tj- i_:) .-.
(ij (!j
• •. .c
t-=·; ,-
(S)
~:
(S:1
((!
'·D ~::r
1S)
l~i '.~· ~~i
·::r
1 l)_i
0
~omo
0m0-
G
,. _
1-S:11I
~:r Ci
10:::-i
r~
i"-
·::r
iI (S)
":- 1.£1
- (S)
!~) l!IA'·
= 13'.1
OJ if)
C'°) L :Z:
1I
0::.
"':T
·.J ::·:_
ii-. (:.:; :. j:::::;
::( tj·
••
~o..
:~: ~~'. ·tj-
~oom~
~ ~
'!~! .. ~'".:::!
Ct::
= -::r
Z:
ar.
= = (S) i..W W
l.C:• I I
I-
::-::
._, ):: ·-< }:: L.. .1.- .L- ('J:: :z: .-. .-. LLl I- I- LL,,
:z:=~ 1-~ L W ~ .,;... UJ LJ z: i..1.J Z:: L!.J :~- LW .£1 1
:~- I 1S) (i\ ..::...
~:z:~ :Z:I-- W I !
~w i.J.J ...!...
"'r''
I
:r Lw :c W :J.:: I ('"1 ·-· l-- -.::r (S:• (1) (S:1 Ld "'-1,....., ~
~~ru~ :r !·~... ~J~: (:;'.! t-"" = 1::.;:i i-··· -- 1:S:1 ((t
~~L9~~9I
!- '.,,_.· ~ l,IJ "·/ l.J_ i,IJ I- "':T
0 Q
..-1 ["- i·"-
..'""
,
......
1-· ;S:1 i-.. I
((! i-- I-· ((! u '*'· 1) ) -lit ((t ~Ci
(S) ·-·
1~~1 i:o ·!fr
•.£)
.(i
1
•
1:S:1 ·-·
o:i -4.i'r
1,£1 I (fi ((I (S)
".Li !-- ii Ii Ci"
(S) (..)
13:1 H
i:(; ·-· If') CC• ·-· LD 7 "':T "':!'° ;¢=
LI'.; 1,.(1 tj\ · :jM
1
( 1
') ('.;) f···- (S:1 l..i..i f"- (C
::- ..·... (iJ Li.J If'.> ('~' LJ LI') ...-1 OJ LI''.! .,..-1 :::.:::
r1 .. I- ot:"J'" a_ 1- -g- (~;) ~:r tj·· z: . -4 c::; 1~: "'.I" (I\ - .,...., 1:S:1 'r"I II ":t /'., ":j"· ••.•.· 11-1 1-:'; 1'"':·; 1r1 ,:z:, + + l~lj if) =
:i:i; :z:: .... /· . . .,. . '°'"· Ii 1- cb - · 1-- i. 1:ci :i · 1-
::..
-:r 1'1 '--4 .-. fl i 1-1 ,-, '7
0::: /·. ·-·
!"''"'! -i-1 :-1 ....... LI
-· . .. ,I j'.:'.: . - II i=:, - ~• ;.. i ~: j::. ... ::.::
1::i::1 /··.
·+·
.w..., ;--·::1
~~7~, ....
r"" t""'
·.,/ 1--
1-1 i-•
"·.." l-
1=1 ::{ ::( 1:L. Li~ 1::1 :;.... :;::.~ l=I ::- z.: l=i ..,...
H I-· j'.:.~
0... 1-1 :z: t""IJ .,..., ..-1 - ! ...-. l-1 ..,...
i= !--! '11 I ii 0°:1 i i=: j'.:; ii ((I
1:J::i /
=I
... OJ CU
i:::.: ((! ((I l=I
1..() l=t 7:
I-·
1-- ··~.t· !-·· .....,
~ Li... 0) ..- l.1... ((! Ci LL II Ci II C1 LJ L1_ ii C• i..1- l..L L1_ Ci LL Le.. l.1... Li- C1 LL 0::: 1:J LL 0::: C• o::: LL C• LI::: i:r.. 11 i:o 1=1 ii 1=• LI::: i:1.., p Li... 1.J- LL 1;::1 JI p Q:::
LI... l_ .... Li.. 1::_1 1--J 3 1:.J 3 (!,i 1:t::: 1-·>l )::
r--1 ,......( 1:5 l-·~l I-··! ,....., (.D Im"! I,.•••! 1--H•! }•m•j 1:..:J l-4 LJ... (.,~ t--t CL. I~ LL I-! C.'J CL CL 1::; ((! CJ c;;; t:_::! LL.. LJ... 1_'.} l-...., ,_.., f-··i l,,,!J u... 1_:1 l.J...
OQQQQQQOQQQ~QQQQQQQQQQQQ0QQQQQQQQQQQ~QQQQQQQQQQQQQQ
o..-1ruM~m~~-0000..-1ru~oo~o-ru0~moo~o-ru0~m~~oo0m~~oo~o-~m~~oo00..-1ruM
~~~-:t"':T-:t~~"':T~m~m~m~~~~~~~~~~~~~~~~~~~oooooooooo00~000~00000
~~~~~~~~~~v~~~~~v~~~-::r-::r-::r~-::r~~~~-::r~~~~~-:t~"':T-:t-:t~-:t"':Tv"':T"':T~mmmm
~:iCi'.5Ci IF :: '/E~ ·.:;" Tl-·tEJ· I ;:::~5·3Ci
:'.iCi55 IF u•.(u T. IEJ·I ;~~;·31[1
~=;r1E1C1 F·F.~ I t··j~r ii FtL1:1'l 11
':':!070 IMPUT P
5080 IF P>14 THEN 5060
5090 IF P>l2 THEN ~220
r:; 1 ti0 Pc'.== 1
::; l 1~3 Ir3=2
i:::: 1 ;::'.0 COTO ·x12~:1
~5 1 :.:!0 F.:2=t1
5 14ti IF Y< 4. i THHl ~-:'ii::C::O
~:; l 'S[i
~; l E,[1 PF.' I MT E:$: ( ;:·4) ; II·:; F!F.'.E GOOD I "
~"i l 7(1 C11:i~=;iJE: ~:;E.t.[1
CitJT() 5:3::~f1
i:; 190 F"3=i
~:"; ;:'. (i(1 c;cc::;~J~B SE.E.(1
':'.'iZ::10 C;C1TC1 5::::~:::(1
i:;c::;::'.(1 PPHff E$ c:::4 :i ; 11
:=irTEJ1PT FF1ILED"
~)2:3~~1 C:!Cl"f(I 5:3:::!C.::I
~;2::::1.] ~=;=::::·+'/
IF :::;:>·3 THEH ~'i:;::;;:::(1
:;;::·:.i~:1
5300 IF D(4 THEN 5350
::;3 i (1 G!=G!~ ( -1)
~-; ·320 I.1=:::;=C:i 1 =~J
5:~::3121 IF F·> 14 1·HE:r"ol 5:;:5;z1
':i :;::4(1 B ( 5+C!l =:B ('5+0 :i + l
':i350 IF P=H:: THDi t;::::E.~?1
:536ti GOSUB 1450
~i :370 C~CtTI] 1551Z1
::; 3 ::::0 PF.: I MT
::; ~3 '3t1 F·F-~ I t·iT Ct$ ( 1 ) ; u : u ; !'.:; 1 ; 11
~;4;;::10 PPIMT
5410 D=S=Z=Pi=G1=P=P9=0
54;:'.0 IF s::::< >O THFN 5450
':i43(1 G!=O*- f -· 1 :i
~~; 440 GOTO 120~:1
5 4 50 >=:=50- i: 3C1*CU
'5460 PPHff E$t:2:i; 11
FF.:OM ";O$(AI:si:o-;::'.:i :i; 11
;::o ";E:$:(6)
~i 4. ?t1 ~=;::::=(1
~i4:~:0 GOTO 12.~:(1
~i49t1 T=T +1
550(1 IF T=H9-~i THEl·I 5591)
5510 IF T=E9-5 THEN 5590
5520 IF T>H9 THEN 5540
553(1 GOTO 565(1
r554(1 IF Tl >O THEt·! 563~:1
5550 IF RNDC-1)<.35 THEN 5650
~i56C'l GO'.::;U:t: 5B10
':i57(i ()=T5
719
=
C1
z::
0:::
0
((1
Ld
::-
((I
()
1-i
....... =
1-
~ 1~1
((1 :<t=
-
1-1 i"1;.1 ....... II 0
+ r. ..1 N
=
1''1
Z:
.......
.......
...13:1
1:1:1
If)
,. :
l-
a::
I-·
((l
w
E
i:o~.
- ..,
,.,
0:::
i=l
1:0
w
-:-
-
1-
II
- '1
i
II
0
"
..:...
U::: a:: 0 ~
~
~ 0 TI
•I . 1':"i_ i.C1i-::"'i •"=:'110::-11'1"1
3. W :: - i:r:, If:, + w ~ 1S1 if
0I ~ W I- m0 ~ G Z 0-0...
w t---
if) 1:r· (S)
1 1S:1 + E Z: lf) ~ ·-· 1I ~.j) ll
l-- ».Li C.L. 1S1 Ll'°:i ::- .- : ([ 1I Z: ... CL 1:.;J Z: .,--;
;;~ m0 +~ ~+ G W ~ 3 WZ:: ~ - WZ::il..
-"-
!-4
·-·- lJ':;
...:... •
·::-: i.t
!_c•
i.O ·::-:
!...;:•
+
.,....;
E
1-1 Li_
_
-'
~[ W
1-- ..l...
CC
"" '>;'j"
.-.
..-!
0:::
w
I ~ J1. If)
j-- ..!... l,IJ ..-1
~ WA +z:: Z::+ ..-1 I- 0 0 !- = + I 1-00
l J:: .-. W
C1J LJ CO ·-· Li... ::- = !- 0,...... i- :: II 0
;S:1 (.:• i:s:i 1- .,.....
i
:r:
<_, c:~'
;:c. 1-· ;:r., ....... IJ".
I ·-·
i-- 1::i::1
1:S) ~·
".!) !i
-i 1:S:1 i~
1I: Li") Z:
1=1
C• i/1· z: Z::
= i:c
1--
r-· ·-·
<.Ir
i=• ,=, = . . .-\ 1-
Z: ·IJ't Z: Z: ((I
iJ\ ::;: i.r1 t:S:I
(1~; I-·- '.i) i:r.. ·-·· !I c f"- 0... II r"- .--. :I ((! LJ i::i .:..:i :: = ((I 1:S:< i::::i 1:r: (.) = = II ...... w Ii')
i.(-:! :: If) Ld i::t Z:: .-.. 1::;:1 t.ri f' +
Z: (0 .-. i.J'"'.• c; :Z:: If) = II ii = ::
:: II t-·1 ...... Z: = Ii II I- II G:• 1-1 0::: (•~!
1-- I- 1-- ·-./ Z:: 0::: •::; /., C•J .,..., 0::: / ... c; 0::: I-'· +1-- i- t··- ·1.i'!· <.it !- 1-- 1-- 1-1 I- 1-- II Ct:. i- 1-- i.i't .t/r II ,....,. II 0
oz::z::z::o1--0:::~+000000~0..+o-~roz-z::~uuz::z:z:: z::1-z::-~~
!-·- 1--1 ...... 1-1 1-- I-· (lj II I-· 11 i- I)) 1-- .,._, I- 1-i 'I- 1-1 11 1-1 0.. ,. . ., . . . . . . . . 0::: H ::..: H 1-- :::c I- il.. z .z::~uui::::i
...
II 0::: 1-1 ::-:: ((I II I- i=i -1-1--0
O 0::: 0::. 0::. 0 Li.. Lt... W ·-· Lt... Ct.I C1 .,..... W Li... ·-· 1::1 ·-· W Ct:: 1=1 Ct:: 1J" 11:. Z: Li.. Lt_ 0::. 0::: Ct:: Ct 1:J::: W 11:. II 11 l.i..I 1.J 0::: :Z:: Li.. Li.. (T" C• ·-· W W (1) C• Z:
G~~~o--O:::~HOOGOOO:::-~G~ll:.il..O~N~---o..O..O..Li...~Z:~N~ll:.ll:.~--HNl..t..~:Z::ll:.H~W
00000000000000000000000000m00000000000000mo0000M00
0000-ru0~~~~0000-~0~~0-ru0~m~~~oo00-ruM~~~~0-ru0M~~~~oooo~0
~m~~0~0~~00~~~~~~~~0000000000000000000000~~0000000000000000-
~~~~mmmm~~m~mm~~mmm~m~~mmmmmmmmmmmmmmm000~~0~~~~00
n I I c; I·:; PF'fl--•'.;T\'L F FCU-1TBflLL. \'(!l_I ~I I LL f:[ THE
01.lf-tRTEF'f:FICl Htffl DEFE.tt~:; I' I[ ::: I Cit1AL -·OiLLEF:: FOP \'Cit !P
TE fit· I. '/(II.I Hfll I[ l 4 OFFE:ll:::: II.IE PL.ff/:::: c:::=.: PUN:::;; (, PA'.:/:;;[::;;)
i=it!Tt 4 l!EFTt1::::11.1[ !::1LICitlMEl·IT'.:::.
THFF'r T·:::: Fl n1c1-- t·I J t IUTE l·JAF.'.N I tJCi I;[Ff!P[ THE FJ III
OF EACH Hf-tLF. FJ U[ TC1 '.:'.;[l.)Et! PLfl\':::; APE LETT Iti TH[
HALF FIT THAT F'(JHIT.
F'.Utt:;::
1 :::J! I 1.J[; ·~'.::::OFF Tr=1c1:1 . . r; J::::::::c I ·:::::::OP'.:::; 4=TF~·i::1p
1
:'1=::::~·-IEEP; f.:::OF'T I Ot-1; ?:::F'EU[F'::E; ::::=ItPml
DETEtt:::E?4
:::~·~EEP
E: 'r'FIPD LOS:::
HOLDING PENALTY ON .JETS
PENALTY ACCEPTED: l':i \'AF.'.I6
BALL ON RF~S 35 \'APD LIME
FI P::::r Dm·JM RAMS \'FIRDS TO GO: J(I
DEFUt::E?c'
::;I DELINE
INCOMPLETE
NO GAit·1
BALL ON RAMS ·::!:; \'F!Pfl L HIE
:::Ecotm DOl·U·1 \'ARDS TO GO: 10
DEF'Ett:;E?c'.
DI I.)[
1 ';'f"iRD GA H1
BALL ON F.'.f'iM:::; 36 'r'AF.'.D L nu:
THIRD DOWN \'ARDS TO GO: 9
721
FUNDS 1:
DESCRIPTION
Funds 1 performs financial projections for an investor. Funds 2 is used to
plot the data from this program. The program is normalized to allow various
investment plans to be compared.
USERS
Individuals and companies engaged in financial speculation and investment
would have use for this program. In addition, it could be related to any
homeowner, as a home is an investment. With this program one could do e-
quity projections on a home for the purpose of loans or additional invest-
ment value.
INSTRUCTIONS
The program is self prompting and requires no maintenance prior to execution.
The program normalizes all investments to $100 and makes projections for a 50
year period. In order to correct for other investments the investment return
need only be scaled by the ratio of $100 to the true $ investment. For example:
if the investment was $14,100 then the investment return projections should be
multiplied by 141, and so forth. The program can be listed for additional op-
erating information.
LIMITATIONS
Funds 1 uses two dimensional arrays, starting in line 100. Line 910 contains
a TAB ( ) statement and starting in line 950 Print Using statements are used.
The source code requires 4K Bytes for storage. Execution is a function of the
length of the projection as set in the DIM statement in line 100. With the
present setting the program will require 37K Bytes of memory for execution.
This amount can be significantly reduced if the A(32,100) table is reduced,
however this will reduce the length of the projection. The program is pre-
sently set for operation without a storage file for the tables. If the re-
sults are not to be plotted with Funds 2, then there is no loss, however if
Funds 2 is to be utilized, it would be advantageous to convert this program
to use a storage file. Instructions for utilizing a storage file are given
under Funds 2. This program has been written without file statements as most
small system compilers do not have this statement and the object of this li-
brary is to be as universally compatible as possible.
722
f.
4':';F:'.EM
c_"iCIREM
60REM~•••••••••••••••••••••••••••••••••~••••••••••••••••••••••••••
180 UIM A(32,1~~J,Tf60J,Bf l
jen IiiPUT P2
1 90 F.'.EM u:::;ER ::PE:c IF I[:::; E:>=:PECTED RATF OF RE1l.iPN F.' f!tffl '.::;TD DP) I fH IO!··! ·::;
;::·0t1 t?EM U=LOG ( 1+P1 J HF1:::; DI::;TPIBUTIDl·I UITH [;:<PECTED UFil.UE Uc'. FIND
;::'.1 (i PEM UAR IF1t·1c:E: :.::;;::·' ~·lH I LE Pi HAt:; t·iEAH F' fir ff! 1..JFIP I Fit-ICE :::; i .
220 REM DEDUCE S2 FlND U2 FROM R AND Si
240 LET S2=LOGCS1/(1+Rlt2+1l
;::'.50 L[T Uc'.=LOCi ( 1 +R) -· r 1 ..··;::'.):,;.:LOG ( :::; 1 / ( 1+R) ·tc'.+ l .,
260 REM NUMBER OF PERIODS N
;::'.7(i Lr::T r·1=~=i(I
;::: ::::0 PEM MUMBER OF :::; I MULfff Iott:; t·i 1
;:::90 LET Ml=i1X.i
::=:00 REM SIZE: OF rutrn THRE.E PPECETIHiG '/EHP:::;
723
4i:::,o LET ·c>==(i
.:.f?~?.1 LET Gil=-· 1
4::~:~::t
l.E:T H 1 ~<:
490 F.:EM DF' ~·J RATE OF RETURM AND COMPOUND FOP~.JAF.:D N '1"EARS
~i00 FOP K=1 TO t·i
5 1 0 CiOSUB 11212(1
520 LET TCKl=TCK-1J•CR1+1J
~;:;::121 F.:EM COMPUTE Cot'fTPIBUTIOtiS F·tt·rn HITHDF:'.AWALS
~i4(1 GOSUB 1100
550 LET TCKJ=TCKJ-E1+C
560 REM PLACES SIZE AND WITHDRAWALS IN MATRIX. ACX,YJ IS FOR INTERUAL x,
570 REM SIMULATION Y.
580 IF K<5 THEN 600
590 IF K/Il<>INTCK/Ill THEN 610
60(1 Go::;tJB 1245
6 iO HE::<T V
6i:'.O ND::T I
E. 30 F.:EM PUT MFITR I:=< IN F1:::CEND I HG ORIIER. fl C:=<, "f' J I'.:;; \'TH LAF.:GEST FUtfft SIZE,
640 F.:EM H·I ::HMUL.FffION :=::,IF >=: r::; onn, \'TH LFIF.:GE~:T PAYOUT Iti SIMULATION
650 REM x, IF X IS EUEN
660 FOR P=l TO CN2+4l~2
670 FOR 1=1 TO Nl-1
680 FOR J=I+1 TO N1
690 IF ACP,Il<=ACP,JJ THEN 730
700 LET Q1=ACP,IJ
710 LET ACP,Il=ACP,JJ
720 LET ACP,JJ=Q1
?::::f1 MD::T J
?40 NDff I
?5[1 NDff P
70::.iJ F'F'H-IT 11 1'-1 11 ' lb 11 i'H"' t·l:L' II Jl 11' I1
??0 FOR I=1 TO CN2+4l*2
780 FOR J=1 TO Ni
790 Pl? I t·ff 11 Fl ( II ; I ' j; II ) ::" II ; t=I ( J ' .J)
t·4E::<T j
:::121(1
i"I F:>::T _I
::::i 0 .
820 FOR I=1 TO CN2+4J•2
:::JO LET B CI ) =O
::MO FOF.: .J=1 Tot·H
850 LET BCil=BCil+ACI,Jl
:360 t·IE::ff .J
870 LET BCil=BCIJ/Nl
:::::::(1 t--ID=:T I
:::90 PF.'.It~T"
II
724
940 IF I>:::: THDI 9t.::::=1
·;:14? LET I9:.::=I9+1
948 IF BCIJ~399999.99 THEN 954
9 '5(1 PP I t·n U'.:; Inc i ;:::· :::ci ' I •j ' fl f I ' n l ) , I: ( I ) , \::! r I , 1 ) ' HI I + 1 )
·::1~;;:: GO TO 9::;;:(1
954 PRINT USING 1290,I9,ACI,N1J,BCIJ,Afl,ll,BCI+1l
960 GOTO 9:::0
969 LET T8=T8+I1
972 PRHff u::;HIC 1;:::::0,r:::,flfI,tHJd:;c1:i ,A1I, l) ,t;!I+i'I
':'.)74 C~C1 TCi '::1:::(1
976 PRINT USING 1290,rs,ArI,NlJ,B(I),AfI,1),B(l+i)
·::190 PF·InT
1Ci00 PRit·lT
i 0E'.0 LET F:':::=i~i
1030 FOR B8=1 TO 12
1 Ci40 LET F::::=F.::::+F.l!T) ( ><)
725
1.. 1Hfn FIRE [:::J>r:.:cn:n p;::1n:: or F'.FTUl~:'t-1 i::n In ::;Ti:'li irn=1PT1 [l[U I AT'[ Cl! I ) 1 •::;, • 1 :=.:
u
726
F:'l..H··I
l·~HAT FIF.'.[ E:>::F'F:CTETI Pf!T[ OF" F'ETUF'.h r:11· 1n ':::;TT!! !TIFIF'D [![!)I 1=11 I on ? . 1;.:i::::, • I)?
1=1T ~..!HAT F'.HT[ DO '-1'0U F':OO:F'FCT l·IEJ·I !·Kl! IF'\' TO nrn:1r11 ? • 0 i
1. .1HAT 1~::FnE: or :::;;p[J-ID I!" iCi I·:::; [:I iDGE.T[fl ? . c14~::;
f!T 1...IHAT I J·ITEJ:'l..JF'.1L:::;; TIO \'OU i·I I ·:::;I-I Tll, -::; ? l 0
l.JF'F'E:F'. L. f1t..1E·.e
PE:F.'.IOII BO!.li"-!D F:C1tJilD
l 4 11 ~:;i~'.!
·i r:::--::•
'"Tu .~. 1 I
727
FOOS 2:
DESCRIPTIOt:I
This program is the plotting routine for Funds 1. It may also be used to
plot other data bases, if they are formatted for this program's input.
USERS
Users of Funds 1 will have the most use for this program, however Funds 2
can be used to plot the results of any financial analysis.
INSTRUCTIONS
This program is also self prompting and will ask for all necessary inputs.
For additional information list Funds 1 and Funds 2.
LIMITATIONS
As in Funds 1 this program uses two dimensional arrays, starting in line
100. In line 1331 the TAB ( ) statement appears and is used throughout the
program. The source code stores in 5K Bytes of memory. The execution length
is a function of the reserved table size. With the DIM statements as present-
ly set, it will require 38K Bytes of memory for storage and execution. This
amount may be significantly reduced by reducing the 11 A11 table. Due to the
length of the tables it may be more convenient to store the data from Funds 1
in a use file and then have Funds 2 read this use file. If your compiler has
file statement capability, the mods would be:
FUNDS 1 120 FILES: PLOT 1
128 Scratch #1
760 Write #1: N, Nl, 11
790 Write #1: A(I,J)
728
4':ik'[M
::iOPEJ1
DIM B(35),A(35,100J,ur351
F'F'ItlT JIIi·IPUT n, r·i1:. IlJI
.-.,c;:·I
1 ....
l,,.,,,. - · Ii !F'UT I ! , !'-I 1 , I 1
U:.:T !·!;:>:ti/I l
FOR I= 1 TO C!!2+4J•2
140 FOR J=1 TO N1
1:-::i1:.:1 F'F:I!rr JI Il·!F'LJT n (JI; I, J; JI) JI
155 INPUT ACI,Jl
1 r::.~:1 i!F::O<T ._I
II
729
:::·\-!) LET C1=c'.:i;i:C
:::r:::.o LET C=:::~*C:
.::1::,~J JF AfC:1,1~11?):::::~~1 ..f,~·!E~!i i5C'.~1
.:;:;::;.i:i IF I:= 1 THE:Ji i ':i;::'.O
~::?'~'! I!=- !J$:=="r·!0 THEJI .:.1.~:~0
11
730
830 IF E<>D5 THEN 860
U40 LET [::::[+1..Ji
::::~'.i0 GO TO 870
::::1~~,iz1 LE.:T E===It=:t
:::: 7'~~1 CO TO :::90
:::::::o L.E:T E=E+1_11
:~::9(1 IF F j THF.J I UJ'10
900 IF Z=2 THEN 1010
910 IF [::'.:=H:i E+? T!·IFll 9t:.0
·;1;:'.~) LET G6= 11
930 IF U8=10 E+7 THEN 1100
94(1 LET G6=10
9'::i0 GO TO 1100
·:.160 IF !J::::::::l(i ? THEii 990
':~17(1 LE~T C!Ei=--= 11
·::•:::0 GO TO 1100
·:.190 LET G6=E'.
1 ~-=-·n1f.i GO TO 1 i 00
1010 IF E7=10 f+7 THEN 1060
1 (i:3i) IF- I..J~?:::: 1 ~i E+·'"? T"t-IF~t ·I 1 i ti(i
i (14(1 LET G6= i !21
GO TO 111:10
1 ~-=-1~vi
1060 IF !)7=10 ? THFJI l(i90
LET GE.= 11
1 (i7(1
GO TO 1100
1 [:180
1090 LET G6=L:'.
1100 IF F<~G6 THEN 1190
1118 IF Z=2 THEN 1150
1120 IF U8=10 E+? THEN 1180
113(1 LET [=1)4
j 140 GO TO 117\-::1
1150 IF U7==10 E.+7 THEt"-1 11:::0
1160 LET E==D4
11 ?'(i GO TO 11 ·:,10
1180 LET E=A(Cl,100)
1190 FOR I=H+1 TO 100
1200 IF ACC1,IJ>E+.01 THEN1230
1210 LET BCFl=BCFl+i
1 E'.;::121 LET H= I
1 ; : '. 30 HE:=·::T I
1 c'. 40 LET I) ( F) =E
1 C'5f1 IF 1. )$= II \'E~~=; I! 1·t-·IEJ··I l ~~~:=~~?.1
1260 IF F <>10 THEN 710
1 c'.7(1 CiO TO 1 :::oo
1280 IF F<>G6 THEN 710
1290 CiO TO 1540
1 3(10 IF Z=2 THD··I 13'.::i(i
1:::: 10 PF-'. I MT F ut·m
11 11
; K$; 11
ti I ·:nF 1t:UT I m·1 OF n_1tu1 1..1AUJE:S Fff 11
; B; "'r'E"f1F'.::; 11
l 32~3 PP I MT
1330 LET G=INTCAfC1,1J)
731
i ·:;·:.: 1 F-'F~ I r~1r c;; ·rF:rt.:: t i C' :t ; " : "
1340 GO TU 1·:::::::~_::-i
1 J5l:i PP Hff" F·ut 1n " n=:.$; " DI 3TFU BUT r m··1 OF i·H THIIPA~·mLs AT" H:; "YEAP'.:;"
1 J60 PPHH
1370 LET G=INTfACC1,1J•100)/100
1 :~:·71 F'F.~It··JT c;; TFLB f l;:::t; 11 : 11
1380 FOR I= 1 TO 10
1 :3=3~.:.1 F1 F.~ I t·1T TAI~ f l 2) ; II : II ;
l ':;:;:o GO TO 200
1540 IF Z=2 THE~ 1630
i':i50 PF.'.IMT". Flltffl 11 ;K$; II flISTi::::IBUTI0t·1 OF FUMD '-..lflLUE::; AT";r::; 11 \'EAPS"
1560 PPIMT
i::i70 IF E0::::=10 E+7 Tl-IHI 160(1
1580 LET G=INTCE8)
i ::;a1 PRHff G; TAB i: 1c:::i; 11 : 11
15'3(1 CiO TO 17'1 (1
1~~~ LET G=INTCACC1,1JJ
1i::,01 PRIMT e;; ri=1B r: 1c::J ; 11 : 11
i t=. 1 Ll i..:iU TO 1 71 0
1620 IF INTCA(C1,1J•100J/100 =0 THEN 1860
1630REM
164(1 PRINT" F·ur·m 11
; K$;" nisTi:<:IBUTION OF ~,HTHDPmmLs FIT" ;F:; "Yt:APS"
1650 PRINT
1660 IF INT £AfC1,1J•t00J/100= 0 THEN 1850
1670 IF E7=10 E+7 THEN 1700
168(1 LET G= Hff C[7)
1681 PF.'.IMT c;; TAB ( 1;::'.) ; I I : II
1 6 9~3 GO TO 171 0
1 t=. qn GO TO 1? 1 (1
1700 LET G=INTCACC1,1l~100)/100
732
1 7'01 PRHff c;; TA'F.: 1. i;:·:i ; II~ II
1751~1 t-!D::T T
1 7'6(i Pl? Hff
1770 F'F.'.Hff Hff(l.J(I));TAB!i;=::i;":"
1 7:;::(1 GO TO 1:::oo
1 7-90 PPHff nrr i:1,1i:1 :i :.:•' l lili+. os:i ./ H:-io; TFi:t: 1 i;:: :i ; 11
:
11
1 ::;:(10 NDO::T I
1810 IF Z=2 THEN 1840
1 :::20 LET Z=2
1 :::30 GO TO 291;:'!
1 :=:4C"i PR H-lT II
II
1 ;;::50 GO TO 200
1:::60 EMD
733
This example plots the results of the first problem from the program FUNDS 1.
l:ll·""1:rc:1,i
r··~1·r rr1I1 !Jf'""i :i..1r11..J r 1-·1 1-·-!T'.:~; . r·r··ir::~ 1 r·:1r,·1
DC1 \':JU \,if·:;! I TU l,:'F >'i"I! I
ICll
:.,:
,··:
: ••• 1
,··:
';"":'
1,,1
1''1
734
'This example plots the results of the second problem from the program FUNDS 1.
1('14
10?
11. i2I
114
735
GO-MOKU:
DESCRIPTIQJi
This program is a simulation of an old Chinese game. It is played on a 9x 9
board and the object of the play is to place 5 in a row without being block-
ed by your opponent. Your opponent is the computer.
USERS
If you like a game offering a fair degree of skill you will enjoy playing
GO-MOKU. The game can be analyzed and the methodology may be reduced to an
algorithm as in TIC-TAC-TOE for those so inclined.
iNSTRUCTIONS
Upon execution the program prints out all necessary instructions and game
rules. All inputs will be prompted by the game program. The playing board
will be printed after each move.
LIMITATIONS
This program uses two dimensional arrays; see line 90. The source code is
SK Bytes long and the game will execute in llK Bytes of memory.
736
,::oeiF'R HIT "'r'Cl!JF' U 1:: JFCT Ii.JF I·:;:; TC! F'l_.f!CT '"'• !·1HF'K.=·;"
Jr! PFnlff"Hi 1=1 :;::;TJ::::1=1Jr-,;HT LI!·i[ (tJTHEP HnF.'IZCllfff·!!... ,. UE:FTIC1=1L, OF TIHIC·-·"
4 0 PF.'. I nT "rn !FiL :i or 1 1=1 9><9 t.:OAPD, PLAY I r·1c HCH :r 1·t:::;T THE coMPUTEP. Et HEP"
::,o F'F'.Hff"'-f'OUR MOIJ[ F1'.;::; ? HUMI:EF'.'.::;; THE PO'.::;ITIO!!'.'.:; AC:PO'.;?;'.;:; AttD 11
i:.c1 PP r t·ff 11 THEH D01·.1n FPot·1 THE UPPE:P LEFT coF:.rff R OF THE :t:OAF'.D. THE: coM-· 11
?('1 Pf?Hff"F'UT[P ~·HLL T~!Fli TELL \'OU IT'.:; f'IC!ll[ flt!D PRHff THE I:Of!PD. '"1''"
::::o F'PHff"l'.:; \'Oil; "C' T·:; TH[ CCW!PUTEP. corn1 LUCl'. Ii
90 DIM AC27,2?J,P(50l
l 00 LE:T L'?-=;:.'.0!2i
1l l~i FOP ._ !:::: i TO ;::·?
120 FOR K=l TO 27
1::1~1 LET f!IJ,i='.:i=:::
i 4Ci MD<T K
1 ':i0 t!D<T ._I
1 t. 0 LET ·=;=:fi
170 FOR J=10 TD 18
180 FOR K=10 TO 18
190 LET AfJ,Kl=8
C.'.CiO nc<T f::
i?'. l 0 t!D<T _.!
;::'.;::121 IF. S= I. THE! I ;::::400
;:: 30 L[T '.;'.;=: 1
;::40 GOTO ;:.:60
;::5(1 CiOSUB ;::~1:::(1
;:'.'.6(1 PF.'.Hff
Z:'.70 PF.'.IMT
~:::::0 I MPUT J 1 , Ki
;;:•9(1 IF .Ji+K1 =Cl THEll 1?0
30(1 LET .J l =.J 1+·:;t
::::1~:1 LET K1=K1+'3
320 IF ACJ1,K1J<>0 THEN 2380
330 LET AC.Ji,K1J=2
34~21 LET DE'.=E~
350 LET I :=:=:~1
]6(1 LE.:T D4=(1
370 LET Li:'.=81
:~::::0 c~c1~:;LrB ~::4~7;
3·;.n;:1 LET D5=D4
400 IF D4>7'3 THEN 1930
4 1 (1 LET Di::= i
4C::~:1 LET L2=6~i
.:.1-::::0 LET D4=l1
44(1 GOSUB S40
450 LET DE.=D4
737
460 IF 05 1 ~~EN 480
470 IF D6<31 THEN 770
480 IF L3>0 THE~ 1958
490 IF DS<1::.5 THEl'I :::tc'.0
51210 LET D;::=c'.
5 10 GOTO 55(1
~:'i2i2! LET D;:'.= 1
::;3(1 LET u=.·=':i5
540 IF D6<55 THEN 580
':i60 IF L3<:: THEJI i:'.'.OH1
~:; 70 GOTO ;:;J):30
580 IF DS<55 THEN 660
L.E1· fi;::~=2
::;=;n~;
60~) GOSUB :::40
6 l 0 LET Lc'.=31
6;:·(1 LET L9=5':i
f;'.i :;: ~z, c;c1~:;1Jt: ~:::4~::1
t:, t:.l~~i 1:;;c1~=;~_t:B 1 E:~=~121
6'.:::1(i GOTO E:i21t0
66~3 LET L2=31
6 7 !21 GC6UB :::40
680 IF L3<2 THEN 700
6 90 GOSUB 16:::0
7~:i0 LET L3=(1
71 0 LET DE'.=c'.
7;:~121 f::;C1~:;1J:.B :::41~1
730 IF L3=0 THEN 780
740 IF L3=1 THEN 1gq0
75t..~1 1E.::a]
C~C1~:;i_1·t~
7 6(1 GOTO 2tf::o
9"':i(i MD<T V
96ti FOP L=4 TO -·4 ::;TEP -l
738
·::17i;:1 GOSUB 1610
980 FOR J=l TO 10
990 LET K==J+L
11a00 e;o::::uF.: 1 i :::o
1010 ME::<T J
1 i~iC~(1 t·1E>=:T L
1030 FOR L=5 TO 14
1 :2J4(i Gcr::;UB 161 (i
1050 FOR K=1 TO 10
106li LET J=L·-+:
j O?ti GO:::;UB i i ;~ti
1 ~y::t:1 MD::T V
1090 MD<T L
110(iLET L9=c'.~i0
11 10PETUPti
1120 LET B=ACJ+9,K+9)
1130 IF B=0 THEN 1460
1140 IF B=D2 THEN 1350
115(1 IF 1)1 =a THEt-1 11 ::;:0
1160 IF C1=66 THEN 1180
1170 LET Ci=Ci-10
l 1::;:(1 LET S9=0
11 •j(i LET I.) 1 =0
1200 IF Cl<=C2 GO TO 1220
1 c'. 1(1 LET Cc:=C 1
12.20 IF C5>=5 THEt·I 1;:·50
1 c'.30 GOSUB 1610
1 c'.4(i RETURM
1250 LET C5=0
1260 IF C2<=D4 THEt-1 1280
1 c'.7(1 LET D4=C2
1 c'.B(1 IF C2< L;:;: THEt··I 1 c'.4(1
1 c'.9(1 IF C2>L9 THF.:t-1 1;:;:4(1
1300 IF L1=0 THEN 1240
1310 LET PCL3l=QCL1-1)
1 :::;=·i::-1 LET L::::=L::+l
1:;::30 LET L1=L.1-1
1 :;:4(1 GOTO 13(10
1350 IF U1=1 THEN 1400
1360 LET U1=1
1370 IF ::;;·3=0 THEN 14(1(1
1 :;:::;:0 GOSUB 176(1
1 :?.:90 LET '.::;9=0
1400 LET C6=C7+C6+1
1410 LET C7=(i
142(1 LET C5=C5+l
1430 IF C6 >5 THEt-1 1c'.40
1440 LET C1=C1+20
1450 GOTO 1240
1460 IF U1=1 THEN 1490
1470 LET S9=10*J+K
739
j_ ::;[i~) L. ET I J1 =12~
1::~1 [1 L.ET c·5=C:~i·+ 1
1 ':'ic'.0 IF C 1 <=0 THD I 1 :::;.::1.(~
1 ':·30 LET C7=C?+ 1
1i::,4~3 IF C1<=C2 THFli 1:.::::0
1 :::;51~1 LET C;::=C 1
1560 LET Cl=Cl-4
740
l 990 GO'.:;UI: 1::::::iz1
c'.000 GOTO 25(1
2~10 LET prol=P(J)
;:::1212(1 GOTO 19·::ic1
2030 LET L9=INTCL3~RNDCXJJ
2040 LET PC0l=P(l9)
c'.050 GOTO 1990
;;:'.(160 PPINT
;:'. ti?[i F'F.~ I t··IT
c::'.o:::o PPHff
C:'.09(1 PF.'IMT UOULD YOU LIKE TO PLA\' FICAH~ ;.:.;;.:.; II
c'. i (iO PP I MT
2110 It··!PUT
212(1 Pl?IMT
PF.:INT
·=-· 14(1 PF.:IMT
;:'.15t1 IF F~$= .. \'li CiO TO 170
c'.1 70 GO TO c'.450
c'. 1 :::0 PF.: I MT
2190 PPIMT II
c'.200 FOP .J=-~10 TO l ::;:
c'. i:'.10 PP Hff .J·-·'3 ;
;:;:;:;:2c1 FOP K=10 TO J::::
2230 FOF.: L=K TO 1: ;:
2240 IF ACL,Jl<>0 THEN 2270
c'.c'.50 ME::-::T L
226(1 CiOTO ;:~::::1c1
c'.27€1 IF A ft::,
J) =~:1 THEtl ;::::::60
2280 IF ACK,J)=1 THEN 2340
E'.290 PF.:Hff "Y ";
E'.::::i~10 r·1o::r K
c~ : : 1(1 PF.: I MT
741
JACK:
DESCRIPTION
Calling all gamblers or would be gamblers ~ this is a simulation of the
game of Black-Jack. The program adheres to the same house rules as used in
the Las Vegas gambling casinos and is an exceptionally realistic version of
the game.
USERS
Persons who like to play cards, gamble, or just play games will enjoy JACK,
and if you've always dreamed of sitting in a casino in Vegas playing cards,
with this program only the setting will be different. The winnings obtained
with this program are very close to those obtained in the real casinos, ex-
cept you can't spend your winnings but then like wise you don't have to make
monthly payments to repay your losses.
INSTRUCTIONS
To play Jack simply type RUN after the program is loaded. The program will
ask if you would like instructions. A response of 11 011 will start the game
immediately, any other numeric response will cause a detailed listing of the
instructiohs to be printed. The program is instructional and will prompt for
all inputs.
LIMITATIONS
The source code requires 7K Bytes of memory for storage and BK for execution.
742
ii
··:::i=::. F'F:'Hff" :·+lflCiEF'.:THF f·ICl!.I'.::;;[ L HHT r·:: ~':'{:10, ·:::;c1 .T'f'F't Hi A HUMF:EP "
:=::=: F'PHff" FF'.OM C TO ':-!Oi?l. T:=i lEPMIHATF- f;F1ME> EtffEF ZEPO."
4;:::· F'FIHT" >THE DFf:L_;; T 11Ef"!L tiY::::ELF ;;:: cF1PD'.::: F1tm ·:::;~1rn. 1 You onE. THHI I"
4.:i PF.'.Hff" I!CAL '·:'CIU H!Ci CF!F'.D::::;, i'.:jt·m A:::;~: IF YOU ~o.IA!ff ;:::! HIT fF1t·10THEP"
46 F'F.'.Hff" CF!F.'.T!'!. 'i'CU : 11=0E ::::EUEPRL OPT Iott::; Dt:PEllDir·!C OM THE Cf!RDS"
':';6 PF.' Hff II .;.: ·:'.;F'L 1 T r1 PR IF'. - B'r' TYP I 1··-ic; f1 THF.'Er"
•:; ::::: PP I rff
60 PPIMT 11 >Iti::::;1_1pAMCr: IF MY UF' CRPD I·::; At·i FK:E:~ I ;·.!ILL f1:::;K IF \'OU"
6c'. PF'H!T" l_,JAMT HY:::!JPFIMCE. IF '/OU DO T'r'PE A Ot··fE:. f:ETTH-iG Ot·IE-·HALF"
64 PF.'.Hff" OF \'OUP l·IFIC:i[F'. THAT I DO HF!U[ HLFICK.JACK. IF I DO, I F'Ff1' 11
t:.t. PF-'.Hff" .::'.-T0-·1 Ott \'OUP H6UPAtiC:E F:ET. \'OU Lo:::;E \'OUP OPIGHiAL ~·~AGEF.'. 11
6::::: PP Hff" ::::; I MCE I HHUE BLACK.JACK, SO ~·~E. APE. EUEH FOP THE HAMD. 11
?O PPHff 11 IF I l1orr T HAUE f:LACJ::.JACl:' \'OU LC1:::;E \'OUP Itt:::;IJPAtiC:[ BET"
7;:· PF.'.Hff" At·m THE CAME crn1rn1uE'.::. "
?4 PPHff
76 PPIMT" IF YOU f-"'.E:Ft1·::;E Ht:::;IJPAMCE CE:'r' T\'F'HlG Fl ZE:F'.0) THE cm·1[ 11
7:::: PPIMT" COlffil··llJE'.:; A:::; t·IOPMAL. II
::::;::· PPHff" >THE PLfi'l: 1.. 1HEJ·i You F-niALLY :::::rr1t··m ct:v r1'F'HiG A ZEF.:o:i 11
::::4 PPHff" I i·HLL. DF.'.l=i~·~ CAPD::::; UMTIL: II
::::6 F'F.:Hff" c?:I HFIUF AT LEF6T A HARD 17 0-IAPD MEAMS THE TOTFIL"
:::::::: PP IMP' IiOES t·IOT IMCLUDE At-i AC:E: BEH-IG COUtffED m:; 11) 11
9Ci PPHIT" :i;i:r H1=:11)[ 1=1 ~:;OFT 1::::: c:::OFT t·IEFJt1::; THE TOTAL IMCl.JJDE'.::; At·I"
·::1;:::· PF:'.Hff 11 1=1cE coutHE:ri 1=1::::: 11 ·,"
94 PPIMT" =<q 1:;:·EF1CH Fi TOTAL OF c'.1"
96 PPHff"
9::: PPIMT
l 1210 pp I MT II >I TEJ·t::;: II
j 02 F'PHff
11
:i;i:J F'FI\' i ·~;-To-1 on BLflCK.JF!Cf<""
0
743
I!
l L:· PF:'Hff"THE. f-.~lkl I·:. Tl-![ UEFiLEF.'. AMD GET':; !=i F:F:'EFW: AT 1945 HOl_IR:::;. !·IHF!T"
114 PPHff"TIME: I::; lT i·iOl•I";
116 LET ~<=O
1 l ;::; L.E:T ~:.i l =Ci
1 I 1··iPUT i·i
1,:::c.· FOF.'. I == i TCi ! !.···~:.·
t·iE>::T I
I~ Ir;1 I~ f
1~~ FOR A=1 TO 52
132 LET DCAJ = 0
l .3E: IJ I t1"~ C~ f 5~~)
138 FOR A=0 TO 39 STEP 13
1 ~i-4 t·iE.:=<T C:
l :~·E: t·iE::-::1· A
14a PP Hff
1::;0 LET l<=K+1
152 FOR P=1 TO ~
l ::i'~:t LET E f P) ==O
15E.
1 r.:-.=·
._fr_t LE.T T t:P) =~?i
160
1 i==.;=· LET 1.1f3) =1
164 PP I HT
j 1:.:,i::;, pp Hff "~·~fiCEF.' II ;
I!
1 :::4 PF? Hff " I ::;HOL·~
1 :::;::. GO:~)J:t: :::66
i ::;:a IF E ( l :i =O THEli
LET I):: 4) =1
1 .:::i:::-1
1 92 LET I) ( ::i) =1
194 GOSUB :::66
l 96 LET M=>=:
1 ·:;1;;:: LET P=;::'.
;::c10 F'PIMT 'TIF:'.'.::;T CflRD E;",
744
i:'.~~14. L.E~T (~=::-::
745
r::-1; r :: i!
r r: . l !1 r
~~::t~i:::! FF.: I t"·rr
1
H F-1 Ft'.:;1 c~ r-:1F.:r1 J::; £! ,
-.:: 1 t' C•
::.:"?2 LET t) ( 5 J =[i
37S PETUF.'r·l
380 LET N=10 ~C1+ABSCCOSCN+W1JJJ
3:::2 FOF.'. A= 1 TO I l
384 LET X=I~ITC52.9999999•RNDCYlJ
386 IF X=0 THEN 384
390 IF DCXl=0 THEN 410
746
,:l 1a ;:: CjCtT"Ct ,::~::(i
411'.'..i LET P=O
4 1. E'. LET D ( >:'.) =+.
414 IF QCXJ~>1 lHFN ~?2
4 1 6 LET C== 11
418 LET ECPJ=ECPJ+1
·~ 20 F.:ETUF.'.t~
4;:::2IF C! C:<J >11?1 Ti-!EJI 4E'.:::
4'.:'.i6 F.ETUF.'.t"i
458 IF QCXl>12 THEN 464
46(i PPIMT ii C!UE:EJ1 I I ;
46i:'. F.'.ETUPn
464 PPHff II K H1C II:.
,:l f..E. F.~ETt.IF~t"i
46e F.:F:M PR Hff ::;u IT
470 IF X>39 THEN 480
472 IF X>26 THE~ 484
4. 7 4 IF >=: >1:;: Tf-IEt"~ I~,::::::
4?6 PRHff "OF ::;PADE::;"
4 78 F.:ETUF.:H
.:.H::(i PPHff "OF CLUB::;"
747
~::: i ~i IF T ( ) <' ? 1
T~-lE"f··f 54.;:;
512 IF Tf J> 7 THEN 516
~ilt::, IF T f i Ti-IE:t,,i ;::;~54
~:; 1 :~; LE:T P=i:'.
:::i~:~~i F'F.~It·iT Hr:'f-( rci-rt=1L" r::; n~l'"(1)
IF' T ( F 1
) >C~ 1. 'TH Eli 5:;:4.
524 IF T(l) 1 THEN 530
526 IF T(1J)T(P) THEN 534
528 IF Tfll=T(PJ THEN 536
530 LET Wl=Wl+Wf Pl
::; ~:.:c~ C~fJTCi s::~r::.
~:; . :::4 LET t'-! 1 =~'H -+Hp I
~:;:::.;E. IF. t) C~?.~1 >!~i T~·IE~l""t '.::.;,::·~~:::
'.5 :~::::; 5E.t:1
i~c~~::~L1F:
;:; 4~~i C~t]TCi 15(1
~;::.i;=: L. E:T F =·3
1
':i::;:(1 RETUF.'.t·~
:;;::2 EMD
748
>!·.lf!Ci[R: TH[ HUU:::;r Lt MJ T L:; ::;::500' :::;o TYPF. HI n t IUMf:ER
FROM 0 TO ~00. TO lERMINATE GAME, ENTER ~ERO.
>TH[ D[FIU I DE1=1L. MY::;[LF ~:'. CF!RI6 At·ffi ::;HO~·J \'OU Ot IE" THEJ I 1
DEAL YCU TWO CARDS, AND ASK IF YOU WANT A HIT (ANOTHER
CF1Frn:1. \'OU HAl..1[ ·;::;[U[RFIL OPTIOtt:; DE:PElfftH-IG on THF CARJ:i::;
\'OU HOLD rn·m M\' UF' CFIPD:
;.;.: ::;TAtm .... f:\' T\'P I HG A :?ERO
~ TAKE A HIT - BY TYPING A ONE
:;;;: GO DCAJN FOP DOUI:LF.5 -· B\' T'/F' H-!G A Tl·lf't
:; ;: SPLIT A PAIR - BY TYPING A THREE
:::· H{:;URAt1CE: IF t·I\' tJF' C:APD IS AN !=iCE:, I l•I J LL 1=1:::;K IF ';'OU
l·JfiMT I rt=;l.JRANCE. Ir YOU DO TVPE fl ot I[' t:ETT I t·IG om-:--HALF
OF '(OUR WAGER THAT I no
HAUE BLACKJACK. IF J no,
I PAV
~:·-T0-1 Ot1 \'OUR Itt:=;URAt1CE BET. YOU LO::;E YOUF'. ORIGit·1flL ~·JfiGER
::; INCE I HFIUE BL..F!Cl'..JACK, :::;o l·JE APE E:UD'·I FOR THE HAND.
IF I DOW T HFll.JE 'E:LFICK.JFiCl:, '/OU LOSE \'OUR nt:;uF.:At1CE F:ET
AND THE GF~E CONTINUES.
<<<CiOCtD LUCI<>>>
749
LIFE:
DESCRIPTION
This program is a very detailed version of the game of 11 Life 11 as written
up in the October 1970 issue of Scientific American. It has been modified
to allow one to play either against the computer or against another player.
The object of the game is to destroy your opponents life units while saving
at least some of your life units. This is more then just a game as it
actually follows patterns found in real life environments.
USERS
Game enthusiasts of all types will find something of interest in this game.
11
Life 11 will be of special interest to individuals involved with population
projections, economic growth situations, and the problems related to over
and under developed areas.
INSTRUCTIONS
The program is self prompting and should be listed for a full set of instruc-
tions before playing your initial game. Program instructions are available
when the program is initiated.
LIMITATIONS
The source code for this simulation requires 13K Bytes of memory for storage
and 21K for execution, this does not include the amount of memory required
for storage of your Basic compiler. This program uses two dimensional arrays;
see line 106. Line 108 has a MAT A= ZER and 110 has a MAT B = ZER. Lines
104 and 122 contain Restore statements.
750
71~:' F:EY!
::: Ci l?F.:t:1
9!:'.I ~'.FJ·I
112!0 F.'.Ell
l 0 1 E=:E9=!J
F'ic'. PEM *:i:i::i:i::i:i: '.::;FT UF' r:::Of"IPD fltffl HOME r'lCiI 1Y1·::; :.;.;;.:;::.;.::.;.:
1 ;~:14 RESTOPE:
11216 DIM Af13, ) ,:t;113,
1 1~j Mf!T I: = ZEP
112 FOR J = 4 TO 2 STEP -l
114 FOP I = 2 TO l2
116 READ ACI,JJ
1 1 ;:;;; 1iD<T T
1. ;~'.C~ F.~E!:;TC1F.:E:
124 FOR J = ~3 TO 31
126 FOR I = 12 TD 2 ST(P -i
1. ·.::::: TIATA 5' 1E·, 5' c:121, ::i' i~ &:-l, E.' i I~' E,' E~ 1 ' f,, ;::l ·3, l:~.:, ~=:5, 7' C~li, 7' c: I~' 13, C:(j, r:=t' C:4, 1 ~~I' 1 '3
1
751
F>~~ I r"iT ii
F;~:If·fT
440 PPH!Tn UNIT rs n·mrcRTED RS R ZEF!:J ot-.i THE F'F:Hn'ED c1Rl"'lE E=DRF:D. On THE l:oRr:;:r.::i''
4':'10 PPHiT" ERC:H LrFE-Ut!IT r.=:: suF:F:DLJNDED E=Y Fl rr1R><IF1u111 L!F EIGHT r·!EIGHE:oi:;:::::. (fiL.L"
11
460 F'F.'.If'iT" FLJRCEtiT LiHIT:::: RFE COL!MTED, H!L.L.UDIMC:i DIRGOt·.JRL NEIGHE:DES)
470 PF'.IMT
4.f;CJ PF'.I hT" THE: C:iFlflE:':: F1F:DCEED:::: FF:DFI Dt.JE GE.t·ff~EF'lT r Dr·! Tl:J RNDTHEF:. THE: L. r F'E- Ut1rr,:: 11
4'30 F'F:'.H·iT" THEl"lSE'L'·.'ES Dl:J MDT P101•..IE; THE'Y WILL EITHEE LI'-..IE OF: DIE. lHE: CUF>:F:E:t·.JT"
•:=; 00 PF'. I r!T" POPULF!T I Cit·! DF' RN RF<:ER WI LL DETEF:f"l J t·.JE THE F'OPLJLRT I OM OF THE THE r·.JE::<T"
i::;l!Zl PF'.I!'rf"' GE~ME:Fi:Fn'IDr·.I. E>:ISTH!G LIFE-Ut·HT:::: f'!RL; 1 DI!::::, OF: NEW ONES r!RY E:E: E:OF:t·.J F·i"
~:;;:::·~] F'F'It°'!T" EP1PTY ::::PFIC:ES, F1CCOF:DING TO THF FDLLOL.IHIG F:ULES:"
~:;::::o PPHff
~=~; ::.lti F=F.~ I t·rr fl I!Efi1li i:! LTFE-"UtHT kiIL.L DIE IF IT HF!S LESS THRN T!i.10 t·lE~IGHE:or:;;s • • • II
.::;.O(i PPH·lT" HIPTH ·- H ~IEU LIFE-t.itHT !.;JILL E:E i:,::QF-:f'.l If'~ F-it·.J Ef'1PTY ::::PFICE Ti-H::::F-:E: FiF-:E"
6i0 PF'.Hff" F'.:::fKTL \' THF'.EE. r~EIGHE:f.1F:H~G LrFE:-UNITS. 11
t:, !~ t1 F'F.' I r··f T
i:::, ::::1:1 F't? I t··iT IE E:=<F!t'1F'L. E:~:; ~ ll
t:, s:.1 [1 F=F.: I t·iT
f:, sia F=F.: I r·.,IT 11
~~I r_::,~:1 F ~~
1
I r-1r
1~:1 '((i F=F.~ I ~···1T II THE FiE:u•. .IE LIFE·~Ut·.!IT:::: UJL.L E:UTH DIE E:ECRLJ:::=E ERCH HR:::: CJt·.IL.Y
11
6'30 PF'.Hff
?(:!(! pp Hff II
? i ~1 F'!?It'!T"
'? ;:= ~i FtF~ I t·rr JI
'? ·3~] F:F.: I t··fT
~·PHff
11
?'40 T1,.HJ DF Tl-IE: RE:rJ'...'E L I FE~--IJt·I IT::: Lt! T LL DIE FEDl'l 0 EHCF<:o1.i.1D r NG.
1•.. 1 TLiJD t·.1E:1.t1"
L.I F'E'"-l.lr·.~T-r:::: f.tlIL.L. r==E E:Ob:t·~" n
752
F:F t·iT. 11
1
11
THE Cit-IE H4 TH!: C:ENTEFi: LI'..-'E:S EEL.RUSE IT HAD TU.ID t·.lEIGHE:[JFi:S. fLtJrJ MEW
·:;:140 PPHff 11 L.1 F"E.:-l_it"H T::: UEF':E E:O!"N NE:>::T Tn THE: CEt-.iTEFi: E:ECRUSE THE"r1 HRD THF;:EE
11
1 iJ30 PPit·ff
1 (:14~:1 FR I MT II
1 (i5(1 Pl? I MT
1060 PPHff
l ~~1 ?t1 F·F.~ I t·~T" SctrtE: PRTTEF:t·45 f"'.EPF:DDLICE THFr1::::1:.L 1._.tES RMD , Mo•.,.rE:, RCFi:O:::::::: THE E:DRF:D: I!
1 09ti PRAMT
1 1 \'.'.°iC"i pp I t·ff II
,-
= =H
'
1 111 PP I t·rr " -> 12J -· :·: -· -- (i
1 1 ,'.:'.(; F'P I MT II 2i i-~1 -· ~I - ia Ci
l 1 :3121 F F.~ I t.11· 1 11
Pi ~Zi (i ~:1 i~i
i 14Ci pp I t·ff II I!
i 1 ':iO PP I i"ff
1 i 6fi PF.:IMT
11 ?O PPHH" f'inT I Cl::: THAT THE CL I DEF: , Mo 1...1E::::, ONE S:O.LJAF-:E DOLIN AND Dt·-IE ::::auF~F:E I!
11 ::::0 PR I MT" TO THE.: F: I GHT E 1•..tEF.:Y FTJUFi: C:iE:t·~EF-:RT I ON:=:; JT I:.::.: :3R ID TO !110'.·'E RT ONE'.-
11
11 '30 PPHff 11 0.LIFlFi:TE:Fi: OF THE :=:o.LlAF:E.:-·i:;:ooT C:IF' T!.UD TI 111r::s THE: SPEED OF LIGHT. II
1 c'.(10 PP I MT
1 ~~'.1 ti PF.: I NT
1;:~;::'.0 PRHff" THE F'LA\': II
1 ;:::;:(1 PP I MT
753
- - w
-
z .J =. -ll't
II ::: • IL U:: II 1.1: z ~
U::zrr:a: .J 1-1 1.i.i D ;"1..1 1-'4
- = i:c:. z
1/i Li.I CJ _.I
iI J- H H W
I lI l:J E ~
11
iJ
1-
H
..::.
::
J:
I-· l::!
H
w
I
i- --1-J-
l/1 w Ii
i
1
= =•
=
Ci
::
.....,
-r
.J L.! H il, 1-- H lJ.J I- Ct:: H .J W H iJ: ::- i.iJ Lt: ..:..
!I :: z _j w
Ll:'.
ll.!
J-
ll.. LL: Iii il.
..1.. l.i.1 U::
>::
Ld
Li
-. i.i.i
I
Lt..
l·-4
_j
;J.:
• E
LL:
3
0
i--4 !I
t-Ii
=I
Li..
LL [! t--l
i-..J
f·· II
:J Cl
Ci U:;
I~
,.;:,
fI w ED IT: i- 0 D _J H W Ci::
_; [[ D C I Le. -r -"l'<-
..i:.. ..L LI:: :Z.l-l1J..Dr-1J-
z 0 w r.
;:l_ LJ..l I l/1 I-· i.!'1 D l.J Q 1--1 u_ 1-t i.J I w
IL .J I•<
w
l.i.. I.fl ..::i I_; ll iI I- t- :z:
I, " 1.11 !ti z .J Li.! 1- V1 U z 1-l
LJLUt-U3 H
,......1- _j G:: l/1 HH[,j~~w H i.i.. I
Jf:E2;HQ :::; I- w 1-..I:: I I I .J Li LI:: D (.)
1.ulIW_I..::.
z (.'.'.! ::.::
L!.i ,.., I/!
Lt: w
. i--
II
11
IJ Z
f·· Cl
I
I
• -, 3 I- 0
..:..
1--
Z E II
Cl .J
LI:: a..
i.L
a..
•:C
..::...
':!'"..
is, I fl t/1 W
1...1
w E ,. ., !1.a.. l.t. I-·
iJ Cl
HI.II
Z :I Cl l.i..
I/; Cl
i! I··
,,, u i1 li.! i:r: w
z w
J- II WD l/1 D a.. Lr.: D 3 w
L[i.JEa:
:·: w H
a: 1;:1 :r: H j- H !I z i-· w a..
_1 t"' !J:: l/1 iI 1- H [i J- D D I- I J-
I/; I-· I a.. w I-· .....
. ,.. .J ll :Z: w a: Ui H J- H 1- I--
<t-iL.. 1-1
..--1iJILJ1-1
LJ
w
~I
f··
l.ti
ii'I w
..!.• 11 E:
Lt.I
=1! LI:: E I.'.:!
lJ l.i.i !-"
i:r:
lf j 1,1'1 ...
E I :i:
li..
D :r :i- .J I- w w i:r: I LI:: rr: II Lt:
Oi-:Z:CJ3 I- .J c:1 II: I·- L1- E W I- 1- I Li.I
iL iL H ((i Ci I LI:: ..., a: H Cl~ laj _g 0 1-
rr.: II' l.t'1 '' LL: LJ 1- 1- _J ~.r:: iI Li.. I . ..::.. 1:i:: .. -. :::i
;
IJJ
q !--:- ~:! '~ Li
...,. 1- D = ,..., l.i'I H LJ:: .J DI-- __, D lI W ll.
LLl 1.l! ~.. u.I U:.
u:: .J I.ii
1.1: w l.J U:d··
.....
u:
:r:
w
111
f-·
~~
H
i/1
l.J
~
..:'.!
i,:i
u
Z Ci
l•--i
J- W LL
~-
tr'
I
r-· G::
l.J
C1 ....
1::1
l/j
H
J::
,....!
Ll
j~.L.!
"""'
.a:..
l•HI
I
a
LJ
J::l-[[i-
. I- I-· ;-, ['
L! -' ....•...!, z i- iii w H l--i [f~! I- wu
i] ·-' D 1!'1 HI.fl I D a if!-:-~ ~ I !I Lil
QC iILL!i ]- u:. r·'1 :i l-i-U:: D f- E :r:
i-- il. iI .J !J.!
--:
....! i.:1 E
.J.. ..:..
w LI.! l/1 ii 1-l
ul
::i:: t- !±l
=- l,i! I [. u.. w
0 ;;::
i.i.! LJ !.t•
..:..
r:'.i 1....
i-'l
:"'
!.Li
I
!.l.!
Ct:. Z ::i Li..
P:Sl:•~-
1"" Ci a:. I .:·- w
!-::i r·I
·-1 '
Le.
D I I-· a: ""'r--
U)
} IL _i Ii'! E ..,.. !-" !I n H .J LI:: I- l/i
...,. :z::
!I
~
Li.i
1...
=~
ffiH
~ ~
H Ll.!
I
r··
l·-
0:
..!..
Li
,... 1
li..
[]
l.W .J
E !J..
c:
I- -
iJ.I
!,i';
D',
w
11. I-· i1 ..,.
:J H
0 :r
c ni:: Ew l/1
a
E
D W
;.... Li'.!
..:..
H I/!
IT: rr.
~ W LJ E Lei
..! ..
.J.. :I l/1 ~!
1.;
lJJ
,-
....1
'I
t-i -:•""I" Cl ['1 f... I:.! Cl
:::i Iii f.I: 1J: er: " j
"' t::
HOWl-0
LI r I-
II' i:'.:1 'IJJ
f1':
n:
ci·:
.J
1::1
"'I'
_t ..
1-•I
rr: ::i::
I-· ..:..
VI l.i.i
::I Li..
--
....l hi Li.I II
~t 1::1 I-·
µ:! I: .
[[' -::1
~=:
Ci 1-1
- :? .. 1-. }·
a::J" U::
l.1:! i.!:I
I- a: L! •..I ~! 1..(1 i.l1 U". E W ..!" H u:. 1-.. _..... I. _j LJ H
iJ.: C1 1-< LL iii w i.[ LI:: ;'.j IJ: D iI I··· .J IE .J i.i.i
LJT:l-·i.t.u.I ...J- :::i :r l:!:I_.. IL E i.11 L.. 11 E !I 1.... 11. }·
,•.,.
::::1 I..·~
:::::I
1.t
. .::
~
, ... Ci D
•i: :ji'" r1··
l.i .. J-
::::! ....I ,_ ...
Cc:. l!:: ld
Li.I Li.
J- C:i LI::
H Ci
11 .. J LI::
LI::
C.i
H
1- l.f1 I
Cl
·- u~..
1_! .:-'
......i}·l-0 ... ,. 1.'.:i u:: [[ i.i.I :1 II ld l/1 ::i II' Li.. Li.. ,.,.. H
...,. rr:I._.,.
::::i I-"
!l! l/l ~ i.i.; J- 0 J- H
!.w I Ll:~
U.i
"'-
i·~-> 1- ,l.iJ..., I·" iSi
..UJ,.. rr. :r.:
_j }·
W... I r.- "1-
H
u.. ..L I- !- Ii! 0
LL
li.'
.i:••
..... I- ii'
i.:.: :J L! i··.. LI !I ;rr-· 1::;:~ r~ [L w u:: w rJ -r !'""'I
(~ '"'-
.I-· ....! tt'. H t-t Li.I •'- 1....1
'....I le: ,_
1:i: M"
l.L c:i l..L.. !.Li I 0 If! Z :'., n:: 0 :: ~j rr Li..
LI- :!- i::J c.: ~) [1 ::! Lu t: Li tt1 i-i i/! Lt i:r: c::i i- :~:i
r- ~ ~J ;J) l:.. iL
.
H p:: Cl I :z: J.. H w i.i'! [[ :J
w:: i.I.! u:: _..
.J· , [J ·-' .L [[ ~
'r·· t!.! ..J Ll LL O if1 :r: i/1 H D u:: LI:: :J Ci
J- [j i,!i ::;:: Ll..! Lr.: !::.! - ~.:.I:: i.l.• i-1 lLWi!;'.~1--~ :t: ~:1~1 Ll lLl 0 :r·
.1::... :.i. !.d !-·-- i-··
I-··! . [
i...,
iI . ( :k: j~~.:. l.J
u::
!_!.: \.J
E.
iii
:J 11
.J.. '-"·' I- W .1..
I- u:: !.J.j
LL
w
(S)
(;;'~!
J- ]-
II II
}·
::i::
~:: t::
!J.J
_; ...,.
,:~~~ :'.,.f:: :~:;:1
E GJ iI I [[ _j i.t. ::::.: l,!'1 I l~'.;:1 _i .J i.t. i/j
[ h!
.J..
I-· 11 ...;
::1:: iii I-·· [[ [\.. 1:1: Un H
.i...
l•-1 f·"" If)
.,.. _,
•r·•-1
LI... CL. "'"'' i.[
Ii
... - -
i..- I·- !-· .. i···· !--
- ·- :::
1--.. ~·· l-... I··-· i-·- 1-... f.-- 1:.::1 i I 1--.. 1-·· ~... 1-·.. ~- ~- 1-- !-·- I- 1-... i..... 1-- 1-- 1-- i--
- - - -
............
- - - - - -
1-.. I-·- 1-.. 1-.. c,:1 I··-· l".,J 1-- I-·· I-·· 1-.... 1-- 1...... I-·- I-·· !--
!:::~
:;~::: ~:: :::~::: :;::.: ~~:::: __ _
.~:
"~I'"
,..... :;-~::: :;:::: :;~:~ :;:~::· :;:~·: :~:::· ~;::i i:::::; :z:: ~i::::· :~~:· :;:...: ~:~·:· ~:.:: ~~: :;:::: :z::: :;:'.~: :~: :;:~:: z~: z: :;-:!:: :;:;~: z:: z:: z:: :;:;1 :;;::: .r- z: z:: :z.:: ~~:: ~~:: :;!~:: :z::: ~;::: :;:~
1-.. 1 1--1 1-.. 1 Jo...., I·"-! !-·•-! \ i... --1 l•....I 1..... 1 I·-·! 1-..1 1--··4 1' (°\ !·....\ t-....l 1..-1 ........1 J.•"4 l-·-1 --1-lHHl-ll-l-l-l 1-1 l-MI ,.. ,.., lo·-! I.I ,I J-1 f-4
l-..J. .-..; !-"•+I J.--; !-..•-\ f-•-1 \-•! (•,.>+!
Ct:. 1:t:: et:: i:J::. 0.: 1J;~ Ct:. Oc. tL Ct. U:. 0::. {:;1 lJ.. 1:t:: 1:t:. Cle. Oc: Ct~ LI::: i::t::i::t::i::t::i::t::i::t::i::t::i::t::i::t::i::t:: 1:t:: LI:'. Ci::: Ct: Ct Ct:: W C.i::: Cl::: LI::: et:: Ct:: l~t: CJ::: Cl::: Ci:::
CL. Ci... 1:L 0.. 1:1... Ci.. 11.. Ci... Ci... CL.. CL LL l'...~:i 1-..1 LL Ci... Cl.. CL 1:L •i.. 0..LLLL0..LL0..LL~~ LL. LL L1. 0... CJ 0... _j 11- LL ~ LL 0... LL LL LL LL
t'~:;:i i:~:. 1~:~. (S:1 ;~~·; (~;:i 1~:;:1 (~:~1 1~:~1 QQ~QQQQQQ !~~I ('.;:1 (!;) 1'.::~1 i:S) 1S) 1~;'.1 (~~1 QQQQQQQQQQQQQQQQ
i"·- i:o er-. .,...... 1:S:i .,._, (lj
·:~r 1••L:1
i""tJ (i..i 1"\J OJ (\.1 , .. ~" 1 :~:::: ;~:::; ~~::: -rum~m~~oo~
~~~~~~~~~ 1J':1 IJ~1 if"1
"::I" If'• •.,[.i
If) Ln i.f"< tri !f)
f"- ((1 ~o-ruoo~m~~oo~0-ru0-
m~~~~~~~~~~~~~ 00
·:-·i ·:--1 -:-·..:i -r-·: ~ ·i-l .,.....-;: .,-i ....-! ·r .,......., .,....-; ~ -r-t .,......., -r-1 ·i--i ·:-1 "r'_, •t-l T"""'I .,....-!.
--------------~~
':""-i- ~ ·i-·! T'-i -:--·1 "t·-i ~
C:'.020 F'~'.HiT" \~~!RT I:? F'LFi'T1E.F:. 0ME's t·iRf'IE ";
~:? i~J::3t:.:.1 I r-1F·trr f~:;:
i?-'Ci40 CiO'.:;IJB 140(10
;~::Ci 5(1 PP I NT
i:'060 PPIMT" ~·-IHRT r:::: PLAYEFi: T1i10'·:: r·IF-iriE: 11
;
c'.c'.4\21 PRHff" ;,:: [TJC.lF:DINF-lTE' A. FoLLDli.I IT 1,JITH Fl r.:::r.JF-IMA. THEN TYPE THE: y CDDt=::-·"
c'.25li PPH·ff 11 ein.ir-1TE:, B; FDLL[JWED E=Y R c.RFi:HrFIJ::iE Fi:ETUHN. 11
c'.c:E.o PPIMT" ~·~HEM 1.r•[1u 1-1FJ•.)E FnnsHEei YrJuF: INITIAL PATTEF:N' TYPE IN ~~,, 0. 11
c'.c'.70 PPHff 11 AL.SCI, fiFTE'P YDUF': :?.OTH LIFE-UNIT IS POSITIOt··IED' I WILL RSSUfflE"
c'.2a0 F'F.'.IMT" THRT YDLI AF>:E FINI·SHED, Flt·~D I 1.i.IILL GD ON ••• 11
c'290 PPIMT
pp I MT II I
::=:::::(1(1 Flf'l t-.lOLi.I J;;:EF'IDY FDFi: INPUT OF YDUG: L. I FE-Ut-n T:::. EACH TI fTlE I TYPE Fl ' ·::·, II
755
'. ~ F'C!M l T!~! 11 i II
:=1c1:nh. "
756
- -ilJ,J.!
~~:1i'JC1C~~'1-C~[1 t-iE"':::,r J
0002930 ~~XT J
0002940 ~AT Fl = A+B
000c'.9':iC1 tiC<T H
0802960 GOSUB 15000
r10i;::1;::970 GO TO ;:?? 1 ~;
(:10029::;:(1 F'.EM
1~'100;::991~1RF:M :<i::<i::¢: E:O:: J T OP ACiAI t·1 :<i::¢:'<i:
01~1(13fK10 PF'. I MT
0OCr:::o10 PP I MT
(1(103020 PP I l'ff
~K10::::~3;:0 PPHff" THArn=: ':'OU FOF.'. F'LA't'ING ,LlFT, ";!=i$:
0003040 IF M9 = 1 THEN 3060
~}~103(150 PF.'. Hff II \'OU TOO II; .E:$
0~?1(1:3(16(1 PRINT"
II
757
(:1~~-:!140'3li ~~F-TiJh't··I
C11oi 15000 F'.EM
~·'.!~Ji ·:.o
10 F'.D·l:;;,::,;.;:.:i: HDFH?II pp nff n-11::; ~f!UT I f'i[ ~i:;.:i;'Q!
~:1~J 1':it(:'.O ~:E"J1
Ci Ci 15~2r~!(i I ~-fr
5040 PF: I !ff
!;'1 ::'I i
~:i~315~~i]~J
~~:i 121 i 521 (i F=F:'. I !"il" H i ~~!: l£;
(l (~ l :5 22~3 Cii] 'Ti] i '.:1.JC.:iCi
~~:1Cr1.. 5;~~3t1 IF' J l",JF~ ;:'., Tf-JE~t·J 1::;;:~1::fi
e11~11s2:4?3 F;F.;Jj"iT"li ~;~ H ~
0015350 NEXT I
!21CJ 15·31:.0 F~~· I t·i1" II :
11
l 5
19~330 IF C$ -· "•,.•1::::::
11 THD~ 1·::io::::o
i 9(140 IF C:=? = ,, iiO" THEt-1 19 H::10
1905(1 IF 0$: = "rJ1:1 11 THE:t"i 1910(1
1 9060 PF' I t·ff" 1 ! ! F'u:.RsE, At·~SWEFi: '/ES m•: HO 1 1 i 11
1 '3(165 PF.'Hff" 1=k.1Stc!EH !I;
19070 GO TO 19010
1 ?-~~f:~(i C! = 1
1
1 '~n::y:~1~71 PETUPM
1 :.11 ~~1~1 G~ = lt
1
1 ·:.j 11 ti F:E:TUPr·i
l912i1 PEM
19140 EMD
758
BEC1'1E A TW1-Dl~E'JSI1'1AL TfRA'JT
TiE GA'wfE 'BATTLE 1F' T...IF'E' IS BASED ·)'J TH.: GA"1E 1... IFE·
LIFE-U\lITS ARE ClU\JTERS 1\J A\l I'1FI\JATE GRID· TiE PRESE\JCE 1F A LIFE-
U\JIT IS I\lDICATED AS A ~ER1 l'J TiE PRI'JTED GA'1E 8JARD· 1\J TiE 81ARD
EACi r.. Ilt'F.-f.J\JIT IS SURR11J\JDE:D Bf A '1Ai<:I"1U"1 ·1F EIG{T H:ICHB)RS.CALL
AJACE'JT !J\JI TS ARE C·JU\JTED, I '1CL'JDI -JC::: DI AC?l\JAI... 'JSI GiR'lRS>
TiE GA'wfE PR1CEEDS FR1"1 1\lE GE\lERATI l'J Tl A\J1TiER· TH: LI F"E-TNI TS
TiE'"fSELVES 0!) 'flT "!)VE• TiEf Wif.. L EI Ti ER 1.. 1
VE 1R DIE• TiF. CTJRRE'JT
P 11PULATI1\J ·lF' A\J AREA WILL DETER1I'JE TH: PlPTJf...ATI·l\l lF TiE TiE '1EXT
GE'JERATI 1\J. E'>CI STI \lG LI F"E-U'JI TS "1Af DIE• lR lfE\\' 1'1~5 "'.!Af B~ BlR\J I \J
E..YPT'f SPACES• ACC·l RDI \J e T·1 TiE F11...l.. 1 \.71 \JG RlJL ES:
BIRT-I - A \JEW LIFE-U\JIT WILL BE B1R\J I'J A\J E"'.IPTf SPAC~ TiERE ~RE
E'-c.l~CTL'f TiREE '\JEI GiBlRI \JG LI FE-lHI TS•
E'>{A"!PLES:
T-IE ABOVE LIFE-U'JITS VJILL 81Ti DIE BECAUSE F.:ACi iAS 1\JLf
0\ll'.: \TEI GiB:J R·
759
nn Tii<: A'11VE LI !<'\-'HI TS Wlf~f~ DI i". FR)'IJ IVF.:RCR'1WD[
)F -JG. TW1 \JEW
L.IFS-TJ~ITS WILL BE 91R\J•
TE \li;_:.{ r Gf.:\JSRiHI H )F' T fE L\B1VE FR)rJp Wlf~L B~:
-> -..,,
'1 '1 TI CE T-I AT Ti 17; TW) fJ \JI TS ) '1 TH: r: \} D 1 F T H: BL I \J <ER DI l<.: • A\} D T -I AT
TiE 1\JE 1'1 TIE CE\JTSR LIVES BECAUSE IT iAD T~1 '1EIG-IB1RS· TW1 -JEW
UFE•fJ\JITS WERE B1R\J \J"::<T T1 TiE CE\JTER BEC.l\rJS!:'.: T-fE'( iAD TiRF:E
\JEI GiBJRS·
0 0
0 0
TiESE ARE CALLED T-IE B1<• TIE LlAF, A\JD TiE S\JA{E.
:- 0
: - - (}j -
;-- -
-'>:0-0-
- :-
->:--0-
- : --
->:- ~ - -
.·- - - -
->:- - 0 -
: 0 0 IZI - :-00- :0-0- :- - 0 0 : - 0 :
: - - :- 0 - - : :- 0 0 - : .,. (Jj 0 - : - 0 0 0
\J0TICE TiAT T-IE GLIDER '~1VES' 1\JE SQUARE D1W\J A~D 1~E SQUARE
T1 T-IE RIGiT EVERY F0UR GE~ERATI0\JS; IT IS SAID T0 ~0VE AT l~E
QIJARTER ) r TiE SQ!JARE-R"11T 1F' TW1 TI"iES TH:: SPEED ')F CIGiT·
760
THE Pl.Ai:
Mi GA~E, 'LIF'E'• IS PLAfED 1\J A 81ARD 11 < 30• EACi PLAfER iAS A
UP Fi1R '{')rJ B'f T-{E· C')..YPrJTER AT T iE START )F' EACi GA'1E· F.ACi P!..AfF.:R
TRI ES T:) DESTRJf T iE STABf... F.: PATTER..J S I \J HS lPP1\J E>J TS i'1 '1E RSGI 1 \J •
TiE 1~Ti1D 1F' ATTAC{ IS VARIABLE. SJ..YE TI'1ES GLIDERS 1R SI'1ILAR
PATTER\JS ARE USED· S1'1ETI"IES PATTER\JS WiICi ARE {\J1W\J T1 E<PA\JD ARE
E'1PLi1fEDo I\J A\J'{ CASE TiE 1\JLf CiA\JCE TiE PLAfERS WILL iAVE T1 PLA\J
Ti EI R STRATEG'f WI LL BE AT T iE ·1UTSET 1 F' T-IE GA'1E· IT IS TH.: I \J 1 TC Al_.
PLA\J 1F' TH'E:R W1Rl....D WUC-1 ~JILi.. WI\J 1R r... )SE T-IE BATTLE )Ii' t.IF'E!
1
EAC-1 PLA'fER,HAS A li'1'1E REGU)N WHlCH !IE TRIES T•1 DEFEND• AT T!iE
SA'1E TI'1E• i1WEVER• HS PLA\1 1UST DESTR")f ii S ')PP:J\JE\JTS H1'1E Rr-:GI 11\J•
THUS EACi Pt.At'ER '1UST SET UP HS I\JITIAL P!..A\J ')F' HS W1Rl... D WIT{
A Piir... OS'JPfi 1F' DEF'E\JSE, 1lF'F'E'JSE• '1R ATTE>1PT 131Ti•
EA.Ci Pt.A'fER "!Ai USE !JP Tr) TH RT'f r.. r F'E-!Nl TS ( \J i i s IN'l Tl AL
PATTER'l• THS IS l\J ADDITI1\J T'1 TH: i'l"fE REG£0'JS WHCi I HAVE
At.READ'( SET !JP F"1R EAC-1 P!...A'fER· A PLA'fER "1Af P!JT TiE f... I F'E-U'H TS
OF i i S I '11 TI At. PATTER\J 11\J iI S SI DE IJF TiE B•JARD )>Jt... '(. F'')R PT.. A'(ER
0'1E TilS IS FR0'-1 'f = 4 T·1 f = 15, <TiE REGil)\J F'ff1'1 f = l Tl'(= 3
15 RESERVED FIJR TiE i0"1E REGIO\J. 00 flJOT TRf T1 PLACE A'Jf LIF'E-U'JITS
I "1 TIH S AREA I >
761
:-----------------------:
3f.IJ: )- ) - - ) ) ') )
-') -
.- -1 - 1 ')
- )
)
- - )
)
) ) )
)
---.
25: - - -
20: - - - - - - - - -
: -- -
15: - - -
: -
- -- :
1 ~}: - - -
.
. --- :
- 1 - 1- 1 -- - - .•
: ) 1 - 1) ) ') ·1
: 'l ) 'J ')
1: -
') 1
- - 1 ) )
:---~-------------------:
1 3 7 11
Pl.A'fER i)\J~ -fAS TH: 91TT1'1 lF T-fE B'.>ARD AS IT WAS PRI'1T~D ·1:JT.
Pl.AYER TWl CWil ~lGiT B~ TiE '1ACiI\J~> i4S Ti~ T1P 1F' TiE B1ARD·
IF '()TJ WA\JT Tl Pl..Af AG1~I \J ST Tl-!€ C11'1PUTER, T'f PE ''1ACH \J€' Wiff:\J I
ASK fl!J F')R Pl.t::\fER TW) 'S Nl\ME•
762
LOANS:
DESCRIPTION
This program computes annuities for both payments and withdrawals for loans,
mortgages, savings, etc.
USERS
Householders, individuals who have checking or savings accounts or have
outstanding loans or are contemplating any of the above will be able to put
this program to good use.
INSTRUCTIONS
Upon execution the program will ask if you want instructions. LOANS is
fully documented and will prompt for all necessary data while the program
is running.
LIMITATIONS
Line 100 contains a DEF FNX ( ) statement; this function is used through-
out the program. In line 1200 LOG ( ) and 1260 ABS ( ) statements appear.
The source code will require 6K Bytes of memory for storage. Execution will
require an additional 1000 Bytes of memory for table storage for a total
of 7K Bytes for execution.
763
40 FIPI IT L
J3(i PPif·ff
::::41?1 PPH·IT "!·iHFiT HPF 1:1 (::;::),I (PCT), F ($)II;
:;::i:;o I!"iF'UT ~:11, I j, Pj
:31~~:(1 LE1. I 1==I 1.-·"l
::;::-,::-:21 L.ET !'i 1 =LOCi l ( 1=11 :.:i: J 1 .···p 1 ) + l ) .·.. LOC ( 1 +I 1 )
:;::::~~1 PPHff
390 pp Hff 11 iiUl·l:t-:E"F~: OF PEP I on::;; ::." N =11 ; !! :I
764
~:~ 11~1 i~tcrrc1 l ?\:1(1
~:.i ·~:~ (i F F.~ I t··I T
1
i:. i 121 PP Hff '' ·nn '.: :; PF·ocPF1M F'E"PFOPMS CfiLCULHT I ot-i:::; F'OP"
1::. c:'.o PP n-ir "BOTH PH\'MEJff mm 1,.nTHDPf-1t,mL. i=1t-1t·1t.11 Tr E:'.::;. "
630 PPHff
6 4~21 pp Hff !! I lflF' ff!BL[f; f'.IF'.F l!Et"iOTED ff:; FOL.L01...1::::;: II
:;:::121121 PP Hff
::: 1 (i PR I t··IT II FiFTEF'. EF!CH CF6[" \'OU MFI'/ CHOOSE Ot"iE II
:::::c:·o PPINT "OF THE: FOLLO~·HtiG F1LTEJ:;::r·1ATHJE::;: 11
::::;:i.) PPIMT
::: 40 PF'. I MT II -· 1:::1t ·I OTHER CA:::E, ::;AME Uti~:J·IOt·~M l..IFIP I FIBLE ti
:::~:iO PF:IMT fll·IOTHF:P CA::;[, DIFFEPEJff UtWl10~·-IN 11
II ;::: -·
765
i C4.":!Ct IF ::;=::.:~ l ;:.:::.1.121
J.r21.:·{.(1 IF ·rt-'·!E~f"l 1~1
j '?50 TF :~;~ 0" 1 T!·ffli l U9U
J. C1E:1(i F 1 F~ I t··iT
l i2i 7Ci F1 F:~ I f"il'- :i ~:.~HI ciff l I .IFJ F? I ft I: LE I~=; ~Jt i~:::"t·tCJl:. ft"1 f 1 =t·. ,, 1::'.==r-·' ::~:=I !l s:.l=F: 1
) ll ;
1 ~::i:=.::121 I !!PUT Fi 1
E:19i::'l H- 1=H ::::: i THEll 1 16C1
11:;:1~;; IF :=i1 THEli 1660
111'2! IF f!l=~: THEll 174~1
1 l c'.0 IF n 1. ::::4 T HEJi c'.Ci9('i
1 1 .::o F'F:' I r-iT
766
1 C:i H:1 i-!E.)ff ·:;
1 ':ic'.O L E.:T ·:;::::j·H + 1
j :..:i:-=a:::1 L. . ET ~1·::===F' l -·>=:
1540 LET A2=FNACA3)
1 c::;so LET f; 1=I 1*-1=t:::::
:I. ':i60 LET H=:Ft--lfi CI:: 1 )
l :57*(1 l_E·r :=-::::::::<+·f:i·:.::
l '.~;:::c1 !_El'. ::·:: :~==(1
1
767
C:'.l2I :.}li
1 IF F:·~-3.>F'1 ·r!·-!F~t I ;::'.C~E:i~i
,:::05f1 GOTO J ·~150
768
TC.I l!E:TE"PM I t·ff. THC C:!MU!Ji IT UI i H:::1t I fJ cr;::;c;i n··1 I! IC:i UEF'CC; J T·::; OF ::;:: ~::c~;. 00 fl !·iOt!HI a
I i·ITL:RE::;:;T PF:l In I:::; ·=1-·?/C:''.;; n '/[(:jF'' COMP(l!jl'!'I IF: D l)UHRTF'F'.L.\'.
THC u1=1F'. I f!I:L.[·:·; flF'.F C0!·11..1n:·rrr1 TO i"i !)Uf:n~nFPL'r' -r:i=:1:~:; I::; nt·ff1 EllTl=.::PF.D r:i·:; ·:;1-ICll·!t·I
N- 3 ~ 4 = 12 PERIODS
i=1 nm 1,11::1i:;:· I ffF:! ..E or· H·lTEJ~'.E: 0 :n
I - 4.8~~/4 = 1.21875/PERIOD
F ···· :;•: J ::::: l C!~'i .··PF:I~' I CID
·=:;oL.uT 1cn·1
·l·I··:>
Tri.,
N - 30 ~ l2 = 360 PFPIODS
F' -· ;::-c1·:,100
I - 5. 12 = .458333333/PEPIOD
769
i"'j"
i I
\:I\· l I r·:!,.·ol
( . T r=F i:
1 1
DEO 1·· . l!_!j:·}l::E. h ·~ 1
··::i,:.l
T PHlD = 21.8~0.4~
Ti IT
i
.1 P
'
' I
J, -
:::'.31:1
u '.'.::: ~.:~s
1:,"'.f;:i'{':::: 1:l n !~:;f';::
:i ::.! j:::
l:I i:::; l
14 l::i::!, =::1::1
p
l ::::; 1
'.) i:l ft ,~:~ ~:::;
i6 t '.::; l 1:) II
J (1l.~:::11
770
MAZES:
DESCRIPTION
This program generates uniquely different mazes in two dimensions. The
maximum size of a maze is 23 x 25. Each maze is distinctly different from
the preceding one and has only ONE solution.
USERS
Puzzle and riddle fans will enjoy this game. The complexity of the mazes
generated is varied according to the dimensions but all should provide
fair competition for the initiated as well as the uninitiated player.
INSTRUCTIONS
Type RUN and the program will print out a full list of instructions and then
ask you for the size of the maze you would like to construct. The greater
the dimensions of the maze the more complex is its• solution.
LIMITATIONS
Mazes uses two dimensional arrays to generate the patterns. The source code
requires 6K Bytes for storage. With the DIM statement in line 240 set at
(23, 25) the program will require 18K Bytes of memory for execution. If this
DIM statement is reduced the program will execute in less memory space but
the mazes generated will be correspondingly less complex.
771
::\,-! :; .
,:,~:,o F'F'HiT "THI'.~; F·C::'C!CRAM ~·HLL PPHff OUT i:-1 ItIFTFFTt"ff MfCE EIJEF.'\' THlE IT"
;:>::,fl PF.'.Hff "T·::; F!!f! Him Ci lf!F'.AfffEP'.=; OtiL\' urn: F'Fflli THr<OUGH. YOU Cflri C!-!CIO:::;E 11
E'?~~i F'i?HiT "THE. I!IMEll::;I0!·1:::; or THE: MA2'.[. I. f:. THE t··H.IMBEF.'. OF '.::;OUHFES lo!IDE I!
;::~::::O PPIHT "Fi1llt THF rlilt'l'F:ER OF :::;OUAF'E'.:; L.Ot·K~. fl .:.:::: I:\' ~::::: MF!ZE I'.::; THE II
~-=:-::io F'F'.Hff "i·ifi>::T!•"!l.W!, CUT i=1nY DIMEt1::;Iot1:::; UP TO THE::;;r LIMIT::; AF'F: OK. II
~::lo PP Hff "~,!HAT r~!F'E. 'i'OUP i·.!I DTH AHD L.E:t !CTH" ;
::;::;::o HiPUT H; 11
440PEM
i:l'.5Ci F.:tJ=1 1900 THRU 3200 PICK THE
i::j. fi fi ~~ F.J 1 1
::;C1i_lflF'E. I 1·1 ~·iH TCH TO '.::;n-iPT.
i:.I" .?[1F.~Er,·1
,::1. ::! f1F:Et ·! 1
772
LE:1· 1~: ...
r:: -·
LET •, ~M•
:,,l
j •,
:::.:,: -
..... i..:
f. ;:::o GOTO
f.30REJ1
1:. O::C1PEM
t_:, ~i li F:~ Fl1 :=;TfT':::; ,,1,::100 T!·!PU .::;70(; LOOK FOR THF:
66fi ~:EM ··/1Uc!F'V Th l·IHff:H TO ·:::;T1=1F.'.T i=J t·1HI
f, ~:?:] F:~E]:1 F'nTt! !·iHFJ l THF: OL.:Lt OM[ CEr=; BLOClEJ.1.
THF LI H[•:; HR[ ::;cflt··IMED FOR A :=-;oUFIF:E:
(1 =~1 ~i f=.EJ:1 \,\H} CH fl!=!(:; F!LF.:Ef"fft\' t:E:Ell u:=-;ETt BUT I'.::;
7:2!Ci PEM ,:in J1=1CEJ·IT T Ct fil i OF'D·I ::;::oUARE.
~? 1. i2H~~Et·1
::::::=:OFTM
890 IF W(R,SJ = 0 THEN 730
900 IF R-1 = 0 THEN 1330
910 IF WCR-1,S) <> 8 THE.N 1330
920 IF S-1 = 0 THEN 1100 0
773
l Ci!. i '.=< r 1~3
i.:1C~ 1. ~::ii=:;i::::1 !' l '~1::~c1
J. j IF f~: = !-l I I
J I 1i2¥ ~:.1 i' ~~-+ l , :=;) :.·. > C~! ·r!-IFJ·,i 1 c~::=~!~7i
1
1. E: S~~1 LET !~~ = 1
.1 C~CiTC! 1:::'.~::~!]
774
1 co~:1 IF :;::; :: > u THFJ·I 1 ~A.1,::J
1610 IF Z = 1 THEN 1690
1 C.c:O LET 9 :::: 1
i :::40REM
1 :::•:;0 LET L·~ ( P-1 , '.~;) -· C
l :::6t1 LET C = C+i
1870 LET UCR-1,Sl - 2
1 ;::!:::0 ,_ET F.~ = F:~-1
l~::'.:9(1 IF C = H:<i:l.)+j THHI ;::3H:1
1 9l1(i LET 0 = 0
1 9 10 GOTO 9(1(1
1 ·:=.1;::0 LET l·H R, :::-U -· r
19:::(1 LET C =
C+l
1940 LET UCR,S-1J - 1
1 ·3 5(1 LET ::; =
::;:;--1
1960 IF C = H~J+l THEN 2310
1 9 ?(1 L.ET G! = Ci
1 9:'.::t1 GOTO 9(.10
1990 LET NCR+1,Sl C =
;::0l10 LET C = C+ 1
~~'.010 IF l..J(f':,S) == !21 THEt1 2040
;::~02t1 LET u o~:, s:i -· :;::
E:0:3f1 GOTO E'.(150
2040 LET UCR,S) - 2
c'.!~150 LET F.'. = P+l
2060 IF C = H•U+1 THD·I 2310
2(170 LET G! = 0
2~:1~:::0 GOTO i 330
C.'.09(1 IF G! = 1 THEt·I C.'190
c'. 10(1 LET ~·J ( F.:, 3+ 1 ) -· C
775
!::'.'. l ·::;Ci L.E·T 1.i f ~~ =' :: : ) ..•
3~~ii:1
1
:? 1
1:'.:'. 1 ~::~~j L_ET :·:. == J1
776
POKER:
DESCRIPTION
If you like card games and would like to play for high stakes or low but just
haven't got the extra money, this is the way to go! This program simulates
a five card draw poker game. Up to five players are allowed and the computer
is the dealer and keeps everybody honest.
USERS
Anyone who enjoys a good poker game will enjoy this program. If you've always
wanted to try your hand at poker this is one sure way of doing it safely
and for the old pro its' going to be a little bit harder to bluff, but go
ahead and try.
INSTRUCTIONS
To use this program simply type the word RUN. The game will then commence.
The game is self instructing and will ask for all necessary inputs. For
additional information list Poker.
LIMITATIONS
With the exception of the ABS ( ) statement in line 2230 the program should
immediately execute in any basic speaking computer with at least 8K of
available memory. The source code for Poker will require 7K Bytes of memory
for storage.
777
('iC!':IU F'F:'.HfT" "Tl·!J.'::.; T':;_; n-p::·: DOkEF:: GF!ME OF FJ:I)[ CF!Plt DF:'f"·n·J FOF.: i TO 5 PL.F!Y[F.'::::: 11
0~160 PFHff
0070 PF:'Hff !I n·:[ [!["t=ll EF: I3 ri GI t=::nD C[T::::; A COFFEE T::r.::EF!V El.JER'r' HALF",
00:::0 PPHH "HOUF'.. L)HFIT TIME I::: IT HOl·j";
:21090 IMPUT M
~:1;:~4~:1 ! IE>::T ·-
0;:~:50 !"1E::<T A
o;::t:.t:1 l·
= K+ i
;·".
o;:·.-;::·o -· i T ci
FOP p- t::"
I
040(1 G =0
04H::1 PEM
0420 F.:EM THE FOU.. rn. 1rt-1G r·:; u~::;ED TO GET THE' F'L A'r'EF.:::; t·-!F'iME~;.
121430 PEM
044(1 F'F.'.IMT 11 r·ie1L·l EllTEF.'. THE FIF.:ST MAME OF ";
~~'1450 IF G==1 GOTO •:::;40
t214E.£1 IF Ct=2 CiCITCi ::=.1 ::1~:1 1
778
0520 IF G=H GOTO 750
05~3 IF G<H GOTO 440
i~:i r:i~~(i
1
F ~~ I f*i1' I! F'L, Fl\'E:F'. ;~'.
11
;
1,:'1'360 G = 1.~+j
C1'5?0 IF C=H GOTO 7::::;0
0580 IF G<H GOTO 440
(1600 I r\F'UT C$
0610 G = i:;;+i
0620 IF G=H GOTO 750
0630 IF G<H GOTO 440
064(1 PF.'.It-ff "PLA\'E:P 4 II~
Cl 6 5(i I t·iPUT D·$
i2iE.E:f:i Ci = C~-+· 1
0670 IF G=H GOTO 75C1
06Bti IF G<H GOTO 44[1
!~.if':. 90 PF.: I MT II PLAYEF.' 5 II ;
07ti0 IMPUT E$
0?10 PF.'.IMT
~:~720 F.:EM
073ti F.'.EM USEU TO MF!KE THE GAME HffEF.'E~:;TU·IC.
0740 F.'.EM
0750 PF.'IMT 11 Al'1TE UP! PUT ~:;OMETHIMG It··! THE F'OT. \'OU MAY BET At·J\' FIMOUt··IT",
076(1 PPIMT "Fl?OM $1. 00 TO $100. ~)t) TIO NOT USE" THE :;: ::;IGM";
1217·7~1 F' = i
07B0 ~·J = (1
0 790 I MPUT ~·J
0:::c10 PPIMT
o::: 10 L·~ ( 2) = 1...1
(~::;::2(1 IF ~·h:=(i THF'M 3130
0::::30 F.:E:M
0 ::;:: 4~3 F.'.EM DEAL I MC EUE l?\'otiE THEIR HAMii OME FIT Fl T I ME •
~~1:::5(1 FEM
0860 IF H=l GOTO 900
0B7(1 PRIMT 11 t·-tmJ IF EUEF.:'r'OME :BUT "A$" ~·HLL STEP I:FlCK I ~·HLL DEAL HIS Hmm. II
0 ::=:B~) PP I MT A$:;
0::;::9(1 GO'.:;UB 2E:60
09(1(1 PRINT A$
0910 FOR C1=1 TO 5
0920 GOSUB 2160
0'33(1 MD<T C 1
~)94(1 GOSUB 2770
0 '35(1 IF H= 1 GOTO 1'.;:7(1
o·:.1E.1-:1 PRIHT"'.:::;TEP BACK AMD HAUE "I:$" :::;TEP UP. 11
0'370 PRHff
09t:O PPIMT B$;
0'390 GOSUB 2860
1 0(1f1 PR I t·ff Bs
101~3 FOR Cc'.=1 TO 5
779
1020 GO~JB 2160
1030 1-iE;.<T C2
1 04n GO'.:;UB c'.77(1
l fa5~~i IF f-1=;:'.:~ C~tJTC: i :~:(~1J
1060 PRHff"·:~;T[f' I::f1CK f!HTI HAI)( "C$" ·:;TE:P UF'. II
780
1
1 '.:i'::::~] c;c1~:;1Jt.: ~:.'.'?"?(1
i:::;,;;.o IF H=l GOTO ;;:9;:;:0
1 i:;st1 PF: Hff" STEP r:1=1c1=:: AMD HflUE "B$" '.::TEP ur-:-. 11
1 i::;i::;,n PPIMT
1i:=;70 F'PIMT B$;
1:;:::o GOSUB C:.'.:::60
1590 F'F'IMT
160(1 PF.:It·-!T"Hrn·J MAM'/ CAPD:=.; DO '/OU ~·lAtff ":E:$;
l 6 i 0 P;:: :::: 1)
1. 620 IHPUT Pc'.
1630 IF P2=0 GOTO 1690
1640 IF P;:::=>6 GOTO :.=:06':1
1 65(1 FOR C7= i TO F'c'.
1660 GOSUB 2160
16BO GOSUB c?70
1690 IF H=2 GOTO 2920
1700 PPHff":::TEP BF1CK mm Hf-1UE 11
(:$" '.::;TEP UP."
l "? 1r2i PR I MT
17412! PPI MT
1 75(1 pp I NT II HIXJ MF1t·f/ CFtPI6 DO YOU !·~At·ff II C$;
1760 p:;:: = 0
1 770 I t·1PUT p:;:
1 7::;::0 IF P3=(1 GOTO 1 :::4~~1
1 79(1 IF P3=>6 GOTO J(16(1
1800 FOR CB=1 TO P3
1810 GOSUB 2160
781
I t·iF·~JT F=~
;:~. 121·7~,
2080 IF P5 = 0 GOTO 2140
2090 JF P5 => 6 GOTO 3060
;:~ 100 FOP F 1 = 1 TC! r::·i:,
c.:'.2;:'.0 PETUF:'.H
2230 N = 10•(1+~BSCr~3(N+WiJJJ
2240 FOR A=l TO N
C.'. c'.50 '.::: =I 1···IT 1. ::::;;:::'.. ·:)·;::1 9999•3:.:.:~:HD C'r') )
,:::C'.fr[i IF. ::.:: == ~~i C.lf).fi] E~C:::::~~1
782
C? 1::4. i=1 F Et~1
1
F:F:t I! iT ·:·:;!.J J 1
2650 IF X>39 GOTO 2700
i:'.t:: t=l1 IF :=-::
1 C~iJT'C! 1::'.~·: ;::~~:1
1
? 7 10 F'ETUF.'li
c'.9B0 PPIMT
;::·990 PPIMT "L·iAHT AnnTHEP HAtm nYPE -.,·c:; op tm:i 11 ;
3000 IMPUT 0$
:::lHO IF ()$ = "IK!" GOTO :::130
:::020 F'PHff 11 AF.:E THE '.:;F1ME: PLR\'EP::::; rn THE GFtME !TYPE YF·::: OP no:i 11 ;
J030 H1PUT 0-?
:::(i4fi IF CJ$ = \ E:~?-; ' C~1]TC1 75(1
11 1
1
783
POPUL:
DESCRIPTION
This program calculates and prints yearly population projections for an
area. The projection may be printed for a number of years, up to 99. The
program uses compound interest formulas to generate the projections.
USERS
Individuals interested in the economics, social problems and growth factors
of an area will find this program very helpful. This could include civic
groups, home owners, engineers, environmentalists, and local government
consultants. The area of interest may be a fish tank, back yard, or entire
city.
INSTRUCTIONS
This program requires no special initialization prior to execution, just
load in the program and type RUN. Popul is self instructional and will
request all input necessary for operation. List the program for additional
program information.
LIMITATIONS
Popul will require 3K Bytes of memory for storage and 5K for program
execution. This program should execute without problems in most 4K Basic
compilers.
784
F'ClF"! 11.
1 'l!~'.lF.'[i'i TlF::-:cF I PT I Cil+ -f:!l"li".IMG THE MAH\' FiF'PL. I CfH I ort~:; ClF THF. r.:·cw1Pot ltffl
l ;::;oPEM Ii i !E.F'.[:::;T FOF'MUL.A 1'.:: THFn· (IF. F'OF'ULfiT I Otl
icoF.EM Pi:;:·n_11=.:cTro11. 11 L:: i1cir FJ·iTI~'.ELY F:ccuPF!TE.. Hi
1 ?CF.'.Et'i n If !T IT !"'."j•:;'.=:uMc:.: ::-:: (·:TF.Fl [I\' 1 i!CF.'.E:fi:=:E: DiCH \'[FiF' =
1 ?'SPEM F:!.!T IT F: i.F:FFUL FOP ~~:HOHHIG F'.OUGHL\' Hrn·! At·!
i::x:1F.'.EM !!F'.F.A !'1ILL l.HCF'FFr::r' • • THI·::; F'F'OGF'AM !·HU...
1 ·;1~iF'EM
c'.l?!!~.'IF.'.EH I 1··1'.::Tf?U1~:T I ort::-·-T\'F't: , F'Ut!, 1:-::t·m FTll.LOl-.1 Itt::TF.'.UCT Iott::.
,:::[i5F.'EM
;::'.1 tiF'.EM**:i:i:**-*-***'i:,::i;i::,;.:;.;i::i:i::i:i:;.:i;;.;i;:i:>::<i::i::.::;.:i::i:i::<>::<>::.:i:;.;i:*.:<i::i:i::i:i::i;.:;.;i:;.;i::i:i::i;.::i:i::i:i::i:i::i:i::i:i::i;.::<i::<i:*:<i:*-:<i:**-;.:i;**:i:i:*-:i:i:*'*':<i:*-:<i:*-'i:i:
;:· 15 D IM F l 00)
::'. 1 7 DIM Z 1 0~))
c'.c'.i~'! PF: It-ff JI TH I:::; F'PrlCF.'.Fit'I ~·11 LL. F'PO.JECT F>OPUL.Fn TOM GPm·ffH FOP At-I'/ t 11. IMf:ET OF JI
c-::;o PR I MT JI 'r'EF1P'.::: t. J:: I t·1c THF:: coMPOUt·m r r·ITEF:'E'.:::T FOF:'M1JLF1. "
;::: ?O PP HH
!:~t:1 FtF.~ I t·iT
1
;:. •
c'.90 PPHlT "F'F.'.H·IT THE: f'."itit·IUAL PEPCEtff OF GF.'(i!·!TH FTiP \'OUF.'. F'OPULATIOt·!";
J(10 I t··iPUT P
~:::: 1 ~::; t='F.~ I t~1T
::=:;::'.O F'F' IHT !I FOP HCIU nm I\' 'r'E~F1P::: DO \'CU l·I J'.::;H TO HF!' IE DF!TA COMPUTED II ;
:;::::o HIPUT N
:~:~.q1 l_ET I =t2!
,::::~[;LE~T A ::=: t···I
::=:t.o LET Ac'. =" ~l
370 IF A < 9 THEN 570
380 IF A = 9 THEN 590
J9~) PPIMT "LI'.::r T!-lE FH:sr ·:;i \'EAF.'.S TO HE CCll'"IF'UTED~ SEPFiPATE 'r'OIJP rH.iMI:EFSJI
::=:91 PF.:Hff Jl~·HTH COMt·IA'.:::. JI
4~::'n) GO TO 5C)fi
4 1 (I PF.: I t·ff
4c'.0 PPHff
4::=:c1 PF.'.IMT JIL·~HAT J:::; THE 'i'l'.·:::F!F.' FOP \'OUF'. t:F6IC T!F1T1=1 11
;
44ti HiPUT B
45(1 PF.'.Hff
460 PF'. HH ~.j~IAT JS THE F'OPULAT I OM FOP THE: F:n'.:::;[ \'EAF'. i t·K1 COMMf.1'.:: F'L.EF!'.::E) "
11
785
490 GO TO 6JO
::;on I !·iPUT F' (I+ l) , F f I +i:::'..) , F (I+::::) , F (I +4) , F ( I +5) , F" ( I +6) , Ff I+ 7) , F (I -i-::::) , F ( I·+ 9)
~:; 10 LET fl =: A-·9
786
PROFITS:
DESCRIPTION
PROFITS is used to analyze the profit from various departments of a company.
With slight modification this program can analyze various household expenses
such as: phone, heat, light, groceries, etc. versus income. For business
use the amount of inventory and its' rate of change is taken into consideration
when determining the profit or profit margin.
USERS
Individuals who are cost conscious put this program to good use. It could
be used to analyze house-hold spending versus income. These results could
be used to streamline or trim the budget. Businessmen as well as efficiency
experts could benefit from using this program by increasing their departments'
profit margins.
INSTRUCTIONS
List the program for detailed instructions. Profits is self prompting and
will request all needed information while executing.
LIMITATIONS
The TAB ( ) statement is used throughout this program starting in line
320. This program will store and execute in 4K Bytes of memory in most
systems, excluding the amount of memory required to store the basic compiler.
787
i1
1 ,:'F:'E:H:.;.::i;i;:,;;::-:;.::~;;~;;:::;i::,;.~:.;.::i;i::.;;::,;.;:i:i::i:i::i:~:i:i::i:i::i:i::i:-.::.:.:****-**'i?:**-*-'l'l:*:i:i::i;.:;i;;:;.:;::i:i::.;.;:i:i::i:i::i:i:.:i:i::i:i::<i::i:i::,;.;;.:i:~:,;.;:i::~:i:i:**:<i:;.;i:**
14F.'EM
15RE~ DESCRIPTION: THI::; BR'.::;rc PPOC:;F.'.AM COMPl.ITE"'.::; F'POFITf;:iBILIT\' OF
16PE.M nEPRPTMFNTS OF R FIRM.
1. ?f~'EM
;:~i)F.'.El1
E:C.:PEM I n'.:;TPUCT r mt:;--- TYPE "Put·1" TO t1'.:;E
i'.:'.4FTM \''F'OGPAM lH LL m:;f< F"OF' r··!UMBE:P OF DEPAF.'T-
c'.6PEVi !·IFliT'.:;, ::;ALE'.:;, BEC I !··1!"1 I t·K; I \·jl.)[tffOPY, nm I t·K;
.::~ :::F~Et·:-J 1 tillE!lTCIRY, i=1HD Pl.IPCHfY:'.:Es
·~: i:.1.~~:EJ·1
II
i ;:;:~~! PPH!T 11
FOF.'. EFICH DE:PAF.'.TMEMT EMTEF'.: II
190 PPHIT " :;::;1::1L.E:::;, HEGH·lt"Ht·iC H1UElffOP'/, EliDHiG IMt.IEt-ffOP\', F'UPCHF!SES 11
;:::.oo PPHff
.-, i .-.a
1:, .i. r-.:! FOP ti -·· t
E~ c.:~~1 PRil·ff M;
C.' :::o I MPUT ::;; f i""I) , f: ( i"-1) , E (I""!) , F' ( t·i J
c'.40 LET CU·!) -· f'i:t·-1) + T:!J·i) -·F!TD
250 LET GCNl = SCNl - C(N)
z:: i:1 fi t·iE:=·::·r 1·· 1
~~I ·7~) F'F:~ I ~·iT 11
II
~='. :::o
pp I MT II·----------··-·-·-··---·------·----·-·-·--··-·---·-·----·--·---------------·-·---··-·---· II
PPHH
C.'.9(1
JOO PF.'.IMT C$
::: 1 0 PF.'. I MT
3i:'.0 PPH!T TAB f 46); "C~:os::;" 1HB i:s::: "~-~ GF:'.O'.::::;"
3:30 PPHff TfiI:(10); "SF!LF.5" TABf22 "C..···c; ....::;;";TflE:C34); "~·;;c..··e; ..... '.::;;";
788
3~0 FOR N = l TG D
.3~::i~1 F'F?I\"·iT 11
IH::F'1" 11 ; r·-t;
380 PPINT TABC10) ;SCN);TABC22l;CCN);
:::90 PP I t·ff TAf: f :;:4 l ; Ir IT f 1 i21(100*C ( H) ..··S ( H) + • •::;) / 10!2!;
400 PRINT TABf46J;GCN);TABC58J;INTC10000~GfNl/S(Nl +.5)/100
410 LET ><
_.. "· ·+· -... I !-! )
' ...-
·-· '"i ' -+ l- ( 1·1 l
:~1.·:;:(1 LE1·· Z :::: + '-~- f II !
-1
:;~
1
=l 1:+C1 ~-E~T i:.l - i) ·: r:· . i I° ·i .,
;:l~)C1 t. u::::<1" f'·-1
1 ~- ~::~:1 f>F~ I t·iT
580 FOR N = 1 TO D
~591:1 PF-:IMT "DE:F'T"; r·i;
600 PRINT TABC10J; INTC10000•SCNJ/X + .5)/100;
610 PRINT TABC22J;INTC10000*CCN)/Y + .5)/100;
620 PRINT TABl34J; INTC10000*GCNJ + .5)/100;
630 PRINT TABC46J;INTC10000*ECN)/W + .5)/100;
640 PRINT TABC58);INT ( D9•C CBCNJ+ECN)J C2•CCN)J
?0~:::'! PF.'.Hff
~'? 1 f~i FSF.~ I t·iT I! _.. ___ ., _ _ o _ _ , . . , . _ . _ . , _ .. _•-·--'•----~--
. . - - - · - - - - - · - " - ' ' " " '. . _ _ _ _ _ _ _ _ _ _ _ ~----·~,-•--•~-- .. - · - · - · . .- - • - · - - · -
11
?\=:'.i~i Et·iI~
789
l ?.·.::::fJi~:11J;;::11J, 1 ::l,~::=i~.:1t::i('.iC1, ~~: ::1(11:.:li~=1(1, ,:::(1i;:11~.'.1C1i::l
2 ,200000
~" !
F·!~,·c1i:· IT
I1F:F·T
DEJ>T
,, ..J
a -~::1
.~~,
;;: r::;('I
790
QUBIC:
DESCRIPTION
This is the game of TIC-TAC-TOE in three dimensions. The game is played on
a 4x4x4 board. The playing board may be printed before each move, if desired.
This is a very complex game and it will be extremely difficult for you to
beat the computer, although I have seen it done where the player solves
the algorithms with a calculator before each move.
USERS
Game enthusiasts and problem solvers will find Qubic both challenging and
interesting.
INSTRUCTIONS
Type RUN and Qubic will ask you if you want instructions. Each move codes
a 3 digit number specifying the level and location of the move. All necessary
prompts and instructions will be generated by the program during execution.
LIMITATION
This game uses two dimensional arrays; see line 315, throughout. The source
code requires 7K Bytes for storage and will execute in 12K.
791
IHJ C
;:'.;::o I t··IPUT C$
c:::::o IF C$=="t"l0" THETI :;::;::O
Z:'. 40 IF C:$= II \'E::; II THEt"I ;::65
320 FOR I =
1 TO 16
33(1 F::EAD "i' ( I J
3.:~o t·iD::T I
35(iFOF.'. I= 1 TO ?'6
]60FOR J =
1 TO 4
3?'(i REAllM f I, J J
3:;::(1 MD=:T ._!
390 MD=:T I
400 FOR I =
i TO 64
410 LET X CIJ =0
420 t·iE::<T I
4:3(1 LET Z=1
44fi PF.'. Hff II DO YOU ~·~At'ff TO MOUE F ff:'.::;T II ;
450 I MPUT '.::::;:
46(1 IF :::;$="t·iO" THEN 6:30
792
•i· ?0 IF ::;$::.-::II '/E~:::;" THFJ I 500
4;:::0 PF.'Hff "HiCOPFTCT ntt::;t,~ER. PLEA:::E T\'F'F Pnr"f'c:a?EM OP F.'.EMt·!OPEM. ";
:::j. ::-1(1 C~C1TC1 4.5[1
1
~:=;00 PRHff II II
r::; i 0 PP I t·ff 11 \'OUk f'!()l)F" 11 ;
•:=; c'O I t--!F'UT.J 1
521 IF J1=1 TI~EN 2770
•::=;;:'.2 IF J1 <>O THEN 525
~:i ;:: ,:::1:;;ci~::1J:B C'5~i(I
~:; c'. 4C:iOT050Ci
~.:;;:;::5I FJi <111 THErii:'.?':'iO
526IFJ1>444THEN2750
i::;::::zi c;o::;uB E'.500
:=4c1 LETK i =I !ff ( .J 1./ 1CHJ)
550 LET J2=CJ1-Ki•i00l
560 LET K2=INTf 10)
5 T~iLET K~3= J 1. ... rU. :i:•: 100 -+:z~q 0
580 LET M=16•K1+4•K2+K3-20
"590 IF >=: U·i:! =O THEt--1 62(i
600 PRH-ff "THAT ::;@Jf=1PE IS U:::;ED, TP\' AGAIN"
6 1 0 GOTO 50(1
LET ;:-:: (t·1) =1
t:,;~t1
GOSUB i 64Ci
6:~:0
640 FOP .J=i TO :::
650 FOR I=1 TO 76
660 IF J=1 THEN 720
670 IF J=2 THEN 790
E,:::(1 IF..J=::.: T~-IE~t·i ·:;t::~:(1
690 ND::T I
7titi f-1D::T.J
7l0 GOTO 1300
720 IF LCIJ<>4 THEN 690
FOLL.rn·l~::
11
73Ci PRHff "YOU hlit-1 ff:; ;
740 FOR J=i TO 4
750 LET M=M r:I, .J)
76ti G0:3UF.: i 57'ti
793
·::i;:·o GOTO 1490
9JO IF' L.CT:t<>3 IHFJI (:;::10
940 r'F::It!T"MIC[ TF:"r' t·!FtCHiti[ MOUE'.:: TO";
950 FOR J=1 TO 4
978 IF XfMl<>8 fHEN 1010
:;1 ~::: i~1 >=: ( i•t1 ) == :=;
1
l (1~~ili SCt(t
C~C1"T"C1
l ?2i 1~z~ -.J
!"olE:::.::~r
1 0!'.::ia GOTO 1 30(i
1 :21::::c1 FOR I = 1 TO 76
1:2l4(1 LET Lt:I·1=;:.:;(i·i(T, ll ·1+':0:(M!I,E'.) :i+:<1YifJ,:;:::i l+>O:t:M(I,4l)
1050 LET L = LCil
1 2i;::,(1 IF L <c'. THE]i 113lZI
1
794
1430 FOP TCl ~?(T
795
=
!=l
((t l,J) I-·
( 1) if) C1
~ o:i
f"- (.{') !=.i
t~i ( 1
:1 if) !'..(• ....;.-
(IJ ... ...
... ".!) tj-
w ~
~;
..:;..
~ 0 m ~
0 --- NMtj- NM v v ru - E w
"::I" "" lf:i (•) •.[I "D •..I) - •.D •..J) If) ... "D OJ :z:
-000m ---~~-~~-voov-m w 1-•I
~---
ru-tj-ru -~~oo-oo~--m~ru~-
~tj-tj-tj-~mmo~~----~
z::
1-1
::c
(.)
r. f"- ( ~1 !f) 1
.,.. ... w. r. lf) ... ... •.,() lf) ... -::t (S) r··- (•) C•) I
ru---
v-0-
m0-ru-vm--oovtj-v·-
~0000mm~vm---~~
C•
1I
fE
... •..() C•) If) ... ... "" ... Li") "" ... I.!"'.• If) ... ~ •~IJ (S) ·i:t CU E ...
~--- ~~m~-o--~-rum0- w
ru~~~ ru---~mm~~~-~~~0 E
.... IJ .I 1, I !J .!
I c-. ... r. l.i I tj'-
... ... tj' IJ l I, ! l.j_t .,.....
u-. ~.r ll'o t 1-l
oo--~ MOO~Q-~~--~---·· ((1 1--
M--~ -mm~~~tj-OOOOMM--ru- 1-l
M---
U'',
ru-Qoo
~:t· (•~! -tj·· r. sr. r. r . .,:-j'
~ruG~-ru0--~-ru~-
no, r. -.:-j"" tj- r. i.i) f··- t~I ......t r,.()
m~tj-tj--tj-tj-~000--~ru
::c
~
Li...
l=I =
r. (1~1 (1~;
tj· a-, ·r,-j- r. r. "='J" -r:'j' r, ~ tJ'1 (1~1 (ij 'tj-
r, r. 11".
i::J::-
:::,;:: w
~ - - - -~~00-00~--ru-0~- l_i ( ..) E l.O
~-~~ ~rururu~MMQOOtj-0--ru0 1--1 1I en
ru---
tr. (tj (IJ
ru~~~~ru---~00w0tj-0--~v
;:::::;E.OFOPJ=1 T04
;?'."'i€:.2FOPI i =l TCU
25E4PRHff" II;
i::'. 5EiE.fiE>::1~ I 1
c'.~i7~1FOPK=1 T04
2600LET Q=16~I+4~J+K-20
2610IFX(QJ<>OTHEN2630
2S30IFXCQJ<>STHEN2650
II •
2650IFXCQl<>1THEN2660'
2655PRHff" Cl) ";
c.'.660IF >=: (Q) <>t . ·:::THEJ!c:6?0
;.=::665PF-UMT" ( II;
;::6BOPF.'. I MT
E'.6'3tiPF-'.IMT
c'.70t-iME:=<TJ
c'.71tiPRIMT
;::7'2t1PR I MT
;:: 7::.::ot-~C=<T I
C:: 7 4~3F-:ETURM
c.: 75i3PF.: I MT" I MCOPPECT MO'-JE, F:ETYPE r T--- " ;
c'. 76(iGOT05c'.(i
E:77tiEMD
797
DO YOU l-!AN'!' INSTRUCTIONS ?Y'f:.S
•
THE GAME IS Tl C-T.A.C-TO:::: UJ A li K' 4 X 4 CUBE·
EACH MOVE IS IiJDl CATEP BY A .3 DIGIT NtJMBt;:H.,, WI TH EAC~-i
DIGIT BET~EEN I A~D 4 INCLUSIVE• THE DIGITS INDICATE THE
LEVEL1 ROW1 ~ND COLUMU1 RESPEGTIVELY1 OF THE OCCUPIED
PLACE•
() () () ()
() () () ()
() () () ()
() () () ()
() () () ()
< ) ( ) c ) ( )
( ) ( ) ( ) ( )
( ) ' ) ( ) ( )
() () () ()
() () () ()
( ) < ) ( ) ( )
C) () (> C>
() () () ()
( ) ( ) ( ) ( )
( ) ( ) ( > ( )
RATES:
DESCRIPTION
This program calculates effective annual interest rates for various interests
with different compounding times.
USERS
Persons planning on spending money who may have a choice of financing plans
can use this program to determine the true or effective interest they will
be repaying, i.e. Businessmen, Housewives, Homeowners, etc.
INSTRUCTIONS
After the program has been loaded into memory type RUN and the program will
prompt for all necessary information.
LIMITATIONS
Rates uses two dimensional arrays; see line 530. Line 550 has a MAT INPUT
statement as does line 670. Line 770 contains a TAB ( ) statement and lines
490 and 1020 contain print using statements. The program will require 2K
Bytes to store the source code and 7K Bytes for execution.
799
1 to::;::D!
J ,:::OF:'EM
1 '.~;2u~~:EJt't F F1l"E~:;
1
C!F- I r-.1TEF.'.E~:;T .. .. II • :f
l t:.O?FM
170RE:M I ry:;TJ?UCT I O!t:;-·-T\'F'E , RUt~' TO !Y;:;[
l :::OF.'.EM T!·!PUT I·:=.; F'[OIJ['.~:;TED
l 9~JF'.EM
L::~'!(if?EM
;::: 10!:;'.'.EM;.;;:*-*'*''*'*-'*'**'*'*'*'*-:<i:*-:<i:'*'*-*:<i:**-*-**-:.:>:***:i:i::i:i::i:i::.:i::.:i::i:i::i:i::i:i::i:i::<i::i>::i:i::.:i::<i::.:i::<i:;i:.:~::<i::.:i::i:i::.:.::i:i::<i::.:i:*:i:i:'*':i:.~:,;.:'*::i:i:
2Z~fiF.'.EM
530 DIM RC20),NC20,20),QC20J~Z(20l
•::,40 PF'.It-iT "1·iOMit·IFIL F!Mt··IU1=1L JJ·lTFPEST F'ATD:;--·UP TO c'.0 I!IFFEF.'.Hff F.'.ATE'.::;"
~550 MAT H!F'UT P
~:; i::.~] LET 0 l =MUM ( ><)
570 FOR J=1 TO 01
:::;'.::0 IF F'. CJ) ::: • '.:'i THFl·I 60l7i
590 LET RCJJ=R(J)/100
600 ME:=<T J
610 PPIMT
E:. c::o PP rt-ff "rr=1c1-1 Hnt: ccw1POUMDEii HO!·J MF1t··I\' Tr MES PEP \'EAF.:?"
630 PPHff "FOP [flCH F'.FiT[ \'OU CF1n T'Y'P[ IM IJP TO ;::0 DIFFEF.:Hff COMF'OUHIJH·IG"
t.40 PF.:rt-ff "TH1c::; i:T\'F'E n1 A ZEPO FOP c0tff H·1uou:; coMPout·mn-ic:i"
650 FOR J=1 TO 01
660 PRHff "FOP "; 1[10*F.'. CJ) ; .
6 7~~1 MAT I r··lPUT Z
680 LET QCJJ=~JMCXJ
690 FOR K=1 TO Q(J)
700 LET NCJ,Kl=ZCK)
7 10 Ht:::ff K
.? E~ [1 t·iE:::-=:T CJ
730 FOR J=1 TO 5
7 41~1 PR It"H
750 tiD::T .J
760 PRHff "llOMHWIL. HMt·IUAL ~·~
11
;TAt:C::t.:i;
11
TIMES COMP .....ANNUM";
?7(! PR I MT TFfE: ( 51 ) ; II EFFECT I l)E F"iMMURL ~·;;II
7:::121 F·F~ I t·~T u --·--._.·---·-.. -"·-·~·-·-------- n ; TA:F.: r2E, :i ; 11
·----·-·-·--_, ________
11
;
800
~:: :;::[t L.E ~T· Ft::::t vf f .J ~ !-: : )
:::: ':;1 t~j Ci Ci T Ci t c~ 1 1~:1
900 LEl fEXPrRrJ)l-ll~1J0
·:.13(1 LET ? f _n =F' l_i) :.;.: 1;21C1
::1 1 ~· (i F:F.: I f··~T lJ~::; I f"·ii~ J 1 Cii~i, F:'. f .J J ; E
1
l ~2!50 F F~ I t·11-
1
801
[flCH Ffff[ COl·!POU! lf1LD HOi·-i !·1i=:1nY TI!"!['.:;;; F'LR YFJ'.1R-~:.
FOR [flCH l?i=tTE YOU cnr--1 T\'F'E:: HI UP TC! ,:;::o DHTF:F.Elff COt·IPCIUI iD I I IC T PIE'.::;
CTYPE IN A ZERO FOR CONTINOUS COMPOUNDING).
6. 01?10
1::1 II ~i 121 i~'.I 1:1 # i::,(~i~:;(:,
6. ':%:11a t:I II r:'.11::1e11:::
i:.. ~=:;oo t:I t.:I ~::'::~1:::1
st
1. ;? • O!~i(:I
1~=: ::;1211~:1
p C:Ot-!T. CC!MF'.
802
RETIRE:
DESCRIPTION
This program computes the rate of retirement pay for a civil service worker.
It can be modified to generate retirement schedules for other plans as
desired.
USERS
Persons desiring to plan for their retirement will find this program very
benefical. In addition to providing you with a retirement pay schedule it
can be very useful Now in planning or deciding which job to take or what
potition or level of current income to work towards. While this program has
been set up for government workers it can easily be modified to encompass
any retirement plan beigh offered by an employer.
INSTRUCTIONS
Upon execution the program will ask if you want instructions. Type 1 for
Yes or 0 for No. The program will request all necessary data as needed to
determine your retirement benefits.
LIMITATIONS
Starting in line 1020 the DEF FNX ( ) statement is used. In addition the
PRINT USING statement is used extensively through out this program. RETIRE
will require 6K Bytes of memory for program storage and will execute in most
BK Basic compilers with 7K Bytes of available memory.
803
T'r'PE 1
.1l7'!2! F'FHff " -·l,lHE:t! THF.'F.::E YEAP PEF'.IOD I:::; OBTF1IMEI1,Et-ffF:\' t·HLL"
i i:::a~i F'F' Hff " 1=:uT0t·lfiT J c~ALLY CUT OUT Ii
l 2~)0 F'F'IHT !l _ _ _ •:;UF'.l)I'.IOP At"itiUITY TO CHILDF.'Et-1: II
L:· 10 FF' It-ff " ·-TO Ci!_lf!L I FY '•'OUF' CH I LD nt!'.:;:;T: "
j ;;::20 pp I MT " --i=1. F:E. UtlDEP 1::: At·m BE unMf!PP I ED; OF'."
1 2::::121 F'P r nr " -t:. UHDEF.'. 22, UMMAl?P r ED f1t·m fl F'UL.L TI ME ::n·unEMT; OP"
1.:'.'.4!} F-'P Hff Ii -c. D L:;ABLED BEFC!P[ 1::::, H!Cf!PABLE OF '.:;ELF·-SUPPOPT. II
804
l 1~1" 7(i F F~
1
I r-.11·
1480 PP I nr "E1·rn::i:c:-·-·-·-·MOtlTH, DA\', \'FAF.', :~;i=:11...HF''i'"
1490 INPUT M1,n1,y1,s
1500 IF S < H1 GOTO 1520
l 5 10
H1 ::: ·;:;
1520 B6 = FND CM1,11,y11
1530 W = INTCCB5 - B6)
1540 Wl Wl + W =
IF ~:.ij
1~i5~:1 >= 1~=:;t:1 CtC1TC1 i~!·:.-1~1
1560 Si =Sl + (W/52) ~ S
1670 W3 = Wl -~2~365
1 E1:=:0 F = l,J;::~* 1C: -+· I r··iT ( L:i::; ....-~::l1)
1690 S4 = INTCCB3 - B4)/7)
1700 85 = CHi - HJ ~ f(S4 + 78)
PEM--·-
172[1 PEM---·
H :::-; H;:'. =" HIGH THF.:EE \'EAP Al.IFF.:t=!GE ::;flLflF.'.\'
173~] A = A2 :::: '/EAP::=; OF ::EF.:U I CE R·:; OF TOD fl\':;:; DATE
F.:EH---
174[1 FEM---A:::: = \'EAF.S OF SEPUICE TO PETIF:EMEtlT DATE
1750 F.EM---
G =
\'[F!F.'.:::; OF F!GE
176(1 F = t··IUt'l'F:EF.'. OF MOMTH'.:: UMDEP ~i5 F!T l?ETIF.'.EMEt·ff
PEM--·-
1770 S5 - ESTIMATED HIGH THREE ALJEPAGE SALAF.'.Y
F.:EM·----
1 ·7~::!€1 PEM TO F'.ET I F-£MEtff DF!TE
17=:.-tl1 F.:EM--- :;:;4 = L·IEEJ::::; DIFFEREHCE BE:Tl..~EEtl TODAY AMI! PETIF'.EMEtff
1 :::,Jt1 PF.: I t·ff
1801 IF T9 > 0 GOTO 1876
1 ::: 40 PP I t·ff u::;; I t·iG l :::~:; (i, H
1850: HIGH THREE AUERAGE SALARY IS$######.##
1 ::: 60 PF.'. Hff
1 :;:?(1 PR I MT U:; I MG 1 ::::::o, ~:;~;
1 ::::80: E~:;T I MATED HI GI-I THREE AUERAGE ~::;ALAF.'.\' fff F::ET I REMEMT $######. ##
1 B'3€1 PF.:IMT
19~3(1 GOTO 206(i
1 910 F.:EM BEG I t·i - '.:;UB!?OUT I !'1E FOP BA::; IC Flt1t IU I TY FORMULA
192~3 A1 = A - ::;
1930 B =
.015 ~ H ~ 5
1940 IF Al > 5 GOTO 1980
1950 C = .0175 ~ H Al *
1980 C = .0175 ~ H ~ 5
1990 D = .02 * H * (A-10)
805
E'.04~~1 PF:M--·- OU!F'l.IT J·:; E = A!irRIITY
?t::'i50 RE!'! EJlD --- :~~;l_!I:!:;:•oUTH1f F"OF' t:A::;rc r-=1ntll. IITY FOPMULA
1 F :::: ~}
T
l
2080~ RETIREMENT ANNUITIES REDUCED ###.## PERCENT
;:·090 PPir·F u·:;IriC .::100, F
;:: 1 t}0: FOR ### f'iOt ITH::; Ut·HJEP 55 \'ERP:::; OLD
C'.C.~lfi T1 = 1·/"iC'..
;:'.'C.'.~::~0 ·r;:: = 'T"/::~C'.
PRINT U3ING 2240,T
1:: c:s(1 F F.: I t·-11·" tJ:::; r ~--1c; ~='.C t:,(1, 1" i
1 1
806
i ?~i FF: t·iT
1
2540 A5 = .55 ~ E
f\E, = ., C:22 :Q: f-1
~:'.~ ~5 c~;0
1
2560 A = A + 60 - G
;~='.':i7(1 c;cr::1J~B 1 :.1~:::1a
1
;:: 5r3~1
1
A7 1
·- ti S::i ~ E~
807
SAVINGS:
DESCRIPTION
This program computes the amount of money an investment will accumulate
over a period of years, given the interest rate, compounding period and the
type of investment.
USERS
Anyone who invests or saves money will find this program can help in de-
termining the most advantageous place to invest your money. This would include
homeowners, businessmen and companies, as well as anyone who has a savings
account.
INSTRUCTIONS
After the program has been loaded into memory type RUN. The program will
then print out a full set of user instructions.
LIMITATIONS
This program should execute in any Basic speaking computer with 3K available
memory. Two kilo Bytes are required for program storage and Savings should
execute without incident in most 4K Basic compilers.
808
11,::10 PF.'.HH
l E1 PF.' Hff " TH I":; PPC1CPflH CFILCULF!TF·::; 1 HF f!MOUt!T OF MOt IEY THAT 11
i i:::o PP I NT "l·.lOUL.D 1=-1ccuMULFITE AFTE~P 1·1 Yt:AP:::; i=n A1-1 At·ltiUAL I NTEPc:;r"
l J(i PF.'Hff "~'.A1E P COMPOUMDED T TIME:::; PEP \'EflF.'., L·~HF:H THE H·llTIAL. 11
~=1MOUtff r:::; F' !:!ND Rt-~ AMOUMT Tl J:'::; HDDED AT THE: BEGIHNINC"
11
14i?:i PPINT
1 ~.:;o pp I MT OF [F!CH sur:·::E.OUH IT YE:AP.
ii !" IOTE THAT F' fliffl D f!PE: GI !)H1"
1 t.c1 r PF.: t··IT 11 I r·i DOLLflP'.::;, 1·-i nr·m T nu::;r BE. 11··nTCEP::::, mmP I'.::; GI UEJi"
l c-·n PP I MT "~=6 Fi Pl:PCD·ff 1=1GE. "
l::::0 PPHff
11
19\71 Pb:'.Hff ~·~Hf!T FIF.E Pdldi,T,~:";
200 INPUT L,N,y,x,A
210 IF X<>0 THEN 250
c'.c'.O PPHff
;:::::.:o F'PHff "::< nu:::;T r-10T EC!IJAL. ZEPO ••• 11
4C.'t1 PPHff
4::::1~1 PF.'.Hff "MOF.:E DFfffl ( 1=YC:;, 0=!·101 ";
440 HiPUT I
450 IF I=1 THEN 190
99·~..3 nm
809
TH T:::. F'F:'.IJ(;i<i:!t·I c· HLC!. ILHTE·::; Tl· ii:.: H!•Ji"il It iT i IF i·!l"ir!i=.\' !!·WIT !·ICIULTJ 1::1cc1 ll'llJLJ:TE 1::.1FTEV
:i Hr H! i H! !! i! 1nL T: T r.;:. COl·IF'Ci! II Hii:. u T TI FFF' \'EH!~', !·IHEli
"THE". I! ! Ir J HL. :=n·H.IU! !T I::; !-' Ht !Ti 1:!! l 1+•1c1U! IT n I·:; !:fDTIED HT THE. I i"ll I I 1· 1c C!F
E:1:::ic·:r-1 i::;i IE.f·f'T '/L'i:.::1r=:
1
u i'fi "T1--11=·1T' F f:t1·1D Tl (::n·~~ F' C;J:1.1r:Hr~ Ir·oi l)(!L.L . F:n~;.:::~, rJ 1:·:n·. ·1I1 "l'
1 1
l" lt.l'.::1·T
1
I (!l" E. !. .:1!: . F,~:::::;, 1-:ll. -1.U l·,:· J ::::, C:1 Ji. IF'!·-1
1
f:l
·;.1
: '
!·!HHT ~ i;::1 , 1 ~i" , =~l · , t:
F'FF'CElH C.:OMPCIU!"IDFD 4
\'[HF', \'I ELT1·:;;
810
SBA:
DESCRIPTION
SBA calculates a loan repayment schedule for "Small Business Administration"
loans.The printout covers the entire period of the loan utilizing a tabular
format for the various categories and provides a comprehensive yearly
summary statement.
USERS
Businessmen who are interested in obtaining SBA funds for use in their business
will find this program very informative and far less costly to use than an
accountant. As small businesses are measured in terms of dollar income per
operating unit, this means that even large companies may be able to obtain
SBA loans for thier various offices around the country.
INSTRUCTIONS
The program is self prompting but should be listed for detailed input inst-
ructions. After it is loaded into memory and listed, if desired, type RUN.
LIMITATIONS
Line 340 contains a DEF FNX ( ) statement, line 380 an ABS ( ) statement,
line 630 a Change statement, line 650 a FNEND statement and line 1180 a TAB
( ) statement. Some of these statements may not be in your Basic compiler but
if you have an 8K version of Basic these statements may easily be converted
to your compiler's statements. Statement definitions are shown in appendix
A at the end of Volume II. The source code for SBA requires 5K Bytes for
storage and will execute in 6K Bytes of memory.
811
IF'rl Uri··-· i 1 !\·\PUTE:>::; FitfD PF'Hff<::; e i"'i0tFHL.\' pr=f1'MFt!T'.:::.
j ::OF.'.Eli :::;c:HEDUL.E. FCF:' A :;HHL.L 1:u::;1nc:;::; flIWIHII::nPATIOr1 L.r:n=itL
J ·:1i~iPEM
j ~:;oPEM AT TH[ El!D CIF" E HCH CALEJl1)!iP \'rfiP nrm RT THE FHiAL F:TTIFD'!E:t-!T
16CIPEM OF TH[ LJ!flli IT F'F.'.Hff·:; A COMPPFl-H:J·!:::;J:i.![ '.;)JMMAF:'.'r' :=nt=ffEMHff
1 ?0PE.M GiilHiG THC F:FCH!NJ.llG PPINCIPFIL, EJIDH·l!:i F'PHiCIPAL, PPH-1CIPAL
1. :::0F.:EM PEPFiYMFlfT::. i·lFIDF:, Atffi T01PL H"!TCPE::;T F'RII1 DUPH!G THE \'Ef:F:.
,:·i~KiPEt·I THE" FF'1x:,PAM i=r:::sut·JE::; THAT THE r::i=::r·i~:: ::TPl.JICE FTE HILL BE
E:' l \ZiPEM PE I i'iBUF:·.·::Tn I:\' THE ::;BA.
812
560 IF P0=0 THEN G00
57J LlT PCP9+1-P4J =4~
•:::;:::o LE.T PO=O
L:?::n) co TO i=:.1u
600 l.ET PfP9+1-P4-1 - 32
6 1 ~:'I t·iD::T P4
620 PRINT TABCF~-2);
630 CHANGE P TOP$
640 PRHff F·$;
6'::i(i Fl!EMD
t:.i:.ci lifHA .Jfif-i, F'E:t:, MFIF'.; APR, MR\', ._!UH, .11.JL, f!l_U::;;, ~=;[p, OCT, t!OI.), DEC
670 FOR Z9= 1T012
t.:::o F.:EAD M$iZ9)
7'('1(1 DEF FN I (fl, R:t =I t··!T ( 1001:1: ( R/12) '*'A+. ':i) / 101:'.:1
710 pp I NT II BOF:F'.Ot·IE:F:'.' ·:; NFIME I!;
7;::'.0 I !·iPUT C::?
7':~:(1 PP I MT "OPIGil·ifIL PRit-K:IPFiL II;
7'4li HiPUT Ai
750 LET A9=A1
7 6 0 PF.'. I NT II ~:J::1=i '3HAPE II ;
770 HiPUT ~:;1
780 IF S1<1 THEN 8~0
790 LET Si = Sl/100
:::0(1 PF.'.IMT "BAt~K PATE I I ;
::: 11z1 I t·IPUT F.::;::
820 IF R3<1 THEN 840
830 LET R3=R3/100
::;:4(1 PRINT 11 ·:a::F1 PATE";
:::5(1 IMPUT F.:2
860 IF R2<1 THEN 880
870 LET R2=R2/100
:::::::(1 PF.'Hff "LOflH Dfff[D i:t··10, YP) II;
::: '?-(1 I r~~PLIT t1, \'1
1010 IMPUT Y9
1 0;:::121 LET YB = 1
1 ~::r:::~71 PP I MT" "
112140 PF.'.It·ff " :i:>::i:.~:i:i::i:i:st:A LOAM ~:;CHEDUL.[:<r::<i::ti::<i:
11
105(1 PPU-ff
11216(1 PP nff "BOF'.F.:m·~EF.'.: " ; C$
813
J 1 I f"i'T
c::k~ f~f!~~=; 1; 11
~-;;I!
1 i i10 PPI !~~[i:¢:F.~C.:; II~-;; II
1i~·na:Q:~~:::; 11
~,;;It
i 1:·::~~~i F'Fi'/r iErrr:
F 1 F.~It·-~T· nr;··icft·rr~1L.\
1
1 11
;
1190 PF.'. It-ff TF!E: I. ':d. ) ; "'.:;;E Pl) I CE" ; TAB ( ;::=;:::) ; "TC1Tf1L"
1c.·~10 PF r rff TAI: i. 1i:, :i ; "FF I 1!CI PAL" ; TAB i: 27) ; "Pf1YMElff" ; nrn (::::9 ·, ; "F:EPA\'MEHT" ;
1 ;;:'.10 PF I r·n ri=n=: 1. ::, j :i ; " FEE" ;. TfiB i: E. ::: :i ; "Pf1\'MElff"
l PF' I r·ff
i
J, LET t-i=i
l ;::'4€1 LET Fr3=A 1 -~f1;:.'.
1 ::.'5[i t_ET I 2. == FTO·l I f Fit.:'., F.~C'.)
1260 LET I3=FNifA3,R3l
1270 LET I1=I2+I3
1280 LET E1=E0-I1
1370 PRIMT
1380 PF.:Hff "PMT *1="; r·-1;
1 ::;: ·3€; F·F.: I t·iT P1$ ( t,·t) ; ' 1 , '' ; 1
Y
1
14C1(.1 PRHff
1 4 1l2i LET t·!=r·1+ l
1420 LET M=M+1
14:3~:1 LET Cl=C1+1 l
1440 LET C2=C2+P1
145~3 PRHff "TOTF!L LOflN";
1 460 LET Al :::Ff·lP IF! 1 , 1 c:;)
1 4 7f:! LET I 1==FliP ( I 1 , ;::'. 7)
1480 LET E1=FNP(E1,39J
1 4. '~~ IF A~B~:; ( f~li-··E: i --- I 1 ) < ()€i(i 1 THEt i 1~;;:~t~ t2
814
1580 LET 3~=INTfS9~A2~100+.5)/100
:! ~:,·:~o LET ·:;C:'.=FllP r , ::'i j )
j~~R LET l8=FNPlE2~J2fS2,63J
1 ~:, 10 F'F'. I HT
11:.c:O P~'.Hff 11 E:flnl< ::;HflF.'.[ 11 ;
815
'.::~"E:f··l ::::ii"· ii::iF~~ 1 F" ?,::1.i~:;
r:;1~:11··n": "?''.:;II !:::;
5 ! : :l
. . :·.. u
r::H!li< I!! ,-·:= ... !
l!ITLT'EST
i"IC!I iTHL':' F'H'r'i'lL i
F'l·IT :i:i:
i ·:)"'::1
.l,!_. ! ;I
TCITHL L..C11·!ii
'::; F:1=1 ·::;H1:.:1eE
;I .l i
F·cip l
t::E:C I flt! I I IC F.:.i~:· JI IC I F:-'HL. ::i:'!i:.'ICIU. OC1
EJf[I I HCi F'F'. I I IC: I p~:n.
F'F' I I IC I i='1::1L F'EJ·1:1':'!·IF! iT ·::i,::1-;:.
TCITf!L Ji ITEF'f: I ii >:::,'"•6. C.?
816
TIC TAC:
DESCRIPTION
This is a computer simulation of the game TIC TAC TOE. The game is played
on a standard 3 x 3 board. The computer randomly selects who will make the
first play and is your opponent. This is a very simple version of a very
old, old game and con provide hours of entertainment for both the novice
player and the expert.
USERS
This is a very good starter game for the novice computer game player and its
a nice change of pace for the expert who has been frustrated by a few of the
more complex games.
INSTRUCTIONS
Load the program into memory and type RUN. The game board will be printed
at the beginning of the first game only. It may be necessary to keep a
copy of the game board until its arrangement becomes familiar. To play you
type in the number of the square where you would like to place your X. The
computer will tell you which square it will occupy based on prior moves.
blMITATIONS
Line 1030 contains a TAB ( ) statement, 1070 MAT Read, 1080 MAT C = ZER
and 1090 MAT B = ZER. This program uses two dimensional arrays for operation;
see line 1060. The source code stores in 2 Bytes of memory and the program
will execute in 3K Bytes of memory, excluding the space required for your
Basic compiler. TIC TAC should execute in most 8K Basics with little or no
problems.
817
TJCr::::·
1 h'.{:1 PR I MT
1170 PPil"ff 11 \'C!UF' !·!01.JE"
1 1 ;:X'! I !·iPUT M
J. 1 9(i F-=-1
1,::0(1 IF M< >I r·!T 1. !·1 J THE:.J·i t 3;::.0
1,::1i;::1 IF M-: i THEJi l 360
1 E'C~i~1 IF t~1 >·?- T~·JE:t· . t 1::::E10
1230 IF BCMJ<>0 THEN 1360
Bt:MJ=F
1 ;:::50 FOP J=1 TO 4
i ;~t:1 0 F'=U ( M, ._I J
11~~~7 f.i
1280 CCPl=CCPl+F
1290 IF CCPJ THEN 1490
1. :;::0(1 IF C ( P J =3 THEt-1 14;=.?0
l 3c'.li M=N+ 1
1 ::::·;:0 IF H=9 THD·-1 1i:;10
1340 IF F=i THD! 117~?1
1 350 GOTO i :;:::;::0
818
1 ·+;::~J ·:;TOP
149(1 PF.'.Hff 11 COl'KiPATUL.FiT I Ott:;, YOU BE:AT ME II
l ':iO(i GOTO i 4:::m
1~·1 (1 i=-p r MT TH r '.:; CF1ME: r ·:; A Dr:;::n~·.! 11
11
819
\'(J! lh'. !!011[?3
I i'IOUE: TO c;i
lcijl ll lk MOIJE??
T
J. l'IOU[ Tn •j
L
\'Cll_IF:' MOUC?:'i
I !'101)[ TU i::.
'1'CIUP MOl IE?.:::
I i·!CIU[ TO 4
'c'CllJF: MOl.1[·7~:;:
THIS GAME IS A DRAW
820
RELIABLE COMPUTER SOFTWARE