B-9

Developer(s): Carl Terry
Date: 1984
Type: Program
Platform(s): TS 2068
Tags: Finance

B-9 is a comprehensive personal finance and utility suite offering nine main functions accessible from a text menu: compound interest calculation, loan amortization with payment-by-payment breakdown, early loan payoff analysis, monthly payment planning, present and future value of annuities, present value of a bond, deposit-to-goal calculation, a periodic expense/income converter (weekly/monthly/annual/semi-annual/bi-monthly), a life insurance needs estimator, a calendar generator covering 1700–1999 with leap-year handling, and an electric utility bill cost analyzer. Navigation uses an arithmetic expression in a single GO TO statement that multiplies target line numbers by Boolean INKEY$ comparisons to branch to the correct routine without IF chains. All financial results are echoed simultaneously to the screen and printer via paired PRINT/LPRINT statements, and the custom function FN K rounds values to the nearest cent using INT(100*X+.5)/100. The calendar routine computes the day-of-week offset for any month by accumulating day counts from a DIM array and applies separate century correction subroutines for years before 1800 and 1800–1899.


Program Structure

The program is organized as a hub-and-spoke menu system. Lines 20–80 form the main menu loop, with two sub-menus at lines 130 (Loan Data) and 185 (Annuity Data). Each financial module occupies a distinct line-number block:

Line RangeModule
225–420Compound Interest
525–670Loan Payments to Zero (unused direct entry; called internally)
680–960Monthly Payment / Loan Amortization
965–1180Monthly Deposit to Account
1195–1375Early Payoff
1385–1580Present Value of a Bond
1590–1755Present Value of an Annuity
1760–1910Future Value of an Annuity
1920–2090Deposit to Reach Goal
2100–2415Periodic Expense/Income Converter
2425–2705Life Insurance Estimater
2800–3170Calendar / Appointment Utility
3200–3295Utility Bill Analyzer

Menu Navigation Technique

The most distinctive idiom in the program is the computed GO TO at line 80 (and repeated at lines 160, 185, 2185, and 2800). Rather than a chain of IF/GO TO statements, each branch target is multiplied by a Boolean INKEY$ comparison (which yields 1 when true and 0 when false), and all products are summed into a single expression:

GO TO (225 AND INKEY$="1")+(130 AND INKEY$="2")+ ...

Because only one INKEY$ value can match at a time, exactly one term is non-zero, routing execution directly to the chosen module’s start line. This is a compact and efficient branching idiom that avoids repetitive IF statements.

Shared Subroutine

Lines 410–420 form a reusable input subroutine invoked with GO SUB 410 (for principal + interest) and GO SUB 420 (for interest only). It prompts for and reads principal into A and interest rate (as a decimal) into B, then RETURNs. This subroutine is called from at least six different modules, keeping data-entry code compact.

Rounding Function

Line 10 defines DEF FN K(X)= INT (100*X+.5)/100, a standard banker’s-style round-to-cent function used throughout for display. Line 2075 uses a slightly different rounding bias (INT (100*P+.8)/100) for the deposit-to-goal result, effectively rounding up to ensure the goal is met rather than missed by a cent.

Dual Screen/Printer Output

Every user-visible result is printed twice: once with PRINT (screen) and once with LPRINT (printer). This is done consistently throughout all nine modules, making the program suitable for producing paper records of financial calculations without any additional user action.

Loan Amortization Loop (lines 800–900)

The amortization schedule uses a FOR/NEXT loop variable N as the payment counter but then manually increments N inside the loop body at line 875 (LET N=N+1) and uses a separate counter K (reset and incremented at lines 815–820) to pause and clear the screen every 20 lines (line 870: IF K=N THEN GO TO 890). This is a non-standard use of FOR/NEXT where the loop variable is modified manually, which is valid but unusual. The variable A is overwritten each iteration with the new balance (LET A=F at line 880), consuming the original principal.

Calendar Algorithm (lines 2800–3165)

The calendar covers years 1700–1999, using a day-count accumulation method. Days elapsed since a base epoch are computed at line 2910 as 365*y + INT(y/4) + 2 where y = year - 1800. Separate subroutines at lines 3050 and 3065 apply offsets of +3 and +4 respectively for years in the 1800s and before 1800, correcting for century leap-year skipping. Leap year detection at line 2880 correctly implements the Gregorian rule: divisible by 4 but not 100, or divisible by 400. Month names are assigned via sequential IF statements (lines 3080–3135) rather than a string array. The calendar highlights dates 15–21 of each month in inverse video and annotates a SINCUS club meeting reminder on the appropriate Wednesday.

Periodic Expense Converter (lines 2100–2415)

This sub-program defines five FN functions (f through j) for period conversions, though not all are actually used in the displayed calculations — some routines perform inline arithmetic instead. Input amounts can be weekly, monthly, annual, semi-annual, or bi-monthly, and are converted to all three standard periods. An optional LPRINT subroutine at line 2145 prints a named record and calls CLEAR, which resets all variables — a side effect that could cause issues if the subroutine were called in a context where other variables need to be preserved.

Life Insurance Estimator (lines 2425–2705)

This module uses a lookup table of annuity multipliers (lines 2550–2580) for time periods of 5, 10, 15, 20, 25, 30, and 50 years, based on a fixed assumed interest rate implicit in the multipliers. Only these seven exact values are accepted; intermediate values cause an infinite INPUT retry at line 2545. The summary screen at lines 2645–2680 uses INVERSE 1 labels beside right-aligned numeric values, and offers copy or repeat options at line 2685.

Utility Bill Analyzer (lines 3200–3295)

