Checkbook Management

See all articles from SYNC v3 n1

A computer with its TV display, makes the task of updating and balancing a checkbook simpler than using a four-function calculator. The display enables the user to double-check entries and so helps eliminate mistakes. In addition, if mistakes are made, they are easily corrected. Below are two programs which I developed for these purposes. Each requires the 8K ROM, and each fits into 1K RAM.

Cartoon of a harried man at a cluttered desk
Cartoon of a harried man at a cluttered desk

Program 1

If you are like most people, you make a number of transactions—write checks, make deposits, etc.—with your checkbook before you update the balance. The first of the two programs is designed to update your checkbook balance. To use the program, enter it into the computer, then RUN.

The program first asks you to

INPUT BALANCE

At this point you enter your last computed balance.

Then the program asks you to

INPUT CHECK CHARGE

In response, you enter the per check charge of your account. (If your checking account has no check charge, you can delete lines 220 and 230, and the “-C” of line 380, from the program.)

The program then clears the screen, and displays:

INPUT CODE, THEN INPUT AMT.
ITEM    DEBIT    CREDIT    BALANCE

At this point you enter each transaction in your checkbook in two steps. First, for each transaction you enter a code: 0 if the transaction was a debit (a monthly service charge, for example); 1 if the transaction was a credit (a deposit, perhaps); or the check number if the transaction was a check. Second, you enter the amount of the transaction. After each complete entry the computer displays the nature of the transaction in the first column, using DEB if the transaction was a debit, CRED if the transaction was a credit, or the check number if the transaction was a check; the amount of the transaction in the second (if the transaction was a debit or check) or third (if the transaction was a credit) column; and the resulting balance in the fourth column.

For an example of how this works, suppose that your most recent balance was $110.10 and that your account charges you $0.25 per check. Upon entering these figures, the display would show

INPUT CODE, THEN INPUT AMT.
ITEM      DEBIT      CREDIT    BALANCE
                               110.1

Now suppose your next four transactions were check 215 for $50.; a $3.00 monthly service charge; a $240 deposit; and check 216 for $245.20. To enter these you would enter 215, then 50; 0 (for a debit), then 3; 1 (for a credit), then 240; and 216, then $245.20. The display would now show:

INPUT CODE, THEN INPUT AMT.
ITEM      DEBIT      CREDIT    BALANCE
                               110.1
215       50                   59.85
DEB       3                    56.85
CRED                 240       296.85
216       245.20               51.4

This display scrolls up with each entry, so you may continue until you have entered all transactions. The screen can hold eleven transactions at one time, so be sure you check your work from time to time. If you should detect an error, it can be offset using the 0 or 1 code, and then the amount, to adjust the balance appropriately.

Program 2

The second program is used to check your checkbook balance against your bank statement. When you run the program, it first asks you to

INPUT CHECK CHARGE

In response, you enter your account per-check charge. If your account does not have a check charge, you can delete lines 80, 90, and 100, and the “-A” of line 190. Alternatively, if you will use the program for accounts with the same check charge, you can make line 80:

80A = (check charge) and delete lines 90 and 100.

The program then asks you to

INPUT BANK BALANCE

In response, you enter your balance as per your bank statement.

The program then asks you to

INPUT OUTSTANDING CHECKS
IF FINISHED, INPUT 0

You now enter, one at a time, the amount of each check which was not returned with the statement. As you enter the amount of each check, it is displayed on the screen. When you have entered all such checks, enter 0.

This sends the program on to the next step which asks you to

INPUT UNRETURNED DEPOSITS
IF FINISHED INPUT 0

Now you enter, one at a time, the amount of each deposit which you made since the statement was compiled by the bank, that is, the amount of each deposit which does not appear on the statement. As you enter the amount of each such deposit, its value will appear on the screen. When you are finished, enter 0. The computer will now compute your correct checkbook balance (assuming the bank has not made a mistake!) and display

CHECKBOOK BALANCE SHOULD BE:
(balance)

Memory Saving

In entering the program, you should use keywords and tokens wherever possible in the PRINT statements. This saves considerable memory and is necessary if the program is to run in 1K RAM.

To use this procedure (from Richard McDaniel, SYNC 1:5) enter the line number, then enter the last keyword in the statement. Then back up the cursor, using the left arrow (shift 5) until it is before the keyword. Now enter the next-to-last keyword. Repeat this procedure until all keywords are entered. You can enter intermediate text as you work, or after all keywords are entered.

An example may help here. Consider line 260 from the first program:

260 PRINT “INPUT CODE, THEN INPUT AMT.”

To enter this line, first type:

