Bank Book

This file is part of Timex Sinclair Public Domain Library Tape 1001 . Download the collection to get this file.
Developer(s): Tim Ward
Date: 1983
Type: Program
Platform(s): TS 1000
Tags: Finance, Home

This program is a personal finance manager that tracks checking, savings, and loan accounts using string arrays to store formatted transaction records. Transactions are entered in a fixed-format code scheme (two-character type codes such as CD for checking deposit, SW for savings withdrawal, LP for loan payment, followed by MMDDYY date fields and an amount), validated for type, month, day, year, and positive amount before acceptance. The program performs a selection sort on transactions by date, then processes them into three parallel string arrays (A$, B$, C$) with monthly interest compounding applied automatically at month boundaries. Output can be displayed on-screen with paged scrolling or sent to a printer via LPRINT, and files can be saved either with full transaction history or with balances only for a compact end-of-month carry-forward.


Program Analysis

Program Structure

The program is organized as a menu-driven application spanning lines 10–3830. Control flows through a central menu at lines 60–150, branching to five major functional blocks. REMs at key points (lines 60, 160, 370, 960, etc.) are stored in inverse video as section labels, a common ZX81/TS1000 organizational convention.

  1. Lines 10–50: Initialization, splash screen, and CLS
  2. Lines 60–150: Menu input and dispatch
  3. Lines 170–350: New file setup — starting date, balances, interest rates
  4. Lines 350–940: Transaction entry loop with multi-stage validation
  5. Lines 970–1060: Selection sort of T$ by date field
  6. Lines 1070–2420: Report array construction and transaction processing
  7. Lines 2430–3060: Screen display (paged) and optional LPRINT hard copy
  8. Lines 3080–3280: Save routines (with transactions or balances only)
  9. Lines 3300–3510: End-of-month interest posting subroutine
  10. Lines 3530–3650: Month-advance date calculation subroutine
  11. Lines 3670–3790: Right-hand currency formatting subroutine
  12. Lines 3800–3830: STOP and auto-run SAVE

Data Model and Transaction Format

All transactions are stored in T$(25,19), a 25-row by 19-character fixed-width string array. Each transaction record encodes its entire meaning positionally:

ColumnsContent
1–2Transaction type code (CD, CW, CT, SD, SW, ST, LP)
3–4Month (MM)
5–6Day (DD)
7–8Year (YY)
9–12Reference/cheque number or memo field
13–19Amount (right-justified by the formatting subroutine)

The report arrays A$(), B$(), and C$() are 32 characters wide and are dimensioned dynamically at line 1070–1090 to I+27 or I+26 rows, accommodating at most one interest posting line per transaction.

Transaction Type Codes

CodeMeaningEffect
CDChecking DepositAdds to checking balance
CWChecking WithdrawalSubtracts from checking balance
CTChecking-to-Savings TransferSubtracts from checking, adds to savings
SDSavings DepositAdds to savings balance
SWSavings WithdrawalSubtracts from savings balance
STSavings-to-Checking TransferSubtracts from savings, adds to checking
LPLoan PaymentReduces loan balance

Validation Logic

Each entered transaction passes through five sequential checks before being accepted. Any failure triggers a rejection screen showing the offending transaction with an underline caret pointing to the invalid field, a 10-second PAUSE 600, and then a branch back to re-entry at line 360.

  • Type code must be one of the seven valid codes (lines 430–510)
  • Month field (columns 3–4) must be ≤ 12 (line 590)
  • Day field (columns 5–6) must be ≤ 31 (line 670) — no per-month validation
  • Year field (columns 7–8) must be ≥ the year portion of the statement date D$ (line 750)
  • Amount field (columns 13 onward) must be > 0 (line 830)

The visual rejection feedback uses PRINT AT to place the transaction text followed by a \''\'' (▀▀) underline at the column corresponding to the specific invalid field — a neat diagnostic technique for a fixed-format entry system.