The analyzer accepts either wattage or amperage as the starting point. The amperage path computes watts as P = I * E (line 3245); the wattage path computes amps as i = p/e (line 3290). Both paths converge at line 3250 (GO TO VAL "3250") for cost calculation: C = R * (P/1000) * (H * 30), giving monthly cost from rate-per-kWh, wattage, and daily hours. The use of GO TO VAL "3250" is a memory-saving technique, storing the line number as a string literal rather than a numeric constant.

Bugs and Anomalies

  • Line 635 contains a parenthesization error in the loan payment formula: LET P=A/((1-(1/1+E)^-R)/E) computes 1/1+E as (1/1)+E = 1+E rather than the intended 1/(1+E). The correct formula requires (1/(1+E)). This makes the “Loan Payments to Zero” module (lines 525–670) produce incorrect results, though this module appears unreachable from the menus — menu option 1 in the Loan sub-menu branches to line 680, not 525.
  • Lines 1565 and 1570 both PRINT the bond present value to the screen; one should be LPRINT for the printer. The LPRINT is missing for the bond result.
  • Line 1285 duplicates line 1280 (both PRINT C” without an LPRINT counterpart for one of them).
  • Line 160 branches to line 1190 for “Early Payoff” but the actual early payoff code starts at line 1195; however, line 1190 does not exist as a separate line, so this routes to line 1195 — a standard technique of targeting a non-existent line number to fall through to the next existing line.
  • The CLEAR call inside the LPRINT subroutine at line 2170 resets all numeric and string variables, which could silently corrupt state if called unexpectedly.
  • Line 2790 is referenced by GO SUB 2790 at line 2775 but does not exist in the listing; execution falls through to line 2795 (RETURN), which is the intended behavior.

Content

Appears On

Related Products

Related Articles

Related Content

Image Gallery

