This program can help put your household finances on a business-like basis. It requires 8K ROM and 16K RAM.
To conserve memory for data, the set-up procedure is done in the immediate mode, thus using no program storage space. Type in the program (ignore inverse video in line 630; the computer switches it after a save and reload), then follow these steps:
1. Type DIM A$(10,13) and press ENTER or NEWLINE.
2. Type in this program:
800 FOR K=1 TO 10
810 INPUT A$(K)
820 NEXT K
Press GOTO 800. Then type in 8 expense categories, such as FOOD, HOUSE, AUTO, and so on, pressing ENTER or NEWLINE after each. Use the last two categories for income, such as SALARY and BONUSES. Each category can have up to 13 characters. After entering your categories, delete lines 800-820.
3. Press GOTO 10. Your 10 categories will come up with corresponding letters.
4. Select M (for CLEAR MONTH) then N (for CLEAR YEAR).
You’re ready to go. The program is self-saving (option L) and self-starting on reload to protect data from accidental erasure by RUN.
After viewing a statement (option K), press CONT to go back to the menu.
With a 16K RAM, this program leaves you about 12.6K bytes to fill. The inverse characters are HOUSEHOLD FINANCES in line 20 and CURRENT STATEMENT in line 150.
Variables and Strings
A$ category name array A(K) monthly array B(K) yearly array K For/To (primary) J For/To (secondary) M(J) Print scratchpad Q Monthly total R annual total S Address T Line pointer U Tab pointer Z$ Entry string
10 CLS
20 PRINT AT 2,6;"HOUSEHOLD FINANCES ";AT 4,0;"ENTER LETTER AND AMT. AS ""A9.95""";AT 6,2;"A=";A$(1);AT 6,14;"F=";A$(6);AT 7,2;"B=";A$(2);AT 7,14;"G=";A$(7);AT 8,2;"C=";A$(3);AT 8,14;"H=";A$(8);AT 9,2;"D=";A$(4);AT 9,14;"I=";A$(9);AT 10,2;"E=";A$(5);AT 10,14;"J=";A$(10);AT 12,7;"ENTER LETTER ONLY";TAB 2;"K=STATEMENT";TAB 14;"M=CLEAR MONTH";TAB 2;"L=SAVE";TAB 14;"N=CLEAR YEAR";AT 16,0;"INSURANCE BENEFITS ARE NEGATIVE.NEGATIVE BALANCE SHOWS BENEFITS EXCEED PREMIUMS."
30 INPUT Z$
40 IF CODE Z$=48 THEN GOTO 120
50 IF CODE Z$=49 THEN GOTO 620
60 IF CODE Z$=50 THEN DIM A(10)
70 IF CODE Z$=51 THEN DIM B(10)
80 IF CODE Z$>47 THEN GOTO 30
90 LET A(CODE Z$-37)=A(CODE Z$-37)+VAL Z$(2 TO )
100 LET B(CODE Z$-37)=B(CODE Z$-37)+VAL Z$(2 TO )
110 GOTO 30
120 CLS
130 DIM M(2)
140 LET S=350
150 PRINT AT 2,6;"CURRENT STATEMENT ";AT 4,0;"CATEGORY";TAB 16;"MONTH";TAB 25;"YEAR"
160 LET T=5
170 FOR K=1 TO 10
180 LET M(1)=A(K)
190 LET M(2)=B(K)
200 PRINT AT T,0;A$(K);TAB 14;"$";TAB 19;".00 $";TAB 29;".00"
210 LET U=14
220 FOR J=1 TO 2
230 IF M(J)<0 THEN GOTO 250
240 IF M(J)<10000 THEN LET U=U+1
250 IF ABS M(J)<1000 THEN LET U=U+1
260 IF ABS M(J)<100 THEN LET U=U+1
270 IF ABS M(J)<10 THEN LET U=U+1
280 PRINT AT T,U;M(J)
290 LET U=24
300 NEXT J
310 LET T=T+1
320 IF K=8 OR S=460 OR S=540 THEN GOTO S
330 NEXT K
340 GOTO S
350 LET Q=0
360 LET R=0
370 FOR J=1 TO 8
380 LET Q=Q+A(J)
390 LET R=R+B(J)
400 NEXT J
410 LET S=460
420 PRINT AT T,0;"TOTAL EXPENSE";TAB 14;"$";TAB 19;".00 $";TAB 29;".00"
430 LET M(1)=Q
440 LET M(2)=R
450 GOTO 210
460 LET T=T+1
470 LET S=490
480 NEXT K
490 PRINT AT T,0;"TOTAL INCOME";TAB 14;"$";TAB 19;".00 $";TAB 29;".00"
500 LET M(1)=A(9)+A(10)
510 LET M(2)=B(9)+B(10)
520 LET S=540
530 GOTO 210
540 LET T=T+1
550 PRINT AT T,0;"PROFIT/LOSS";TAB 14;"$";TAB 19;".00 $";TAB 29;".00"
560 LET M(1)=A(9)+A(10)-Q
570 LET M(2)=B(9)+B(10)-R
580 LET S=600
590 GOTO 210
600 STOP
610 GOTO 10
620 CLS
630 PRINT AT 6,0;"PREPARE TO SAVE; START RECORDER RUNNING; TOUCH ""N/L"""
640 PAUSE 40000
650 SAVE "HOUSEHOLD FINANCES"
660 GOTO 10
SYNTACTIC SUM: 64953, 8K
Media
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.