Hand Programs 1

Date: 198x
Type: Cassette
Platform(s): TS 1000

A home-made compilation of short BASIC programs loaded from a numbered menu. It holds a parking-receipt form you fill in and copy to the printer, a monthly budget, a mortgage payment calculator, a character-based graph of a parabola, and a scrolling rocket display. The INDEX program prints the menu and uses GOTO I*100 to reach a LOAD statement for the chosen title.

The tape is unlabeled. Its title comes from the INDEX menu, which reads “HAND PROGRAMS 1”. The menu lists six programs, but number 2, PROTECTOR, isn’t on the tape.

Program Analysis

Program Structure

  • INDEX: menu of six titles. INPUT I then GOTO I*100 reaches lines 100–600, each holding one LOAD.
  • EXPENSE RECEIPTS: prints a “CLASSIFIED PARKING SYSTEMS” receipt form, takes the date, time and amount, and fills them in. Pressing ENTER at the final input runs COPY to the printer, and the form then clears for the next receipt.
  • BUDGET: asks for income, then five expenses (RENT, UTIL, CLOTH, FD/WK, OTHER), converts each to a monthly figure and prints the results with the money left over.
  • HOUSE: asks for the price, term in years and interest rate, then prints the monthly payment and the total paid.
  • GRAPH-PLOTTER: prints a 21 × 21 grid for Y = 10 down to −10, with 0 for points above the curve Y=X*X/2-7 and . below it.
  • ROCKET RANGE: counts down from 10 in a diagonal, then keeps scrolling a five-row rocket up the screen between bracket walls at random horizontal positions.

Notable Techniques

  • BUDGET stores a formula for each expense as a string in F$() ("E(A)/2", "E(A)*4.3") and evaluates it with VAL F$(A). Weekly food costs are converted to monthly by multiplying by 4.3.
  • GRAPH-PLOTTER picks each character with string-and-Boolean arithmetic, ("0" AND K>.5)+("." AND K<.5), instead of an IF.
  • ROCKET RANGE builds its picture from a five-element string array of block graphics and prints each row after a SCROLL, so the display moves continuously.

Potential Issues

  • BUDGET line 180 reads LET I=1-E(A) where I=I-E(A) was evidently meant, so EXTRA prints 1 minus the last expense instead of the income left over.
  • HOUSE computes an annual payment with an annuity-due formula (the extra (1+I) factor) and divides it by 12. The result is not a true monthly amortized payment.
  • In GRAPH-PLOTTER, when K is exactly 0.5, which happens for odd values of X, neither character prints, so those rows come out a character short and out of line.
  • INDEX option 2 loads PROTECTOR, which isn’t on the tape. Entering anything other than 1 or 3–6 loads nothing.

Source Code

  10 REM INDEX
  20 PRINT "HAND PROGRAMS 1"
  30 PRINT AT 2,8;"PICK A NUMBER..."
  40 PRINT AT 4,6;"1 EXPENSE RECEIPTS"
  50 PRINT AT 5,6;"2 PROTECTOR"
  60 PRINT AT 6,6;"3 BUDGET"
  70 PRINT AT 7,6;"4 HOUSE"
  80 PRINT AT 8,6;"5 GRAPH-PLOTTER"
  90 PRINT AT 9,6;"6 ROCKET RANGE"
  95 INPUT I
  97 GOTO I*100
 100 LOAD "EXPENSE RECEIPTS"
 200 LOAD "PROTECTOR"
 300 LOAD "BUDGET"
 400 LOAD "HOUSE"
 500 LOAD "GRAPH-PLOTTER"
 600 LOAD "ROCKET RANGE"
 700 STOP

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