Sort Algorithm

Lines 970–1050 implement a straightforward O(n²) selection sort, comparing T$(X,3 TO 6) (the MMDD portion of each transaction) as strings. Because months and days are stored as zero-padded two-digit strings, lexicographic comparison is numerically correct. However, the sort does not include the year digits (columns 7–8), so transactions spanning more than one calendar year would not be ordered correctly across year boundaries.

Interest and End-of-Month Processing

The subroutine at line 3300 is called for each transaction and detects when a new month has been crossed by comparing the transaction’s month field against the last-written month in the report array. When a month boundary is detected, subroutine 3530 computes the first day of the next month via a 12-way IF chain (lines 3530–3640), and then lines 3360–3470 post interest entries for all three accounts using the monthly rates CINT, SINT, and LPR (each pre-divided by 1200 at input time to convert annual percentage rate to a monthly decimal). The loan interest compounds the outstanding balance upward rather than deducting a payment, which is the expected behaviour for an accrual posting.

Currency Formatting Subroutine

The subroutine at lines 3670–3790 is called via GOSUB 3670 throughout the program. It receives a value in Z$ and returns a right-justified 8-character currency string. The steps are:

  1. Convert Z$ to a float W and round to two decimal places using INT(W*100+.5)/100
  2. Fix leading-decimal cases such as .50.5 and -.5-0.5
  3. If no decimal point exists, append .00; if only one decimal digit, append 0
  4. Right-justify into an 8-character workspace W$(1) using the position of the decimal point K to compute the offset

This is a robust approach for the era, handling negative values and whole numbers correctly, though it will silently overflow for amounts requiring more than 7 characters (e.g., balances ≥ $10,000.00).

Paged Display

Lines 2430–2830 print the three report arrays to screen with manual paging. The variable P tracks the last page break; when L = P+22, the program pauses, clears the screen, reprints the section header lines, increments P, and resumes. This is a clean idiom for handling more rows than fit on one screen without using SCROLL.

Save Routines

Menu option 4 (line 3080) saves the full program state including all arrays with SAVE N$. Menu option 5 (lines 3130–3280) implements a compact “balances only” save: it extracts the final balance of each account from the last rows of the report arrays, collapses all four string arrays to DIM T$(1,1), DIM A$(1,1) etc. to free memory, then saves. On reload, the program restarts at line 10 (due to the GOTO 10 at line 3280) and re-enters the new-file setup with the carried-forward balances pre-populated in E$, F$, G$.

Notable Anomalies and Bugs

  • Lines 1540, 1670, 1680 etc.: The transaction processing block (lines 1390–2420) uses FOR T=1 TO I-1 with NEXT T inside each conditional branch. After the first branch that matches a transaction type, the NEXT T advances T and control falls through to the next IF check rather than restarting from the top of the loop. This means each transaction type block only processes transactions of that type in sequence — effectively the structure is seven sequential passes over the array, one per type. This is unconventional and relies on BASIC’s permissive FOR/NEXT behavior but is logically functional as long as the sort has already grouped types by date.
  • Line 750: The year comparison uses T$(I,7 TO 8)>=D$(5 TO 6). D$ is the statement date entered by the user; columns 5–6 of D$ as entered (in MMDDYY format) give the year YY. This works only if D$ is entered in exactly MMDDYY format, which is implied but never documented to the user.
  • Line 3120: After saving with full transactions, the program jumps to GOTO 30 rather than back to the menu at line 50 or 70, causing the splash screen PRINT to re-execute before the menu.
  • Lines 3220–3250: Collapsing arrays to DIM X$(1,1) is a valid memory-recovery technique, but it also destroys all transaction and report data, making this a one-way operation in the session.

Content

Appears On

Assembled by Tim Ward from many sources. Contains programs 10001 – 10050.

Related Products

Related Articles

Related Content

Image Gallery

Bank Book