260 INPUT AMT.”

using the keyword INPUT (on the “I” key). Then back up using the left arrow (shift 5) until the cursor is before the word INPUT. Now enter THEN, using the token (shift 3). The display will read:

260 THEN INPUT AMT.”

Back up again until the cursor is before THEN, and enter CODE, using the token. To do this you must first obtain the function cursor (shift NEWLINE or shift ENTER), then enter the token CODE, (on the “I” key). The display will now read:

260 CODE THEN INPUT AMT.”

The cursor is now after the word CODE, so now is a good time to enter the comma. Next, back up again until the cursor is before the word CODE, and enter INPUT, again using the keyword (on the I key). The display now reads:

260 INPUT CODE, THEN INPUT AMT.”

Finally, back up again until the cursor is before the word INPUT, and enter PRINT, using the keyword (on the “P” key). At this time also enter the leading quotation mark. The display will now show the complete line, ready to enter:

260 PRINT “INPUT CODE, THEN INPUT AMT.”

The whole thing sounds a bit complicated when you read it, but it is really quite simple once you get the hang of it. The memory saving is substantial; 17 bytes for this one statement alone.

Program 1. Checkbook Update.

 200 PRINT " INPUT BALANCE"
210 INPUT B
220 PRINT " INPUT CHECK CHARGE"
230 INPUT C
240 CLS
250 SCROLL
260 PRINT " INPUT CODE , THEN INPUT AMT."
270 GOSUB 2000
280 PRINT "ITEM";TAB 5;"DEBIT";TAB 13;"CREDIT";TAB 21;"BALANCE"
290 GOSUB 2000
300 PRINT TAB 21;B
310 GOSUB 2000
320 INPUT Y
340 INPUT Z
350 IF Y=1 THEN GOTO 1000
360 LET B=B-Z
370 IF Y>1 THEN PRINT Y;
380 IF Y=0 THEN PRINT "DEB";
390 IF Y>1 THEN LET B=B-C
400 PRINT TAB 5;Z;TAB 21;B
410 GOTO 310
1000 LET B=B+Z
1010 PRINT "CRED";TAB 12;Z;TAB 21;B
1020 GOTO 310
2000 SCROLL
2010 PRINT
2020 SCROLL
2030 RETURN

Line notes:

210: Enters the previous checkbook balance.
230: Enters the per check charge.
280: Sets the headings of the transaction listing.
300: Prints previous balance in col. 4.
320: Enters code -0, 1, or check no.
340: Enters amount of transaction.
350: Branch if transaction was a credit.
360: Decreases balance for debits.
370: Prints check no. if transaction was a check.
380: Prints DEB if transaction was a non-check debit.
390: Decreases balance by per check charge if transaction was check.
400: Prints amt. of trans. and resulting balance.
410: Returns for next transaction.
1000: Branch from 350; increases bal. for credit.
1010: Prints amt. of trans. and resulting balance.
1020: Returns for next transaction.
2000: Scroll and space subroutine; used after each line of display is printed.
2030 RETURN

Program 2. Checkbook Statement Comparison.

  70 GOSUB 2000
80 PRINT " INPUT CHECK CHARGE"
90 INPUT A
100 GOSUB 2000
110 PRINT " INPUT BANK BALANCE"
120 INPUT B
130 GOSUB 2000
140 PRINT " INPUT OUTSTANDING CHECKS"
150 GOSUB 2000
160 GOSUB 4000
170 INPUT C
180 IF C=0 THEN GOTO 230
190 LET B=B-C-A
200 PRINT C
210 GOSUB 2000
220 GOTO 170
230 GOSUB 2000
240 PRINT " INPUT UNRETURNED DEPOSITS"
250 GOSUB 2000
260 GOSUB 4000
270 INPUT D
280 IF D=0 THEN GOTO 340
290 LET B=B+D
300 PRINT D
310 GOSUB 2000
320 GOTO 270
330 GOSUB 2000
340 PRINT "BALANCE SHOULD BE: ";B
1999 STOP
2000 SCROLL
2010 PRINT
2020 SCROLL
2030 RETURN
4000 PRINT "IF FINISHED INPUT 0"
4010 GOSUB 2000
4020 RETURN

Line notes:

90: Inputs per check charge
120: Inputs bank balance as per statement.
170-230: Form a loop which inputs outstanding checks and adjusts the bank statement balance for them and associated per check charges.
240-330: Adjust the bank statement balance for any deposits made after the statement was prepared.
340: Prints checkbook balance.
2000: Subroutine used to scroll and space printout.
4000: Subroutine to print statement.

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