ZX80 Check Book

Author(s): Timothy Sorber
Publication: Syntax
Pub Details: Syntax/Syntax ZX80 v2 n7 (Volume 2, Issue 7)
Date: July 1981
Pages: 7

This program uses 4K ROM & 1K RAM to record up to 10 transactions at a time (8K modifications below). Keep them on file by storing the program with the variables intact. Just SAVE the program after using it, then type GO TO 10, not RUN, to run after reloading.

RUN the program and follow the prompts. You can number deposits with a flag like 9999 or a code for the date. Days with 1 digit should have a zero in front of them. The register can be checked after each entry by hitting 0 (NL). To continue adding entries hit NL. To exit, type STOP.

Drop the decimal point on all numbers and add them back when transferring transactions to your checkbook. Do not drop zeros; enter $1.00 as 100.

10 DIM A(9)
20 DIM B(9)
30 FOR L=0 TO 9
40 LET A(L)=0
50 LET B(L)=0
60 NEXT L
70 PRINT "PREV BALANCE?"
80 INPUT B
90 FOR K=0 TO 9
100 PRINT "REGISTER(0), DEPOSIT(1)"
105 PRINT "OR CHECK(2)?"
110 INPUT T
120 IF T=0 THEN GO TO 220
130 PRINT "NUMBER?"
140 INPUT N
150 LET D1=T*10000+N
160 LET A(K)=D1
170 PRINT "AMOUNT?"
180 INPUT D2
190 LET B(K)=D2
200 CLS
210 NEXT K
220 CLS
230 PRINT " ZX80 CHECK BOOK"
240 PRINT
250 PRINT "PREV BALANCE",B
255 PRINT
260 PRINT "NR","AMOUNT","BALANCE"
270 LET T1=B
280 FOR G=0 TO 9
290 LET F=A(G)/10000
300 IF F=0 THEN GO TO 440
310 IF F=1 THEN GO SUB 360
320 IF F=2 THEN GO SUB 400
330 PRINT N,A$;B(G),T1
340 NEXT G
350 STOP
351 GO TO 100
360 LET A$="+"
370 LET N=A(G)-10000
380 LET T1=T1+B(G)
390 RETURN
400 LET A$="-"
410 LET N=A(G)-20000
420 LET T1=T1-B(G)
430 RETURN
440 INPUT B$
450 IF B$="STOP" THEN STOP
460 GO TO 100

Syntactic Sum: -15775, 4K

For 8K ROM users: This program will not fit in 1K RAM with 8K ROM. To use it with more than 1K, delete lines 30-60 and change these lines to:

90 FOR K=1 TO 10
260 PRINT "NR";TAB 8;"AMOUNT";TAB 19;"BALANCE"
280 FOR G=1 TO 10
300 IF F<1 THEN GOTO 440
310 IF F<2 THEN GOSUB 360
320 IF F>=2 THEN GOSUB 400
330 PRINT N;TAB 8;A$;B(G);TAB 19;T1

Syntactic Sum: 43566, 8K

With the 8K BASIC you can use decimal numbers.

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