Super Budget

This file is part of Byte Power November 1986. Download the collection to get this file.
Developer(s): Kristian Boisvert
Date: 1986
Type: Program
Platform(s): TS 2068
Tags: Finance

A household budget program. After you enter the year of the budget, a menu offers eight options: enter data, change the name of an item, total to date for all items, overall total and average, graph, save or load a file, print the data and quit. For each item it keeps a table of months with the amount spent, the estimate and the difference. A sample data file is included on the tape.

The title screen reads “SUPER BUDGET / WRITTEN BY KRISTIAN BOISVERT / ©1986 BYTE POWER”. It was track 08 of Byte Power 1st Class Magazine, Issue 4, November 1986, a tape magazine from Canada.

Program Analysis

Nearly all of the program is a block of machine code, BUDGET.C8, 8140 bytes loaded at 48518. The BASIC is a short loader with tape and printer helpers. Line 30 starts the machine code with RANDOMIZE USR 48518. When the code needs BASIC to do something, it returns with a line number in addresses 65534–65535, and BASIC jumps there with GO TO (PEEK 65534+256*PEEK 65535).

  • Lines 100–195 handle save and load. They ask for a file name of up to nine characters and save or load the 8710-byte data area at 56658 as CODE. Afterwards they re-enter the machine code at 48620.
  • Lines 1000–1310 are four entry points that first COPY the screen to the printer and then call a different machine code routine. They appear to be used by the printout.
  • Line 3 checks the byte at 23681 and, if it is zero, lists the save line and stops instead of running.
  • Line 9999 is the original cassette save line, which saves and verifies both the BASIC and the code.

Potential Issues

  • Line 210 quits with STOP : GO TO 9998, so the GO TO runs only after CONTINUE. In this tape copy, line 9998 is now a REM, and continuing would run on into the save line at 9999.
  • The verify after saving a data file at line 160 is commented out, so saved files are not checked.

Until now, the issue’s download had this track only as a snapshot. It now also includes the track as a TAP converted from a Larken disk copy, with the PRINT #4 disk prefixes and the disk load line removed and the autostart set to line 1. The TAP includes the sample data file BGDATA.C1. It was tested in ZEsarUX.

Appears On

Tape-based magazine. Tracks 08 Super Budget and 09 MUSIcomp were previously only in the download as a snapshot and a

Related Articles

This program lets you enter your expenditures for every months and also the estimated spendings (budget). It will tell you...

Image Gallery