Source Code

    5 \{20}\{1} REM "B-9" from Carl Terry      SINCUS, 1984\{20}\{0}
   10 BORDER 0:PAPER 0:INK 7:CLS :DEF FN K(X)= INT (100*X+.5)/100
   20 CLEAR 
   25 PRINT TAB 10;"____MENU___"''
   30 PRINT " 1-COMPOUND INTEREST"''
   35 PRINT " 2-LOAN DATA SUB MENU"''
   40 PRINT " 3-MONTHLY PAYMENT TO AN ACCOUNT"''
   45 PRINT " 4-PRESENT VALUE OF A BOND"''
   50 PRINT " 5-ANNUITY DATA SUB MENU"''
   55 PRINT " 6-DEPOSIT TO REACH GOAL"''
   60 PRINT " 7-WEEK/MONTH/YEAR INC OR EXP"'
   65 PRINT '" 8-LIFE INSURANCE ESTIMATER"'
   70 PRINT '" 9-CALENDAR/ANALYZE UTILITY BILL"'
   75 IF INKEY$>"9" OR INKEY$<"1" THEN GO TO 75
   80 GO TO (225 AND INKEY$="1")+(130 AND INKEY$="2")+(680 AND INKEY$="3")+(1385 AND INKEY$="4")+(185 AND INKEY$="5")+(1920 AND INKEY$="6")+(2100 AND INKEY$="7")+(2425 AND INKEY$="8")+(2800 AND INKEY$="9")
  125 IF INKEY$>"7" OR INKEY$<"1" THEN GO TO 75
  130 CLS :\{20}\{1} REM LOAN DATA SUB MENU\{20}\{0}
  135 PRINT ;"   ___LOAN DATA SUB MENU___"
  140 PRINT ''" 1-REDUCTION OF PRINCIPAL AND      INTEREST AS PAYMENTS ARE MADE"''
  145 PRINT " 2-EARLY PAYOFF"''
  150 PRINT " 3-MAIN MENU"
  155 PAUSE 0
  160 GO TO (680 AND INKEY$="1")+(1190 AND INKEY$="2")+(20 AND INKEY$="4")
  175 IF INKEY$<"1" OR INKEY$>"3" THEN GO TO 160
  185 CLS :PRINT ;"   ___ANNUITY DATA SUB MENU___":\{20}\{1} REM ANNUNITY  SUB MENU\{20}\{0}
  190 PRINT '''" 1-PRESENT VALUE OF AN ANNUITY"''
  195 PRINT " 2-FUTURE VALUE OF AN ANNUITY"''
  200 PRINT " 3-MAIN MENU"
  205 IF INKEY$<"1" OR INKEY$>"3" THEN GO TO 205
  210 GO TO (1590 AND INKEY$="1")+(1760 AND INKEY$="2")+(20 AND INKEY$="3")
  225 BORDER 0
  230 PAPER 0
  235 INK 7
  240 CLS :REM \{20}\{1}COMPOUND INTEREST\{20}\{0}
  245 PRINT TAB 7;"COMPOUND INTEREST"''
  250 LPRINT TAB 7;"COMPOUND INTEREST"''
  255 GO SUB 410
  295 PRINT B*100;"%"''
  300 LPRINT B*100;"%"''
  305 PRINT "COMPOUND PERIOD-1-YEARLY -2-MONTHLEY -3-QUARTERLY -4-DAILY"
  310 LPRINT "COMPOUND PERIOD-1-YEARLY -2-MONTHLEY -3-QUARTERLY -4-DAILY"
  315 INPUT C
  320 PRINT C'
  325 LPRINT C'
  330 IF C=1 THEN LET D=B
  335 IF C=2 THEN LET D=B/12
  340 IF C=3 THEN LET D=B/4
  345 IF C=4 THEN LET D=B/360
  350 PRINT "LENGTH OF TIME IN ABOVE UNITS ?"
  355 LPRINT "LENGTH OF TIME IN ABOVE UNITS ?"
  360 INPUT F
  365 PRINT F''
  370 LPRINT F''
  375 LET G=A*(1+D)^F
  380 LET H=G-A
  385 PRINT "NEW BALANCE","INTEREST EARNED"'
  390 LPRINT "NEW BALANCE","INTEREST EARNED"'
  395 PRINT FLASH 1;"$"; FN K(G),"$"; FN K(H)
  400 LPRINT "$"; FN K(G),"$"; FN K(H)
  405 INPUT "PRESS ENTER FOR MENU";Z$:GO TO 20
  410 PRINT "ENTER PRINCIPAL?":LPRINT "ENTER PRINCIPAL?"
  415 INPUT a:PRINT "$";A'':LPRINT "$";A''
  420 PRINT "ENTER INTEREST(in decimal form)":LPRINT "ENTER INTEREST(decimal form)":INPUT B:RETURN 
  525 CLS :\{20}\{1} REM LOAN PAYMENTS\{20}\{0}
  530 PRINT TAB 3;"LOAN PAYMENTS"
  535 LPRINT TAB 3;"LOAN PAYMENTS"
  540 PRINT TAB 6;"TO ZERO"''
  545 LPRINT TAB 6;"TO ZERO"''
  550 PRINT "PRINCIPAL?"'
  555 LPRINT "PRINCIPAL?"'
  560 INPUT A
  565 PRINT "$";A''
  570 LPRINT "$";A''
  575 GO SUB 420
  590 PRINT B*100;"%"''
  595 LPRINT B*100;"%"''
  600 PRINT "NUMBER OF YEARS?"'
  605 LPRINT "NUMBER OF YEARS?"'
  610 INPUT T
  615 PRINT T''
  620 LPRINT T''
  625 LET E=B/12
  630 LET R=T*12
  635 LET P=A/((1-(1/1+E)^-R)/E)
  640 LET P= FN K(P)
  645 PRINT "MONTHLY PAYMENT"'
  650 LPRINT "MONTHLY PAYMENT"'
  655 PRINT FLASH 1;"$";P
  660 LPRINT ;"$";P
  665 FLASH 0
  670 GO TO 405
  680 CLS 
  685 PRINT TAB 10;"MONTHLY PAYMENT"'''
  690 LPRINT TAB 10;"MONTHLY PAYMENT"'''
  695 GO SUB 410
  735 PRINT B*100;"%"''
  740 LPRINT B*100;"%"''
  745 PRINT "MONTHLY PAYMENT?"'
  750 LPRINT "MONTHLY PAYMENT?"'
  755 INPUT C
  760 PRINT "$";C'''
  765 LPRINT "$";C'''
  770 PRINT "Do you want to print the resultswith no stopping? If so \{20}\{1}ENTER\{20}\{0}   ""GO"", otherwise just press \{20}\{1}ENTER\{20}\{0}"
  775 LET go=0
  780 POKE 23658,8
  785 INPUT """GO"" or just \{20}\{1}ENTER\{20}\{0} ";z$
  790 IF z$="GO" OR z$="go" THEN LET go=1
  795 PAUSE go
  800 CLS 
  805 LET X=A
  810 FOR N=0 TO 1
  815 LET K=0
  820 LET K=K+20
  825 LET D=B/12
  830 LET E=D*A
  835 LET L=E+A
  840 LET F=L-C
  845 IF N=0 THEN LET E=0
  850 IF N=0 THEN LET F=A
  855 PRINT N; TAB 5;"$"; FN K(F); TAB 17;N; TAB 22;"$"; FN K(E)
  860 LPRINT N; TAB 5;"$"; FN K(F); TAB 17;N; TAB 22;"$"; FN K(E)
  865 IF F <=1 THEN GO TO 905
  870 IF K=N THEN GO TO 890
  875 LET N=N+1
  880 LET A=F
  885 GO TO 830
  890 PAUSE go
  895 CLS 
  900 GO TO 820
  905 LET M=C*N
  910 LET P=M-X
  915 PAUSE go
  920 CLS 
  925 PRINT N;" PAYMENTS WERE MADE"''''''
  930 LPRINT N;" PAYMENTS WERE MADE"''''''
  935 PRINT "TOTAL AMOUNT PAID WAS--\{18}\{1}$"; FN K(M)\{18}\{0};
  940 LPRINT "TOTAL AMOUNT PAID WAS--$"; FN K(M);
  945 PRINT " OF THIS---\{18}\{1} $"; FN K(P);"\{18}\{0} WAS INTEREST"
  950 LPRINT " OF THIS--- $"; FN K(P);" WAS INTEREST"
  955 INPUT "PRESS ENTER FOR MENU";Z$
  960 GO TO 130
  965 CLS :REM \{20}\{1}MONTHLY DEPOSIT\{20}\{0}
  970 PRINT TAB 7;"MONTHLY DEPOSIT"''
  975 LPRINT TAB 7;"MONTHLY DEPOSIT"''
  980 PRINT "MONTHLY DEPOSIT"'
  985 LPRINT "MONTHLY DEPOSIT"'
  990 INPUT A 
  995 PRINT "$";A'
 1000 LPRINT "$";A'
 1005 GO SUB 420
 1020 PRINT B'
 1025 LPRINT B'
 1030 PRINT "PRESENT BALANCE"'
 1035 LPRINT "PRESENT BALANCE"'
 1040 INPUT C'
 1045 PRINT "$";C'
 1050 LPRINT "$";C'
 1055 PRINT "NUMBER OF YEARS"'
 1060 LPRINT "NUMBER OF YEARS"'
 1065 INPUT T
 1070 PRINT T
 1075 LPRINT T
 1080 CLS 
 1085 FOR N=0 TO 1
 1090 LET K=0
 1095 LET K=K+20
 1100 LET D=A+C
 1105 LET E=B/12
 1110 IF N=0 THEN LET E=0
 1115 LET F=D*E
 1120 LET G=F+D-(E*A)
 1125 PRINT N; TAB 5;"$"; FN K(G)
 1130 LPRINT N; TAB 5;"$"; FN K(G)
 1135 LET L=K
 1140 LET R=T*12
 1145 IF N=R-1 THEN GO TO 1180
 1150 IF L=N THEN GO TO 1175
 1155 LET N=N+1
 1160 LET C=G
 1165 GO TO 1100
 1170 CLS 
 1175 GO TO 1095
 1180 GO TO 405
 1195 CLS 
 1200 PRINT ''
 1205 LPRINT ''
 1210 PRINT TAB 10;"EARLY PAYOFF"''
 1215 LPRINT TAB 10;"EARLY PAYOFF"''
 1220 PRINT "MONTHLY PAYMENT"
 1225 INPUT A
 1230 PRINT "$";:PRINT A''
 1235 LPRINT "$";:PRINT A''
 1240 GO SUB 420
 1255 PRINT B''
 1260 LPRINT B''
 1265 PRINT "NUMBER OF PAYMENTS MADE"
 1270 LPRINT "NUMBER OF PAYMENTS MADE"
 1275 INPUT C
 1280 PRINT C''
 1285 PRINT C''
 1290 PRINT "TOTAL NUMBER OF PAYMENTS"'
 1295 LPRINT "TOTAL NUMBER OF PAYMENTS"''
 1300 INPUT D
 1305 PRINT D''
 1310 LPRINT D''
 1315 LET I=B/12
 1320 LET K=C-D
 1325 LET X=A*((1-(1+I)^K)/I)
 1330 LET F=(D-C)*A
 1335 LET G=F-X
 1340 PRINT "EARLY PAYOFF",
 1345 LPRINT "EARLY PAYOFF",
 1350 PRINT "$"; FN K(X)''
 1355 LPRINT "$"; FN K(X)''
 1360 FLASH 1:PRINT "MONEY SAVED","$"; FN K(G)
 1365 LPRINT "MONEY SAVED","$"; FN K(G)
 1370 FLASH 0
 1375 GO TO 955
 1385 CLS :REM \{20}\{1}PRESENT BOND VAL\{20}\{0}
 1390 PRINT '
 1395 LPRINT '
 1400 PRINT TAB 8;"PRESENT VALUE OF"
 1405 LPRINT TAB 8;"PRESENT VALUE OF"
 1410 PRINT TAB 13;"A BOND"''
 1415 LPRINT TAB 13;"A BOND"''
 1420 PRINT " BOND FACE VALUE"
 1425 LPRINT " BOND FACE VALUE"
 1430 INPUT D
 1435 PRINT "$";D''
 1440 LPRINT "$";D''
 1445 PRINT "SEMI-ANNUAL RECIEPT"
 1450 LPRINT "SEMI-ANNUAL RECIEPT"
 1455 INPUT A
 1460 PRINT TAB 16;"$";A''
 1465 LPRINT TAB 16;"$";A''
 1470 GO SUB 420
 1485 PRINT B*100;"%"''
 1490 LPRINT B*100;"%"''
 1495 PRINT "NUNBER OF YEARS TO MATURITY"
 1500 LPRINT "NUNBER OF YEARS TO MATURITY"
 1505 INPUT T
 1510 PRINT TAB 16;T''
 1515 LPRINT TAB 16;T''
 1520 LET N=T*2
 1525 LET C=B/2
 1530 LET R=A*(1-(1/(1+C))^N)/C
 1535 LET Q=D/(1+C)^N
 1540 LET P=R+Q
 1545 PRINT TAB 7;"PRESENT VALUE OF "
 1550 LPRINT TAB 7;"PRESENT VALUE OF "
 1555 PRINT TAB 10;"THE BOND IS"'
 1560 LPRINT TAB 10;"THE BOND IS"'
 1565 PRINT TAB 11; FLASH 1;"$"; FN K(P)
 1570 PRINT TAB 11; FLASH 1;"$"; FN K(P)
 1575 FLASH 0
 1580 GO TO 405
 1590 CLS :REM \{20}\{1}PRESENT ANNUITY \{20}\{0}
 1595 PRINT ''
 1600 LPRINT ''
 1605 PRINT TAB 8;"PRESENT VALUE OF"
 1610 LPRINT TAB 8;"PRESENT VALUE OF"
 1615 PRINT TAB 10;"AN ANNUITY"''
 1620 LPRINT TAB 10;"AN ANNUITY"''
 1625 PRINT " MONTHLY RECEIPT?"
 1630 LPRINT " MONTHLY RECEIPT?"
 1635 INPUT A
 1640 PRINT " $";A''
 1645 LPRINT " $";A''
 1650 GO SUB 420
 1665 PRINT TAB 1;B*100;"%"''
 1670 LPRINT TAB 1;B*100;"%"''
 1675 PRINT " NUMBER OF YEARS?"
 1680 LPRINT " NUMBER OF YEARS?"
 1685 INPUT T
 1690 PRINT TAB 1;T''
 1695 LPRINT TAB 1;T''
 1700 LET N=T*12
 1705 LET C=B/12
 1710 LET P=A*(1-(1/(1+C))^N)/C
 1715 PRINT TAB 8;"PRESENT VALUE OF"
 1720 LPRINT TAB 8;"PRESENT VALUE OF"
 1725 PRINT TAB 9;"THE ANNUITY IS:"
 1730 LPRINT TAB 9;"THE ANNUITY IS:"
 1735 PRINT TAB 10; FLASH 1;"$"; FN K(P)
 1740 LPRINT TAB 10;"$"; FN K(P)
 1745 FLASH 0
 1750 INPUT "PRESS ENTER FOR MENU";Z$
 1755 GO TO 185
 1760 CLS :REM \{20}\{1}FUTURE ANNUITY VA\{20}\{0}
 1765 PRINT ''
 1770 LPRINT ''
 1775 PRINT TAB 8;"FUTURE VALUE OF"
 1780 LPRINT TAB 8;"FUTURE VALUE OF"
 1785 PRINT TAB 10;"AN ANNUITY"''
 1790 LPRINT TAB 10;"AN ANNUITY"''
 1795 PRINT " MONTHLY DEPOSIT?"
 1800 LPRINT " MONTHLY DEPOSIT?"
 1805 INPUT A
 1810 PRINT " $";A''
 1815 LPRINT " $";A''
 1820 GO SUB 420
 1835 PRINT TAB 1;B*100;"%"''
 1840 LPRINT TAB 1;B*100;"%"''
 1845 PRINT " NUMBER OF YEARS?"
 1850 LPRINT " NUMBER OF YEARS?"
 1855 INPUT T
 1860 PRINT TAB 1;T''
 1865 LPRINT TAB 1;T''
 1870 LET N=T*12
 1875 LET C=B/12
 1880 LET V=A*((1+C)^N-1)/C
 1885 PRINT TAB 8;"FUTURE VALUE IS"''
 1890 LPRINT TAB 8;"FUTURE VALUE IS"''
 1895 PRINT TAB 9; FLASH 1;"$"; FN K(V)
 1900 PRINT TAB 9;"$"; FN K(V)
 1905 FLASH 0
 1910 GO TO 1750
 1920 CLS :REM \{20}\{1}REACH A GOAL PAY\{20}\{0}
 1925 PRINT ''
 1930 LPRINT ''
 1935 PRINT TAB 7;"PAYMENT TO REACH"
 1940 LPRINT TAB 7;"PAYMENT TO REACH"
 1945 PRINT TAB 14;"GOAL"''
 1950 LPRINT TAB 14;"GOAL"''
 1955 PRINT " AMOUNT WANTED?"
 1960 LPRINT " AMOUNT WANTED?"
 1965 PRINT 
 1970 LPRINT 
 1975 INPUT A
 1980 PRINT TAB 1;"$";A''
 1985 LPRINT TAB 1;"$";A''
 1990 GO SUB 420
 2015 PRINT TAB 1;B*100;"%"''
 2020 LPRINT TAB 1;B*100;"%"''
 2025 PRINT " NUMBER OF YEARS?"
 2030 LPRINT " NUMBER OF YEARS?"
 2035 INPUT T
 2040 PRINT TAB 1;T''
 2045 LPRINT TAB 1;T''
 2050 LET R=T*12
 2055 LET D=B/12
 2060 LET P=A/(((1+D)^R-1)/D)
 2065 PRINT TAB 9;"MONTHLY DEPOSIT"
 2070 LPRINT TAB 9;"MONTHLY DEPOSIT"
 2075 PRINT TAB 12; FLASH 1;"$"; INT (100*P+.8)/100
 2080 LPRINT TAB 12;"$"; INT (100*P+.8)/100
 2085 FLASH 0
 2090 GO TO 405
 2100 \{20}\{1} REM "figures"06.22.86 P Hill, SINCUS\{20}\{0}
 2105 CLS :POKE 23658,0
 2110 DEF FN f(n)=n*12
 2115 DEF FN g(n)=n/12
 2120 DEF FN h(n)= INT ((n*12/52)*100+.05)/100
 2125 DEF FN i(n)= INT ((n*52/12)*100+.5)/100
 2130 DEF FN j(n)=n*52
 2140 GO TO 2175
 2145 INPUT "enter name";n$:PRINT n$
 2150 INPUT "PRINTOUT? y/n ";q$:IF q$ <>"y" THEN RETURN 
 2155 LPRINT n$'"weekly amt\{20}\{1}\{20}\{0}","$";w$
 2160 LPRINT "monthly amt","$";m$
 2165 LPRINT "annual amt","$";a$
 2170 LPRINT :CLEAR 
 2175 CLS :PRINT "Expenses/income periodic tally"''"   ___BUDGET BILLS/INCOME___"''"1-Week"''"2-Month"''"3-Year"''"4-6 Months"''"5-Bi-Monthly"''"6-RETURN TO MAIN MENU"
 2180 LET a$= INKEY$:IF INKEY$<"1" OR INKEY$>"6" THEN GO TO 2180
 2185 GO TO (2215 AND a$="1")+(2245 AND a$="2")+(2275 AND a$="3")+(2315 AND a$="4")+(2365 AND a$="5")+(2415 AND a$="6")
 2215 CLS :INPUT "weekly bill amount $";n
 2220 PRINT "Weekly Amt\{20}\{1}<\{20}\{0}","$";n:LET w$= STR$ n
 2225 PRINT "Monthly Amt","$";:PRINT (FN i(n)):LET m$= STR$ (FN i(n))
 2230 PRINT "Annual Amt","$";:PRINT FN j(n):LET a$= STR$ FN j(n)
 2235 PAUSE 0:INPUT "name? JUST y >ENTER< TO SKIP";n$:IF n$="y" THEN GO SUB 2145
 2240 GO TO 2175
 2245 CLS :INPUT "Monthly bill AMOUNT $";n
 2250 PRINT "Weekly Amt","$";:PRINT FN h(n):LET w$= STR$ FN h(n)
 2255 PRINT "Monthly Amt\{20}\{1}<\{20}\{1}\{20}\{0}","$";n:LET m$= STR$ n
 2260 PRINT "Annual Amt","$";:PRINT (N*12):LET a$= STR$ (N*12)
 2265 PAUSE 0:INPUT "name? JUST y >ENTER< TO SKIP";n$:IF n$="y" THEN GO SUB 2145
 2270 GO TO 2175
 2275 CLS :INPUT "Annual bill AMOUNT $";n
 2280 PRINT "Weekly Amt","$"; INT (n/52*100+.05)/100
 2285 LET w$= STR$ (INT (n/52*100+.05)/100)
 2290 PRINT "Monthly Amt","$"; INT (n/12*100+.05)/100
 2295 LET m$= STR$ (INT (n/12*100+.05)/100)
 2300 PRINT "Annual Amt\{20}\{1}<\{20}\{0}","$";n:LET a$= STR$ n
 2305 PAUSE 0:INPUT "name? JUST y >ENTER< TO SKIP";n$:IF n$="y" THEN GO SUB 2145
 2310 GO TO 2175
 2315 CLS :INPUT "Semi-annual bill AMOUNT $";n
 2320 PRINT "Weekly Amt","$"; INT ((n*2)/52*100+.05)/100
 2325 LET w$= STR$ (INT ((n*2)/52*100+.05)/100)
 2330 PRINT "Monthly Amt","$"; INT ((n/6)*100+.05)/100
 2335 LET m$= STR$ (INT ((n/6)*100+.05)/100)
 2340 PRINT "Annual Amt","$"; INT ((n*2)*100+.05)/100
 2345 LET a$= STR$ (INT ((n*2)*100+.05)/100)
 2350 PRINT "6 Mos. Amt\{20}\{1}<\{20}\{0}","$";n
 2355 PAUSE 0:INPUT "name? JUST y >ENTER< TO SKIP";n$:IF n$="y" THEN GO SUB 2145
 2360 GO TO 2175
 2365 CLS :INPUT "Bi-monthly bill AMOUNT $";n
 2370 PRINT "Weekly Amt","$"; INT ((n*6)/52*100+.05)/100
 2375 LET w$= STR$ (INT ((n*6)/52*100+.05)/100)
 2380 PRINT "Monthly Amt","$"; INT ((n*6/12)*100+.05)/100
 2385 LET m$= STR$ (INT ((n*6/12)*100+.05)/100)
 2390 PRINT "Annual Amt","$"; INT ((n*6)*100+.05)/100
 2395 LET a$= STR$ (INT ((n*6)*100+.05)/100)
 2400 PRINT "Bi-monthly Amt\{20}\{1}<\{20}\{0}","$";n
 2405 PAUSE 0:INPUT "name? JUST y >ENTER< TO SKIP";n$:IF n$="y" THEN GO SUB 2145
 2410 GO TO 2175
 2415 GO TO 20
 2425 \{20}\{1} REM Life Insurance Estimat-er from PARADE MAGAZINE, April  24, 1983, by Andrew Tobias\{20}\{0}
 2435 CLS :PRINT AT 10,3; INVERSE 1;\{20}\{1}"RETURN to MAIN MENU key R.\{20}\{0}";' TAB 5;"ANY key for INSURANCE"' TAB 9;"Estimater";''"   by John Colonna, SINCUS\*"; INVERSE 0:PAUSE 0:LET z$= INKEY$:IF z$="r" OR z$="R" THEN CLS :GO TO 20
 2440 GO SUB 2710
 2445 PRINT :PRINT :PRINT :PRINT "    LIFE INSURANCE ESTIMATER"
 2450 PRINT :PRINT :PRINT 
 2455 PRINT "     \{20}\{1}\{20}\{0}Simply stated the amount oflife insurance you need is equalto the amount needed to replace you financially. By using this  program you can estimate  what  your  family  would  need.  The first step is to determine 75%  of your take-home pay."
 2460 INPUT "Enter 75% of your annual take-  home pay. ";p
 2465 PRINT :PRINT 
 2470 PRINT "   75% of annual"
 2475 PRINT "   take-home pay   =   $";p
 2480 GO SUB 2785
 2485 PRINT :PRINT :PRINT :PRINT :PRINT 
 2490 PRINT "     The next important questionis to find out the Social Secur-ity benefits your family could  expect to receive. The current  range is between $5000 to $16000(tax-free) a year. Contact your local Security Security office."
 2495 INPUT "Enter Social Security yearly    benefits. ";b
 2500 PRINT :PRINT :PRINT :PRINT :PRINT "    S. S. benefits  =  $";b
 2505 GO SUB 2785
 2510 PRINT :PRINT 
 2515 PRINT "     The difference between yourannual income needed (";p;") andyour Social Security benefits   (";b;") is $";p-b;"."
 2520 PRINT "     This annual insurance gap  you'll want life insurance to   make up, but you must decide forhow many years. This depends on the  ages  of  your  spouse and children. Choose a time  period from the table."
 2525 PRINT :PRINT "         NUMBER OF YEARS"
 2530 PRINT 
 2535 PRINT "5   10   15   20   25   30   50"
 2540 INPUT "Enter time period from above. ";t
 2545 IF t<5 OR t>50 THEN GO TO 2540
 2550 IF t=5 THEN LET a=4.7
 2555 IF t=10 THEN LET a=8.7
 2560 IF t=15 THEN LET a=12
 2565 IF t=20 THEN LET a=15
 2570 IF t=25 THEN LET a=18
 2575 IF t=30 THEN LET a=20
 2580 IF t=50 THEN LET a=26
 2585 PRINT :PRINT "     The amount of money needed for the next ";t;" years is $";a*(p-b);"."
 2590 GO SUB 2785
 2595 PRINT :PRINT :PRINT :PRINT :PRINT 
 2600 PRINT "     Now you must add a lump sumas  a  cushion  for  funeral ex-penses, debts,  etc.,  at least half a year's salary."
 2605 INPUT "Enter lump sum. ";l
 2610 PRINT :PRINT :PRINT :PRINT :PRINT :PRINT "     Lump sum   =    $";l
 2615 GO SUB 2785
 2620 PRINT :PRINT :PRINT :PRINT 
 2625 PRINT "     Now you must subtract what-ever group life insurance you   may have at work and also your  assets such as savings accounts,stocks,  retirement  accounts,  etc."
 2630 INPUT "Enter your assets. ";gl
 2635 PRINT :PRINT :PRINT :PRINT :PRINT "    Total assets   =   $";gl\{20}\{1}\{20}\{0}
 2640 GO SUB 2785
 2645 PRINT :PRINT :PRINT "SUMMARY OF LIFE INSURANCE NEEDS"
 2650 PRINT :PRINT :PRINT INVERSE 1;"Annual Income Needed"; INVERSE 0; TAB 23;p
 2655 PRINT :PRINT INVERSE 1;"Annual S. S. Benefits"; INVERSE 0; TAB 24;b
 2660 PRINT :PRINT INVERSE 1;"No. of Years Needed"; INVERSE 0; TAB 26;t
 2665 PRINT :PRINT INVERSE 1;"Amt. of Money Needed"; INVERSE 0; TAB 23;a*(p-b)
 2670 PRINT :PRINT INVERSE 1;"Lump Sum Expenses"; INVERSE 0; TAB 23;l
 2675 PRINT :PRINT INVERSE 1;"Assets"; INVERSE 0; TAB 23;gl
 2680 PRINT :PRINT :PRINT " Your life insurance needs are-  "' TAB 13;"$"; INVERSE 1;(((a*(p-b))+l)-gl)
 2685 INPUT "COPY or AGAIN (C/A)? ";n$
 2690 IF n$="C" OR n$="c" THEN COPY 
 2695 IF n$="A" OR n$="a" THEN RUN 2425
 2700 GO TO 2685
 2705 STOP 
 2710 BORDER 6:CLS 
 2715 PRINT :PRINT :PRINT :PRINT 
 2720 PRINT TAB 12;"\::\::\::\::\::\::\::\::\::"
 2725 PRINT TAB 12; INVERSE 1;" L I F E "
 2730 PRINT TAB 12;"\::\::\::\::\::\::\::\::\::"
 2735 PRINT :PRINT 
 2740 PRINT TAB 7;"\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::"
 2745 PRINT TAB 7; INVERSE 1;" I N S U R A N C E "
 2750 PRINT TAB 7;"\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::"
 2755 PRINT :PRINT 
 2760 PRINT TAB 7;"\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::"
 2765 PRINT TAB 7; INVERSE 1;" E S T I M A T E R "
 2770 PRINT TAB 7;"\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::"
 2775 GO SUB 2790
 2780 RETURN 
 2785 PRINT #1;"   \{18}\{1}Press any key to continue.\{18}\{0}":PAUSE NOT PI:CLS 
 2795 RETURN 
 2800 POKE 23658,8:\{20}\{1}\{20}\{0} CLS :PRINT AT 8,0; INVERSE 1;\{20}\{1}"RETURN to MAIN MENU key R.\{20}\{0}";\{20}\{0} TAB 1; INVERSE 1;''"\{20}\{1}C key for CALENDAR\{20}\{0}"';"by LESLIE H. WEBER,TSS NEWSNOTES";'' INVERSE 1;"\{20}\{1}U KEY FOR UTILITY BILL ANALYZER\{20}\{0}"'"FROM 1/85 TSS NEWSNOTES"; INVERSE 0:PAUSE 0:LET z$= INKEY$:GO TO (20 AND Z$="R")+(2805 AND Z$="C")+(3200 AND Z$="U")
 2805 CLEAR :CLS :PRINT TAB 6;"Any Calendar Month"
 2810 PRINT TAB 6;"From 1700 to 1999"
 2815 PRINT :PRINT :REM \{20}\{1}FROM LESLIE H. WEBER,CANYON COUNTRY,CA 91351 FROM PG#6 TSS NEWSNOTES 1/85 COPIED BY JOHN COLONNA\{20}\{0}
 2820 LET col=4:LET M$=""
 2825 DIM m(12)
 2830 LET m(1)=31:LET m(3)=31:LET m(5)=31:LET m(7)=31:LET m(8)=31:LET m(10)=31:LET m(12)=31
 2835 LET m(2)=28
 2840 LET m(4)=30:LET m(6)=30:LET m(9)=30:LET m(11)=30
 2845 PRINT "Number of month?"
 2850 INPUT n
 2855 PRINT AT 4,24;n
 2860 PRINT "Year ?"
 2865 INPUT y:LET year=y
 2870 PRINT AT 5,22;y
 2875 LET l=0
 2880 IF y/4= INT (y/4) AND NOT y/100= INT (y/100) OR y/400= INT (y/400) THEN LET l=1
 2885 LET dm=m(n)
 2890 IF n=2 AND l THEN LET dm=29
 2895 IF y<1900 AND y>1800 THEN GO SUB 3050
 2900 IF y<1800 THEN GO SUB 3065
 2905 LET y=y-1800
 2910 LET d=365*y+ INT (y/4)+2
 2915 FOR i=1 TO n-1
 2920 LET d=d+m(i)
 2925 NEXT i
 2930 IF n<3 AND l THEN LET d=d-1
 2935 LET DATE=0
 2940 LET w=d-7* INT (d/7)
 2945 LET cur=1
 2950 PRINT :PRINT 
 2955 GO SUB 3080
 2960 PRINT TAB 2;"SUN MON TUE WED THU FRI SAT"
 2965 FOR i=0 TO 5
 2970 FOR j=3 TO 9
 2975 IF cur>14 AND cur<22 AND j=6 THEN LET DATE=CUR:PRINT INVERSE 1; TAB col*w+1;"S";cur;:GO TO 2985
 2980 PRINT ; TAB col*w+2;cur;
 2985 IF cur=dm THEN GO TO 3025
 2990 LET cur=cur+1
 2995 IF w=6 THEN GO TO 3010
 3000 LET w=w+1
 3005 NEXT j
 3010 LET w=0
 3015 PRINT 
 3020 NEXT i
 3025 PRINT ''"DONT FORGET SINCUS MEETING at"'"7pm, WEDNESDAY, ";M$;", ";DATE:COPY 
 3030 POKE 23658,8:PAUSE 0:CLS :PRINT "###-- LIST APPOINTMENTS FOR"'M$;"? --###":INPUT Z$:IF Z$="Y" THEN GO SUB 3145
 3035 CLS :PRINT AT 18,0;"***** TO SEE ANOTHER MONTH *****PRESS ENTER"
 3040 INPUT a$
 3045 GO TO 2800
 3050 LET y=y-1800
 3055 LET d=365*y+ INT (y/4)+3
 3060 RETURN 
 3065 LET y=y-1800
 3070 LET d=365*y+ INT (y/4)+4
 3075 RETURN 
 3080 IF n=1 THEN LET m$="January":PRINT AT 9,4;m$,year
 3085 IF n=2 THEN LET m$="February":PRINT AT 9,4;m$,year
 3090 IF n=3 THEN LET m$="March":PRINT AT 9,4;m$,year
 3095 IF n=4 THEN LET m$="April":PRINT AT 9,4;m$,year
 3100 IF n=5 THEN LET m$="May":PRINT AT 9,4;m$,year
 3105 IF n=6 THEN LET m$="June":PRINT AT 9,4;m$,year
 3110 IF n=7 THEN LET m$="July":PRINT AT 9,4;m$,year
 3115 IF n=8 THEN LET m$="August":PRINT AT 9,4;m$,year
 3120 IF n=9 THEN LET m$="September":PRINT AT 9,4;m$,year
 3125 IF n=10 THEN LET m$="October":PRINT AT 9,4;m$,year
 3130 IF n=11 THEN LET m$="November":PRINT AT 9,4;m$,year
 3135 IF n=12 THEN LET m$="December":PRINT AT 9,4;m$,year
 3140 RETURN 
 3145 CLS :PRINT '"ENTER DATE OF APPOINTMENT'S"'"FOR ";m$:INPUT N$
 3150 CLS : PRINT '"ENTER DATA FOR ";N$;" ";m$:INPUT P$
 3155 LPRINT 'N$;" - ";P$
 3160 PRINT '"MORE DATA?":INPUT Z$:IF Z$="Y" THEN GO TO 3145:RETURN 
 3165 RETURN 
 3170 STOP 
 3200 \{20}\{1} REM UTILITY BILL ANALIZER\{20}\{0}
 3210 CLS :PRINT "Do You KNOW the WATTAGE OR"'"AMPERAGE? (INPUT W OR A)  ";:INPUT B$:PRINT B$
 3215 IF B$ <>"A" AND B$ <>"W" THEN GO TO VAL "3210"
 3220 IF B$="W" THEN GO TO VAL "3270"
 3225 PRINT "ENTER name of EQUIPMENT";:INPUT N$:PRINT "-";N$
 3230 PRINT "How many hours OPERATION per dayfor the ";N$;" ?";:INPUT H:PRINT " -";H;" HOURS"
 3235 PRINT "How many AMPS REQUIRED for the"'N$;:INPUT I:PRINT " -";I;"AMPS"
 3240 PRINT "VOLTAGE Rating? 115,120,220,240 ";:INPUT E:PRINT " -";E;" VOLTS"
 3245 LET P=I*E:PRINT "WATTS Required ",P'"Now ENTER rate per KW hour from Electric bill (.O5 FOR 5 CENTS)";
 3250 INPUT r:PRINT " ";r:LET C=(R*(P/1000))*(H*30):PRINT "COST TO RUN ";N$;" PER"'"MONTH $";C
 3255 PRINT AT 19,5; FLASH 1;"COPY ?"; FLASH 0;" Y/N":INPUT z$:IF z$="Y" THEN COPY 
 3260 PRINT AT 19,5;"ANY MORE ? Y/N":INPUT Z$:IF Z$="Y" THEN GO TO VAL "3200"
 3265 GO TO VAL "2800"
 3270 PRINT "ENTER name of EQUIPMENT";:INPUT N$:PRINT "-";N$
 3275 PRINT "How many hours OPERATION per dayfor the ";N$;" ?";:INPUT H:PRINT " -";H;" HOURS"
 3280 PRINT "What is the WATTAGE?";:INPUT p:PRINT " - ";p;" WATTS"
 3285 PRINT "VOLTAGE Rating? 115,120,220,240 ";:INPUT E:PRINT " -";E;" VOLTS"
 3290 LET i=p/e:PRINT "AMPS Required = ";i'"enter rate per KW hour from Electric bill(.05 for 5 cents)"
 3295 GO TO VAL "3250"
 9000 STOP 
 9999 SAVE "B9*" LINE 1:BEEP .01,.77:REM PRINT AT 10,0;"SAVING B9*":CLS :PRINT AT 10,0;"TO VERIFY B9* REWIND TAPE":VERIFY "B9*":BEEP .03,.33

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.

Scroll to Top