Source Code

  10 DIM T$(25,19)
  20 REM % %T%H%E% %B%A%N%K% %B%O%O%K%S% % % % % % % % 
  30 PRINT "\''\:'\' \ : \ : \:'\''\'                        \:  \ :\..\.: \:.\..\.                        \:  \ : \ : \:                          \'  \ ' \ ' \''\''\'                                                       % % % % \.  \ :% % % % \:  % \:   %  \ :\:   \.:\:        %    %  \ :\:   \ :\:  % %   %  \ :\:  \.:\:'        %    %  \ :\:   \ :\:  % \ :\:  %  \ :\: \.:\:'         % % % % \:  \ :% % % % \:  %  %  %  \ :% %           %    %  \ :\:   \ :\:  %  \ :\: %  \ :\: \':\:.         %    %  \ :\:   \ :\:  %   % %  \ :\:  \':\:.        % % % % \'  \ :\:   \ :\:  %   \ :%  \ :\:   \':\:                                                                        % % % % \.  \ :% % % % \:  % % % % %  \ :\:   \.:\:  % % % % %  %    %  \ :\:   \ :\:  %    %  \ :\:  \.:\:'  %    %  %    %  \ :\:   \ :\:  %    %  \ :\: \.:\:'   %      % % % % \:  \ :\:   \ :\:  %    %  \ :% %     % % % % %  %    %  \ :\:   \ :\:  %    %  \ :\: \':\:.       %  %    %  \ :\:   \ :\:  %    %  \ :\:  \':\:.  %    %  % % % % \'  \ :% % % % \:  % % % % %  \ :\:   \':\:  % % % % %  WRITTEN BY TIM L. WARD MAY 1983"   
  40 PAUSE 600
  50 CLS 
  60 REM %M%E%N%U% % % % % % % % % % % % % % % % % % % 
  70 PRINT AT 1,7;"THE BANK BOOKS 1.0",,,AT 3,14;"MENU",,,,,AT 6,6;"PLEASE ENTER NUMBER",,,"1...START NEW FILE",,,"2...ENTER NEW TRANSACTIONS FOR",,TAB 4;"THIS FILE",,,,"3...PRINT AND DISPLAY THIS FILE",,,"4...SAVE THIS FILE WITH TRANS",,,"5...SAVE THIS FILE WITH BAL.ONLY",,"6...END PROGRAM"
  80 INPUT M
  90 CLS 
 100 IF M=1 THEN GOTO 170
 110 IF M=2 THEN GOTO 360
 120 IF M=3 THEN GOTO 970
 130 IF M=4 THEN GOTO 3080
 140 IF M=5 THEN GOTO 3130
 150 IF M=6 THEN GOTO 3810
 160 REM %B%E%G%.% %B%A%L%.%/%I%N%T%.% %R%A%T%E% % % % 
 170 PRINT AT 10,10;"PLEASE ENTER:"
 180 PRINT AT 12,7;"BEG. STATEMENT DATE"
 190 INPUT D$
 200 PRINT AT 12,0;"BEG. BALANCE OF CHECKING ACCOUNT"
 210 INPUT E$
 220 PRINT AT 12,0;"BEG. BALANCE OF SAVINGS ACCOUNT "
 230 INPUT F$
 240 PRINT AT 12,0;"BEG. BALANCE OF LOAN ACCOUNT    "
 250 INPUT G$
 260 PRINT AT 12,0;"INTEREST RATE ON CHECKING ACOUNT"
 270 INPUT CINT
 280 LET CINT=CINT/100/12
 290 PRINT AT 12,0;"INTEREST RATE ON SAVINGS ACCOUNT"
 300 INPUT SINT
 310 LET SINT=SINT/100/12
 320 PRINT AT 12,0;"ANNUAL PERCENTAGE RATE ON LOAN  "
 330 INPUT LPR
 340 LET LPR=LPR/100/12
 350 FOR I=1 TO 25
 360 CLS 
 370 REM %T%R%A%N%S% %E%D%I%T%/%A%C%C%E%P%T%E%D% % % % 
 380 PRINT AT 10,10;"PLEASE ENTER:"
 390 PRINT AT 12,10;"TRANSACTIONS"
 400 PRINT AT 13,10;"\''\''\''\''\''\''\''\''\''\''\''\''"
 410 INPUT T$(I)
 420 CLS 
 430 IF T$(I, TO 2)="CD" THEN GOTO 590
 440 IF T$(I, TO 2)="CW" THEN GOTO 590
 450 IF T$(I, TO 2)="CT" THEN GOTO 590
 460 IF T$(I, TO 2)="SD" THEN GOTO 590
 470 IF T$(I, TO 2)="SW" THEN GOTO 590
 480 IF T$(I, TO 2)="ST" THEN GOTO 590
 490 IF T$(I, TO 2)="LP" THEN GOTO 590
 500 IF T$(I, TO 3)<>"END" THEN GOTO 520
 510 GOTO 950
 520 PRINT AT 10,14;"REJECT"
 530 PRINT AT 12,5;"TRANSACTION CODE INVALID"
 540 PRINT AT 13,5;"\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''"
 550 PRINT AT 14,7;T$(I)
 560 PRINT AT 15,7;"\''\''"
 570 PAUSE 600
 580 GOTO 360
 590 IF VAL T$(I,3 TO 4)<=12 THEN GOTO 670
 600 PRINT AT 10,14;"REJECT"
 610 PRINT AT 12,5;"TRANSACTION MONTH INVALID"
 620 PRINT AT 13,5;"\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''"
 630 PRINT AT 14,7;T$(I)
 640 PRINT AT 15,9;"\''\''"
 650 PAUSE 600
 660 GOTO 360
 670 IF VAL T$(I,5 TO 6)<=31 THEN GOTO 750
 680 PRINT AT 10,14;"REJECT"
 690 PRINT AT 12,5;"TRANSACTION DAY INVALID"
 700 PRINT AT 13,5;"\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''"
 710 PRINT AT 14,7;T$(I)
 720 PRINT AT 15,11;"\''\''"
 730 PAUSE 600
 740 GOTO 360
 750 IF T$(I,7 TO 8)>=D$(5 TO 6) THEN GOTO 830
 760 PRINT AT 10,14;"REJECT"
 770 PRINT AT 12,5;"TRANSACTION YEAR INVALID"
 780 PRINT AT 13,5;"\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''"
 790 PRINT AT 14,7;T$(I)
 800 PRINT AT 15,13;"\''\''"
 810 PAUSE 600
 820 GOTO 360
 830 IF VAL T$(I,13 TO )>0 THEN GOTO 910
 840 PRINT AT 10,14;"REJECT"
 850 PRINT AT 12,5;"TRANSACTION AMOUNT INVALID"
 860 PRINT AT 13,5;"\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''"
 870 PRINT AT 14,7;T$(I)
 880 PRINT AT 15,19;"\''\''\''\''\''\''\''"
 890 PAUSE 600
 900 GOTO 360
 910 PRINT AT 12,6;"TRANSACTION ACCEPTED"
 920 PRINT AT 13,6;"\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''"
 930 PAUSE 50
 940 NEXT I
 950 GOTO 50
 960 REM %S%O%R%T% % % % % % % % % % % % % % % % % % % 
 970 FAST 
 980 FOR X=1 TO I-1
 990 FOR S=X+1 TO I
