Program Layout

See all articles from CATS v1 n10
Publication: CATS Newsletter
Pub Details: CATS v1 n10 (Volume 1, Issue 10)
Date: January 1984
Pages: 9

Program layout is a very important consideration, now that the TS2068 is here with it’s MERGE feature.

Listed below is the standard program frame I use. This system allows me to MERGE specific subroutines, with out the fear of overwriting important program lines.

YoU will notice that the first 1000 lines are empty. In this area, the most frequented subroutines are stored.

Lines 1000 thru 1499 are used for the Menu or Body of the program. And lines to 5500 will be used for the body of the program

The lines at 9000 or more are used to store routines seldom accessed, such as initialization

Using this system, it will be practicable to have a tape with many different routines, which can be installed into your program at the flick of a switch.

Imagine, assembling a program from a library of ready made routines, with only a half a dozen written lines.

   1 REM  THIS AREA IS USED TO
2 REM STORE FREQUENTLY USED
3 REM ROUTINES
4 REM
5 REM MERGE AREA
10 REM
100 REM
500 REM
1000 REM **************
1001 REM * MENU *
1002 REM **************
1100 REM WRITE YOUR MENU IN THIS
1200 REM AREA
1300 REM
1400 REM
1410 IF LEN J$>1 THEN GO TO 1000
1420 IF CODE J$<49 OR CODE J$>56 THEN GO TO 1000
1450 GO SUB VAL J$*500+1000
1500 REM **************
1501 REM * ITEM NO. 1 *
1502 REM **************
1503 REM
2000 REM **************
2001 REM * ITEM NO. 2 *
2002 REM **************
2003 REM
2500 REM **************
2501 REM * ITEM NO. 3 *
2502 REM **************
2503 REM
3000 REM **************
3001 REM * ITEM NO. 4 *
3002 REM **************
3003 REM
3500 REM **************
3501 REM * ITEM NO. 5 *
3502 REM **************
3503 REM
4000 REM **************
4001 REM * ITEM NO. 6 *
4002 REM **************
4003 REM
4500 REM **************
4501 REM * ITEM NO. 7 *
4502 REM **************
4503 REM
5000 REM **************
5001 REM * ITEM NO. 8 *
5002 REM **************
5003 REM
5004 REM
5050 SAVE "PROGRAM" LINE 1000
5499 REM
6000 REM MERGE AREA
6001 REM
6002 REM
7000 REM MERGE AREA
7001 REM
7002 REM
8000 REM MERGE AREA
8996 REM
8997 REM
8998 REM
8999 REM
9900 REM INITIALIZATION
9901 REM
9902 REM THIS AREA IS USED TO
9903 REM INITIALIZE YOUR PROGRAM
9904 REM i.e.SET YOUR VARIABLES
9906 REM AS DONE BELOW
9907 REM
9912 DIM P$(X,12): PRINT "P$ = OFFICE PHONE"
9914 DIM D$(X,5): PRINT "D$ = DATE"
9916 DIM M$(X,4): PRINT "M$ = MEMBERSHIP #"
9918 DIM Q$(X,1): PRINT "Q$ = PAYMENT STATUS"
9920 DIM O$(X,15): PRINT "O$ = OCCUPATION"
9922 DIM E$(X,6): PRINT "E$ = EQUIPMENT"
9924 DIM I$(X,6): PRINT "I$ = INTERESTS"
9925 REM
9930 REM
9950 REM "CONSISTANCY IS A MOST
9960 REM IMPORTANT CRITERIA"
9970 REM ______________________

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