Household Accounts on the TS2068

Author(s): John (Basil) Wentworth
Publication: Update Magazine
Pub Details: Update January 1992
Date: January 1992
Pages: 9

Here is a little program that I use to keep a record of the costs of living. It’s extremely simple, and includes in Lines 1350 to 1500 a technique that I haven’t seen used elsewhere, but have found extremely useful. (I call it “flabby ware”, in contrast with “firmware”.)

Lines 510 through 610 keep a record of the expenses you enter, plus a running total. When you have finished all entries, a null (press “ENTER” without any number) shifts you down to Line 1000. Here the monthly average for the year is computed and displayed, along with the total for the current month. Lines 1350 to 1500 prompt you (with a display like the illustration titled “READOUT AFTER FIRST MONTH”) to update line 9990 in preparation for next month. You should start the year with M=0 and AV=0, as shown, and then re-adjust these values every month to agree with the numbers displayed by Line 1300. The program should be re-SAVEd, of course, after Line 9990 has been updated.

Lines 9000 and 9010 are the SAVE routine for the OLIGER disk system. You should use whatever commands your own system requires.

Like any record-keeping system, this one depends on systematic entry of data, every month. Jocelyn doesn’t let me forget.

PROGRAM FOR HOUSEHOLD ACCOUNTS

 500 GO SUB 9990
510 REM put at end of program in order to make line 1500 more convenient
530 CLS
540 PRINT ,0
550 LET t=0
560 INPUT "spent? ("""" if through) ";a$
570 IF a$="" THEN GO TO 1000
580 LET t=t+VAL a$
590 REM cumulative total for month
600 PRINT VAL a$,t
610 GO TO 560
1000 LET ty=m*av+t
1010 REM total for the year, including the current month
1050 LET m=m+1
1100 LET av=ty/m
1110 REM monthly average, in-cluding current month
1150 LET av=.01*INT (100*av+.5)
1170 REM rounds off average to nearest cent
1200 CLS : PRINT "MONTHLY MONTH AV. /MONTH"
1250 PRINT "BILL";TAB 20;" FOR YEAR"
1300 PRINT 'T;TAB 11;m;TAB 21;av
1350 PRINT ' FLASH 1;">>>"; FLASH 0;"ADJUST ""M"" and ""AV"" in 9990"
1380 PRINT
1500 LIST 9990
2000 STOP
9000 SAVE /"H" LINE 1
9010 VERIFY /"H": BEEP .3,12: BEEP 1,12
9020 REM format for SAVE with OLIGER disk system
9050 STOP
9990 LET M=0: LET AV=0: RETURN

READOUT AFTER FIRST MONTH

MONTHLY    MONTH       AV. /MONTH
BILL                   FOR YEAR

100.21       1         100.21

>>>ADJUST "M" and "AV" in 9990

9990>LET M=0: LET AV=0: RETURN

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