\n1000 IF T$(X,3 TO 6)<T$(S,3 TO 6) THEN GOTO 1040
\n1010 LET S$=T$(X)
\n1020 LET T$(X)=T$(S)
\n1030 LET T$(S)=S$
\n1040 NEXT S
\n1050 NEXT X
\n1060 REM %F%O%R%M%A%T% %H%E%A%D%I%N%G% %L%I%N%E%S% % % 
\n1070 DIM A$(I+27,32)
\n1080 DIM B$(I+26,32)
\n1090 DIM C$(I+26,32)
\n1100 LET A$(1)="THE BANK BOOKS ACCOUNTS SUMMARY"
\n1110 LET A$(2,5 TO 28)="CHECKING ACCOUNT SUMMARY"
\n1120 LET A$(3)="DATE    TRANS.   AMOUNT  BALANCE"
\n1130 LET A$(4, TO 2)=D$( TO 2)
\n1140 LET A$(4,3)="-"
\n1150 LET A$(4,4 TO 5)=D$(3 TO 4)
\n1160 LET Z$=E$
\n1170 GOSUB 3670
\n1180 LET A$(4,25 TO )=Z$
\n1190 LET B$(1,5 TO 27)="SAVINGS ACCOUNT SUMMARY"
\n1200 LET B$(2)="DATE    TRANS.   AMOUNT  BALANCE"
\n1210 LET B$(3, TO 2)=D$( TO 2)
\n1220 LET B$(3,3)="-"
\n1230 LET B$(3,4 TO 5)=D$(3 TO 4)
\n1240 LET Z$=F$
\n1250 GOSUB 3670
\n1260 LET B$(3,25 TO )=Z$
\n1270 LET C$(1,7 TO 26)="LOAN ACCOUNT SUMMARY"
\n1280 LET C$(2)="DATE             AMOUNT  BALANCE"
\n1290 LET C$(3, TO 2)=D$( TO 2)
\n1300 LET C$(3,3)="-"
\n1310 LET C$(3,4 TO 5)=D$(3 TO 4)
\n1320 LET Z$=G$
\n1330 GOSUB 3670
\n1340 LET C$(3,25 TO )=Z$
\n1350 LET A=5
\n1360 LET B=4
\n1370 LET C=4
\n1380 REM %T%R%A%N%S%A%C%T%I%O%N% %P%R%O%C%E%S%S%I%N%G% 
\n1390 FOR T=1 TO I-1
\n1400 GOSUB 3300
\n1410 IF T$(T,3 TO 4)>A$(A-1, TO 2) THEN GOSUB 3300
\n1420 IF T$(T, TO 2)<>"CD" THEN GOTO 1550
\n1430 LET A$(A, TO 2)=T$(T,3 TO 4)
\n1440 LET A$(A,3)="-"
\n1450 LET A$(A,4 TO 5)=T$(T,5 TO 6)
\n1460 LET A$(A,9 TO 12)=T$(T,9 TO 12)
\n1470 LET Z$=T$(T,13 TO )
\n1480 GOSUB 3670
\n1490 LET A$(A,16 TO 23)=Z$
\n1500 LET Z$=STR$ (VAL A$(A-1,25 TO )+VAL T$(T,13 TO ))
\n1510 GOSUB 3670
\n1520 LET A$(A,25 TO )=Z$
\n1530 LET A=A+1
\n1540 NEXT T
\n1550 IF T$(T, TO 2)<>"CW" THEN GOTO 1680
\n1560 LET A$(A, TO 2)=T$(T,3 TO 4)
\n1570 LET A$(A,3)="-"
\n1580 LET A$(A,4 TO 5)=T$(T,5 TO 6)
\n1590 LET A$(A,9 TO 12)=T$(T,9 TO 12)
\n1600 LET Z$=T$(T,13 TO )
\n1610 GOSUB 3670
\n1620 LET A$(A,16 TO 23)=Z$
\n1630 LET Z$=STR$ (VAL A$(A-1,25 TO )-VAL T$(T,13 TO ))
\n1640 GOSUB 3670
\n1650 LET A$(A,25 TO )=Z$
\n1660 LET A=A+1
\n1670 NEXT T
\n1680 IF T$(T, TO 2)<>"CT" THEN GOTO 1860
\n1690 LET A$(A, TO 2)=T$(T,3 TO 4)
\n1700 LET A$(A,3)="-"
\n1710 LET A$(A,4 TO 5)=T$(T,5 TO 6)
\n1720 LET A$(A,9 TO 12)=T$(T,9 TO 12)
\n1730 LET Z$=T$(T,13 TO )
\n1740 GOSUB 3670
\n1750 LET A$(A,16 TO 23)=Z$
\n1760 LET Z$=STR$ (VAL A$(A-1,25 TO )-VAL T$(T,13 TO ))
\n1770 GOSUB 3670
\n1780 LET A$(A,25 TO )=Z$
\n1790 LET B$(B, TO 23)=A$(A, TO 23)
\n1800 LET Z$=STR$ (VAL B$(B-1,25 TO )+VAL T$(T,13 TO ))
\n1810 GOSUB 3670
\n1820 LET B$(B,25 TO )=Z$
\n1830 LET A=A+1
\n1840 LET B=B+1
\n1850 NEXT T
\n1860 IF T$(T, TO 2)<>"SD" THEN GOTO 1990
\n1870 LET B$(B, TO 2)=T$(T,3 TO 4)
\n1880 LET B$(B,3)="-"
\n1890 LET B$(B,4 TO 5)=T$(T,5 TO 6)
\n1900 LET B$(B,9 TO 12)=T$(T,9 TO 12)
\n1910 LET Z$=T$(T,13 TO )
\n1920 GOSUB 3670
\n1930 LET B$(B,16 TO 23)=Z$
\n1940 LET Z$=STR$ (VAL B$(B-1,25 TO )+VAL T$(T,13 TO ))
\n1950 GOSUB 3670
\n1960 LET B$(B,25 TO )=Z$
\n1970 LET B=B+1
\n1980 NEXT T
\n1990 IF T$(T, TO 2)<>"SW" THEN GOTO 2120
\n2000 LET B$(B, TO 2)=T$(T,3 TO 4)
\n2010 LET B$(B,3)="-"
\n2020 LET B$(B,4 TO 5)=T$(T,5 TO 6)
\n2030 LET B$(B,9 TO 12)=T$(T,9 TO 12)
\n2040 LET Z$=T$(T,13 TO )
\n2050 GOSUB 3670
\n2060 LET B$(B,16 TO 23)=Z$
\n2070 LET Z$=STR$ (VAL B$(B-1,25 TO )-VAL T$(T,13 TO ))
\n2080 GOSUB 3670
\n2090 LET B$(B,25 TO )=Z$
\n2100 LET B=B+1
\n2110 NEXT T
\n2120 IF T$(T, TO 2)<>"ST" THEN GOTO 2300
\n2130 LET B$(B, TO 2)=T$(T,3 TO 4)
\n2140 LET B$(B,3)="-"
\n2150 LET B$(B,4 TO 5)=T$(T,5 TO 6)
\n2160 LET B$(B,9 TO 12)=T$(T,9 TO 12)
\n2170 LET Z$=T$(T,13 TO )
\n2180 GOSUB 3670
\n2190 LET B$(B,16 TO 23)=Z$
\n2200 LET Z$=STR$ (VAL B$(B-1,25 TO )-VAL T$(T,13 TO ))
\n2210 GOSUB 3670
\n2220 LET B$(B,25 TO )=Z$
\n2230 LET A$(A, TO 23)=B$(B, TO 23)
\n2240 LET Z$=STR$ (VAL A$(A-1,25 TO )+VAL T$(T,13 TO ))
\n2250 GOSUB 3670
\n2260 LET A$(A,25 TO )=Z$
\n2270 LET A=A+1
\n2280 LET B=B+1
\n2290 NEXT T
\n2300 IF T$(T, TO 2)<>"LP" THEN GOTO 2430
\n2310 LET C$(C, TO 2)=T$(T,3 TO 4)
\n2320 LET C$(C,3)="-"
\n2330 LET C$(C,4 TO 5)=T$(T,5 TO 6)
\n2340 LET Z$=T$(T,13 TO )
\n2350 GOSUB 3670
\n2360 LET C$(C,16 TO 23)=Z$
\n2370 LET Z$=STR$ (VAL C$(C-1,25 TO )-VAL T$(T,13 TO ))
\n2380 GOSUB 3670
\n2390 LET C$(C,25 TO )=Z$
\n2400 LET C=C+1
\n2410 NEXT T
\n2420 SLOW 
\n2430 LET P=0
\n2440 FOR L=1 TO A
\n2450 IF L=P+22 THEN GOTO 2490
\n2460 PRINT A$(L)
\n2470 NEXT L
\n2480 GOTO 2550
\n2490 PAUSE 600
\n2500 CLS 
\n2510 PRINT A$(2)
\n2520 PRINT A$(3)
\n2530 LET P=P+22
\n2540 GOTO 2460
\n2550 PAUSE 600
\n2560 CLS 
\n2570 LET P=0
\n2580 FOR L=1 TO B
\n2590 IF L=P+22 THEN GOTO 2630
\n2600 PRINT B$(L)
\n2610 NEXT L
\n2620 GOTO 2690
\n2630 PAUSE 600
\n2640 CLS 
\n2650 PRINT B$(1)
\n2660 PRINT B$(2)
\n2670 LET P=P+22
\n2680 GOTO 2600
\n2690 PAUSE 600
\n2700 CLS 
\n2710 LET P=0
\n2720 FOR L=1 TO C
\n2730 IF L=P+22 THEN GOTO 2770
\n2740 PRINT C$(L)
\n2750 NEXT L
\n2760 GOTO 2830
\n2770 PAUSE 600
\n2780 CLS 
\n2790 PRINT C$(1)
\n2800 PRINT C$(2)
\n2810 LET P=P+22
\n2820 GOTO 2740
\n2830 PAUSE 600
\n2840 CLS 
\n2850 PRINT AT 12,0;"DO YOU WANT HARD COPY (YES/NO)"
\n2860 INPUT M$
\n2870 CLS 
\n2880 SLOW 
\n2890 IF M$="NO" THEN GOTO 70
\n2900 FAST 
\n2910 LPRINT TAB 5;"TRANSACTIONS ACCEPTED"
\n2920 FOR L=1 TO T
\n2930 LPRINT TAB 6;T$(L)
\n2940 NEXT L
\n2950 LPRINT 
\n2960 FOR L=1 TO A
\n2970 LPRINT A$(L)
\n2980 NEXT L
\n2990 FOR L=1 TO B
\n3000 LPRINT B$(L)
\n3010 NEXT L
\n3020 FOR L=1 TO C
\n3030 LPRINT C$(L)
\n3040 NEXT L
\n3050 SLOW 
\n3060 GOTO 70
\n3070 REM %S%A%V%E% %R%O%U%T%I%N%E% % % % % % % % % % % 
\n3080 PRINT AT 10,5;"STEP 1  ENTER FILE NAME";AT 12,5;"STEP 2  SET TAPE TO RECORD";AT 14,5;"STEP 3  PRESS ""ENTER"""
\n3090 INPUT N$
\n3100 CLS 
\n3110 SAVE N$
\n3120 GOTO 30
\n3130 PRINT AT 10,5;"STEP 1  ENTER FILE NAME";AT 12,5;"STEP 2  SET TAPE TO RECORD";AT 14,5;"STEP 3  PRESS ""ENTER"""
\n3140 INPUT N$
\n3150 CLS 
\n3160 FAST 
\n3170 GOSUB 3320
\n3180 LET D$=A$(A,1 TO 2)+A$(A,4 TO 5)+T$(T,7 TO 8)
\n3190 LET E$=A$(A,25 TO )
\n3200 LET F$=B$(B,25 TO )
\n3210 LET G$=C$(C,25 TO )
\n3220 DIM T$(1,1)
\n3230 DIM A$(1,1)
\n3240 DIM B$(1,1)
\n3250 DIM C$(1,1)
\n3260 SAVE N$
\n3270 SLOW 
\n3280 GOTO 10
\n3290 REM %E%N%D% %O%F% %M%O%N%T%H% %R%O%U%T%I%N%E% % % 
\n3300 IF T$(T,3 TO 4)>A$(A-1, TO 2) THEN GOTO 3320
\n3310 RETURN 
\n3320 GOSUB 3530
\n3330 LET A$(A, TO 5)=Y$
\n3340 LET B$(B, TO 5)=Y$
\n3350 LET C$(C, TO 5)=Y$
\n3360 LET AMT=VAL A$(A-1,25 TO )
\n3370 LET Z$=STR$ (AMT+(AMT*CINT))
\n3380 GOSUB 3670
\n3390 LET A$(A,25 TO )=Z$
\n3400 LET AMT=VAL B$(B-1,25 TO )
\n3410 LET Z$=STR$ (AMT+(AMT*SINT))
\n3420 GOSUB 3670
\n3430 LET B$(B,25 TO )=Z$
\n3440 LET AMT=VAL C$(C-1,25 TO )
\n3450 LET Z$=STR$ (AMT+(AMT*LPR))
\n3460 GOSUB 3670
\n3470 LET C$(C,25 TO )=Z$
\n3480 LET A=A+1
\n3490 LET B=B+1
\n3500 LET C=C+1
\n3510 RETURN 
\n3520 REM %E%N%D% %O%F% %M%O%N%T%H% %D%A%T%E% %R%O%U%T% 
\n3530 IF A$(A-1, TO 2)="01" THEN LET Y$="02-01"
\n3540 IF A$(A-1, TO 2)="02" THEN LET Y$="03-01"
\n3550 IF A$(A-1, TO 2)="03" THEN LET Y$="04-01"
\n3560 IF A$(A-1, TO 2)="04" THEN LET Y$="05-01"
\n3570 IF A$(A-1, TO 2)="05" THEN LET Y$="06-01"
\n3580 IF A$(A-1, TO 2)="06" THEN LET Y$="07-01"
\n3590 IF A$(A-1, TO 2)="07" THEN LET Y$="08-01"
\n3600 IF A$(A-1, TO 2)="08" THEN LET Y$="09-01"
\n3610 IF A$(A-1, TO 2)="09" THEN LET Y$="10-01"
\n3620 IF A$(A-1, TO 2)="10" THEN LET Y$="11-01"
\n3630 IF A$(A-1, TO 2)="11" THEN LET Y$="12-01"
\n3640 IF A$(A-1, TO 2)="12" THEN LET Y$="01-01"
\n3650 RETURN 
\n3660 REM %R%I%G%H%T%-%H%A%N%D% %J%U%S%T%I%F%Y% % % % % 
\n3670 DIM W$(1,8)
\n3680 LET W=VAL Z$
\n3690 LET X$=STR$ (INT (W*100+.5)/100)
\n3700 IF X$(1)="." THEN LET X$="0"+X$
\n3710 IF LEN X$>1 THEN IF X$(1 TO 2)="-." THEN LET X$="-0"+X$(2 TO )
\n3720 FOR K=1 TO LEN X$
\n3730 IF X$(K)="." THEN GOTO 3760
\n3740 NEXT K
\n3750 LET X$=X$+".00"
\n3760 IF K=LEN X$-1 THEN LET X$=X$+"0"
\n3770 LET W$(1,(7-K) TO )=X$
\n3780 LET Z$=W$(1)
\n3790 RETURN 
\n3800 REM %P%R%O%G%R%A%M% %S%T%O%P% % % % % % % % % % % 
\n3810 STOP 
\n3820 SAVE "1000%2"
\n3830 RUN 

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

Scroll to Top