Source Code

    0 REM THEN k GO SUB [ .\> " OR h PRINT * OR hN! THEN g RESTORE "<=h* OR h#N#" OR h LLIST "<>h> PRINT *<=hF#"<=h*<>h~#"<>h FOR w FOR LET = OVER COPY FOR GO SUB B FOR LET = PLAY <>l ERASE h ERASE h@@@@@qq LPRINT q LPRINT @ LPRINT    LPRINT  LPRINT @q @@  q@q@VAL qP@@   @@@@   @@@@  q@ LPRINT @q@@ LPRINT @@@@   LPRINT @@  @@     LPRINT qqqq LPRINT @USR @@@ LPRINT LPRINT q LPRINT    LPRINT LPRINT  `  LPRINT  qq LPRINT   LPRINT    LPRINT  q LPRINT LPRINT    LPRINT qq LPRINT LPRINT q @     LPRINT q LPRINT qq LPRINT LPRINT qq LPRINT   @@@@@@@@   @  @ LPRINT LPRINT   @ @   LPRINT q`@@``` LPRINT qq LPRINT qqUSR qUSR qqUSR LPRINT q    q LPRINT USR qqqqUSR LPRINT   USR      LPRINT LPRINT   USR        LPRINT   qqq LPRINT qq LPRINT qqq LPRINT @@@@ LPRINT `  qq LPRINT qqUSR qqq        q LPRINT q LPRINT qqqq LPRINT qqqqq LPRINT qqqq LPRINT LPRINT qq LPRINT      LPRINT qqq LPRINT LPRINT  USR qqUSR qq LPRINT    LPRINT   LPRINT LPRINT @@@@@qqqqq LPRINT qqqqq@qqqq LPRINT qqq@qqqqqq@@@ LPRINT  @@   LPRINT LPRINT          LPRINT     @@  LPRINT     LPRINT @ LPRINT q LIST 0@ LPRINT @P LIST LPRINT  LPRINT q LPRINT      LPRINT qq LPRINT LPRINT q  q LPRINT   LPRINT qq LPRINT LPRINT q LPRINT    LPRINT `  USR        LPRINT qq LPRINT  LPRINT      LPRINT qqq@USR @@ LPRINT    qq LPRINT   qqUSR qqUSR @@@@ LPRINT q LPRINT qqq LPRINT qqqq LPRINT qqq LPRINT LPRINT qq LPRINT      LPRINT qq LPRINT   LPRINT q       LPRINT    LPRINT  LPRINT @ LPRINT @@@`qqqq LPRINT qqqq@qqq LPRINT qqq@qqqqq LPRINT  LPRINT LPRINT  @   LPRINT `@@USR @@` ` LPRINT ` USR @@`@@USR   USR LPRINT USR    LPRINT LPRINT LPRINT LPRINT LPRINT    TOTAL EXPENDITURES OF 1989            AVERAGE PER MONTH      1
    1 CLS : PRINT AT 8,10;"SUPER BUDGET";AT 10,2;"WRITTEN BY KRISTIAN BOISVERT";AT 12,8;"*1986 BYTE POWER"
    2 PRINT AT 20,0;"STILL LOADING...": INK 7: PRINT AT 0,0;: PRINT #4: LOAD "BUDGET.C8"CODE : INK 0: PAPER 7: BORDER 7: PRINT AT 20,0;"PLEASE STOP TAPE...": FOR F=0 TO 10 STEP 2: BEEP .08,F: NEXT F
    3 IF PEEK 23681=0 THEN PRINT AT 20,0;"                   ";AT 15,0;: LIST 9999: STOP 
   30 CLS : RANDOMIZE USR 48518: GO TO (PEEK 65534+256*PEEK 65535)
  100 PRINT #1;AT 1,0;"1- SAVE, 2-LOAD"
  110 LET C$=INKEY$: IF C$="" THEN GO TO 110
  120 IF C$="2" THEN GO TO 180
  121 IF C$<>"1" THEN GO TO 110
  125 REM SAVE FILE
  130 GO SUB 9000
  140 IF A$="" THEN GO TO 130
  150 PRINT #4: SAVE A$CODE 56658,8710
  160 REM PRINT #1;AT 1,0;"REWIND TAPE TO VERIFY "+CHR$ 18+CHR$ 1+A$: PRINT AT 17,0;: VERIFY A$CODE 
  170 RANDOMIZE USR 48620: GO TO (PEEK 65534+256*PEEK 65535)
  180 REM LOAD FILE
  185 GO SUB 9000
  190 PRINT #4: LOAD A$CODE 56658
  195 RANDOMIZE USR 48620: GO TO (PEEK 65534+256*PEEK 65535)
  200 REM QUIT
  210 STOP : GO TO 9998
 1000 GO SUB 8000
 1010 RANDOMIZE USR 50539: GO TO (PEEK 65534+256*PEEK 65535)
 1100 GO SUB 8000
 1110 RANDOMIZE USR 55583: GO TO (PEEK 65534+256*PEEK 65535)
 1200 GO SUB 8000
 1210 RANDOMIZE USR 55064: GO TO (PEEK 65534+256*PEEK 65535)
 1300 GO SUB 8000
 1310 RANDOMIZE USR 53682: GO TO (PEEK 65534+256*PEEK 65535)
 8000 REM COPY SCREEN
 8010 COPY : LPRINT : LPRINT 
 8020 RETURN 
 9000 INPUT "FILE NAME:"; LINE A$: IF LEN A$>9 THEN GO TO 9000
 9010 RETURN 
 9992 PRINT #4: SAVE "BUDGET.B8" LINE 1: PRINT #4: SAVE "BUDGET.C8"CODE 48518,8140
 9998 PRINT #4: LOAD "L.B1"
 9999 SAVE "BUDGET" LINE 1: SAVE "BUDGET"CODE 48518,8140: VERIFY "BUDGET": VERIFY "BUDGET"CODE

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