FLEXICALC is a spreadsheet application for the TS2068, developed by Saxon Computing in 1983. It supports configurable grids with user-defined numbers of rows and columns, formula storage, and named formula references encoded as single characters in the cell data array. The program uses a two-file loader structure: a small bootstrap (CFLEX) defines nine User-Defined Graphics (UDGs A–I) that form custom display characters, then chains to the main FLEXICALC program via LOAD. The main program stores all cell data in a dimensioned string array S$, encodes formula references as offset ASCII characters, and uses a set of numeric constants aliased through variables (O0–OL, etc.) as a memory-saving technique. Tape save/load operations split the spreadsheet state into three separate named data files: a parameters array, a data string array, and a formula string array.
Program Analysis
Program Structure
The program is delivered in two parts. The bootstrap loader (CFLEX) occupies a short program that defines nine UDGs (A through I) using POKE USR and BIN literals, then executes LOAD "FLEXICALC" to chain to the main application. The main program (FLEXICALC) is organized into clearly separated functional blocks:
- Lines 10–209: Initialization, display routines, and helper subroutines
- Lines 1010–1640: Tape load/save operations (three sub-files per spreadsheet)
- Lines 2010–2430: New file setup (dimensions, name)
- Lines 3010–3100: Screen color configuration
- Lines 4010–5902: Main spreadsheet editor and cursor movement
- Lines 6350+: Formula sub-menu dispatch (create, display, copy, kill, edit)
- Line 9010–9040: Top-level options menu
Constant Aliasing Scheme
A distinctive memory optimization is the use of short variable names as numeric constants throughout the program. Rather than embedding literal numbers, the code uses variables like O0, O1, O2, O3, etc. This reduces token storage because a two-character variable reference is shorter than a multi-digit numeric literal in many contexts. Key aliases inferred from context include:
| Variable | Value | Notes |
|---|---|---|
O0 | 0 | Zero constant |
O1 | 1 | One / step |
O2 | 2 | Two |
O3 | 3 | Three / column width related |
O4 | 4 | Four |
O5 | 5 | Five |
O6 | 6 | Six |
O7 | 7 | Seven |
O8 | 8 | Eight |
O9 | 9 | Nine / max name length |
OA | 10 | Column field width (chars per cell) |
OI | 48 (approx) | ASCII offset for formula chr encoding |
ON | Max rows allowed | Upper bound check |
FLN | Formula string length | DIM parameter for G$() |
Several variables also serve as GO SUB / GO TO targets (e.g., OB = menu line, OD, OE, OH, OI, OJ, OK, OL), compressing branch targets into short variable dereferences.
Data Storage Model
Cell data is stored in a two-dimensional string array S$ dimensioned as S$(C, C1*OA+O1), where C is the number of rows and C1 is the number of columns. Each cell occupies exactly OA (10) characters within a row string, accessed via calculated substrings. The user-defined functions FN U() and FN T() compute the start and end character positions of the current cell: K*10-8 and K*10 respectively, where K is the column index.
Formula references within cells are encoded as a single character: CHR$(Z + OI) where Z is the formula number and OI is an ASCII offset (approximately 48, the digit zero). A formula reference is detected by testing whether the first character of a cell’s field is non-space, then recovering the formula index with CODE ... - OI.
Formula System
Formulas are stored as strings in F$(A, 42). At compute time, the subroutine at line 132 performs a source-to-source translation of each formula string into an evaluable BASIC expression stored in G$(). The translation loop (lines 134–144) scans for the special token "B" in the formula text, which marks a cell reference. When found, it expands the reference into a substring expression of the form (VAL S$(L-row, (K+col)*10-8 TO (K+col)*10)), enabling relative row and column offsets. This is effectively a runtime formula compiler written in BASIC.
Two special formula prefixes are recognized at evaluation time: "R" (line 150/152) triggers a row-range summation loop, and "C" (line 160/162) triggers a column-range summation loop, both with direction determined by SGN(T2-T1) to support either ascending or descending ranges.
Cursor and Navigation Model
The editor uses a key-dispatch table at line 4140: LET Z=CODE INKEY$: IF Z<91 THEN GO TO Z*OA+5000. Multiplying the ASCII code of a keypress by 10 and adding 5000 maps each letter key to a handler line. For example, key ‘E’ (code 69) dispatches to line 5690, ‘C’ to 5650, ‘L’ to 5760, ‘X’ to 5880, ‘Z’ to 5900. This avoids a long IF/THEN chain.
A “lock” mode (LV=O4) splits the screen to show a frozen left panel of row labels alongside a scrolling data area, implemented by maintaining two separate Y-position variables (YL for locked, Y for the scrolling view). The lock toggle at line 5760–5764 adjusts LH (left-hand column boundary), G (top visible row), and the header display.
Tape File Organization
Each spreadsheet is saved to three separate tape files suffixed "P" (parameters numeric array A()), "D" (data string array S$()), and "F" (formula string array F$()). The load/save dispatcher at lines 1080–1120 computes the correct subroutine address with GO SUB VAL Z$*OI+1400, where Z$ is "1" for load and "2" for save, and OI (≈48) maps these to offsets that land on lines 1448/1448+offset etc. This arithmetic dispatch avoids an explicit branch.
UDG Definitions (Bootstrap)
The CFLEX loader defines UDGs A–I as custom block graphics. The patterns use BIN literals for each of the 8 rows of an 8×8 character. UDG E and F define left and right border bracket shapes (open on three sides), while G and H define top and bottom bracket shapes. UDG I (BIN 01111110 for all 8 rows) creates a solid vertical bar pattern. These likely form a box-drawing or highlight frame for the spreadsheet display.
Memory Management
Line 2120 computes the maximum number of columns dynamically: LET X=INT(((28000-A*162)/OA)/C), where 28000 is an estimated free memory budget, 162 bytes is the estimated per-formula overhead, and the result is clamped to 140. A secondary check at line 2130 caps C*X at 2000 to prevent the data array from exceeding approximately 20,000 characters. This runtime memory planning allows the spreadsheet dimensions to adapt to the available RAM and formula count.
Notable Anomalies
- Line 1015 contains a
FOR/NEXTloop with no body (FOR L=O1 TO 20: NEXT L) used purely as a short delay after displaying the load/save menu, giving the user time to read it before key input begins. - The formula display subroutine at lines 7151–7156 pages through formulas four at a time, waiting for key
"N"between pages—a simple pagination pattern implemented without arrays of line addresses. - The
POKE 23609,65at line 10 sets the keyboard repeat delay system variable, reducing key auto-repeat sensitivity during cursor navigation. - The formula sub-menu dispatch at line 5706 uses
GO TO 6350+(10*Z)whereZis the ASCII code of the pressed key, following the same multiply-and-offset idiom as the main editor dispatch.
Content
Source Code
0 REM CFLEX \*SAXON COMPUTING 1983
109 POKE USR "A",BIN 11111111: POKE USR "A"+1,BIN 11101111 : POKE USR "A"+2,BIN 11000111: POKE USR "A"+3,BIN 10101011: FOR L=4 TO 7: POKE USR "A"+L,BIN 11101111: NEXT L
110 POKE USR "B",BIN 11111111: POKE USR "B"+1,BIN 11110111: POKE USR "B"+2,BIN 10111111: POKE USR "B"+3,BIN 00000001: POKE USR "B"+4,BIN 10111111: POKE USR "B"+5,BIN 11011111: FOR L=6 TO 7: POKE USR "B"+L,BIN 11111111: NEXT L
112 POKE USR "C",BIN 11111111: POKE USR "C"+1,BIN 11110111: POKE USR "C"+2,BIN 11111011: POKE USR "C"+3,BIN 00000001: POKE USR "C"+4,BIN 11111011: POKE USR "C"+5,BIN 11110111: FOR L=6 TO 7: POKE USR "C"+L,BIN 11111111: NEXT L
114 FOR L=0 TO 3: POKE USR "D"+L,BIN 11110111: NEXT L: POKE USR "D"+4,BIN 11010101 : POKE USR "D"+5,BIN 11100011: POKE USR "D"+6,BIN 11110111: POKE USR "D"+7,BIN 11111111
116 POKE USR "E",BIN 11100000: FOR L=1 TO 6: POKE USR "E"+L,BIN 10000000: NEXT L: POKE USR "E"+L,BIN 11100000
119 POKE USR "F",BIN 00000111: FOR L=1 TO 6: POKE USR "F"+L,BIN 00000001: NEXT L: POKE USR "F"+L,BIN 00000111
120 POKE USR "G",BIN 11111111: POKE USR "G"+1,BIN 10000001: POKE USR "G"+2,BIN 10000001: FOR L=3 TO 7: POKE USR "G"+L,BIN 00000000: NEXT L
122 FOR L=0 TO 4: POKE USR "H"+L,BIN 00000000: NEXT L: POKE USR "H"+5,BIN 10000001: POKE USR "H"+6,BIN 10000001: POKE USR "H"+7,BIN 11111111
124 FOR L=0 TO 7: POKE USR "I"+L,BIN 01111110: NEXT L
126 LOAD "FLEXICALC"
0 REM FLEXICALC \* SAXON COMPUTING 1983
2 REM VERSION 1.3
10 POKE 23609,65: DEF FN U()=K*10-8: DEF FN T()=K*10: DEF FN V$()=S$(G+E-LV,Y-10*(LV=4)+D-4 TO Y-10*(LV=4)+D+4): GO TO 9000
102 PRINT AT O1,O0; INVERSE O1;" "+B$(Y TO X): LET J=G+14
104 FOR L=G TO J: LET S=(L-G)+O2: PRINT AT S,O0; INVERSE O1;C$(L*O3-O2 TO L*O3); INVERSE O0;AT S,O3;S$(L,Y-O1 TO X-O1);AT S,OC;" ";AT S,OM;" ": NEXT L
106 LET P$=FN V$(): PRINT AT E,D; INVERSE O1;P$: GO SUB OD: GO TO 4140
112 PRINT AT OF,O0;"E enter data F formula edit C compute L lock on/off X exit to menu Z copy screen",R$;" to move the cursor"
119 RETURN
122 FOR J=O4 TO 16: PRINT AT J,O0;" ": NEXT J: RETURN
132 FOR J=O1 TO F: LET Z$="": LET B=O1
134 IF F$(J,B)="B" THEN GO TO 142
136 LET Z$=Z$+F$(J,B): LET B=B+O1
138 IF B>LEN F$(J) THEN GO TO 144
140 GO TO 134
142 LET Z$=Z$+"(VAL S$(L-"+STR$ (VAL F$(J,B+1 TO B+3))+",(K+"+STR$ (VAL F$(J,B+5 TO B+8))+")*10-8 TO (K+"+STR$ (VAL F$(J,B+5 TO B+8))+")*10))": LET B=B+9: GO TO 138
144 LET G$(J)=Z$: NEXT J
149 LET FCF=1: RETURN
152 LET Z=O0: LET T1=VAL G$(W,O2 TO O3): LET T2=VAL G$(W,O5 TO O6): LET STP=SGN (T2-T1): FOR J=T1 TO T2 STEP STP: LET Z=Z+VAL S$(L,(K-J)*10-8 TO (K-J)*10): NEXT J: GO TO 5676
162 LET Z=O0: LET T1=VAL G$(W,O2 TO O3): LET T2=VAL G$(W,O5 TO O6): LET STP=SGN (T2-T1): FOR J=T1 TO T2 STEP STP: LET Z=Z+VAL S$(L-J,K*10-8 TO K*10): NEXT J: GO TO 5676
170 PRINT AT O1,LH; INVERSE O1;B$(Y TO X): LET J=G+OC
172 FOR L=O2 TO O3: PRINT AT L,13;S$(GL+L-O2,Y-O1 TO X-O1);AT L,OM;" ": NEXT L
174 FOR L=G TO J: LET S=L-G+O4: PRINT AT S,13;S$(L,Y-O1 TO X-O1);AT S,OM;" ": NEXT L: IF Z<>80 THEN GO TO 106
180 LET J=G+OC
182 FOR L=G TO J: LET S=L-G+O4: PRINT AT S,O0; INVERSE O1;C$(L*O3-O2 TO L*O3); INVERSE O0;AT S,O3;S$(L,YL-O1 TO YL+O8);AT S,12;" ";AT S,13;S$(L,Y-O1 TO X-O1);AT S,OM;" ": NEXT L: GO TO 106
202 GO SUB 210: LET B$=" ": FOR L=O1 TO C1: LET Z$=STR$ L: LET B$=B$+Z$+A$( TO OA-LEN Z$): NEXT L: LET B$=B$+" "
204 LET C$=" ": FOR L=O1 TO C: LET Z$=STR$ L: LET C$=C$+Z$+A$( TO O3-LEN STR$ (L+O1)): NEXT L
206 LET T=C1*OA-29: LET SFC=O1
209 RETURN
210 PRINT AT OG,O0; FLASH O1;"COMPUTATION IN PROGRESS": RETURN
220 PRINT AT OG,0;" ": RETURN
230 PRINT AT OG,O0; FLASH O1;"OK JOB DONE. PRESS M TO CONTINUE": IF INKEY$<>"M" THEN GO TO 230
232 GO SUB OD: GO SUB OH: GO TO OE
250 PRINT AT OG,O2; FLASH O1;"ENTER START ROW"
251 INPUT SR: IF SR<O1 OR SR>C OR SR<>INT SR THEN GO TO 251
252 PRINT AT OG,O2; FLASH O1;"ENTER FINISH ROW"
253 INPUT FR: IF FR<SR OR FR>C OR FR<>INT FR THEN GO TO 253
254 PRINT AT OG,O2; FLASH O1;"ENTER START COLUMN"
255 INPUT SC: IF SC<O1 OR SC>C1 OR SC<>INT SC THEN GO TO 255
256 PRINT AT OG,O2; FLASH O1;"ENTER FINISH COLUMN"
257 INPUT FC: IF FC<SC OR FC>C1 OR FC<>INT FC THEN GO TO 257
259 RETURN
1010 CLS : PRINT "****** LOAD OR SAVE A FILE *****": PRINT '"Press L to LOAD","Press S to SAVE"
1015 FOR L=O1 TO 20: NEXT L
1020 LET Z$=INKEY$: IF Z$<>"L" AND Z$<>"S" THEN GO TO 1020
1030 LET M$="LOAD": IF Z$="S" THEN LET M$="SAV"
1040 PRINT '"ENTER NAME OF FILE TO BE ";M$;"ED","(max 9 characters) ";
1050 DIM X$(OA): INPUT N$: IF LEN N$>O9 THEN GO TO 1050
1060 PRINT N$
1070 PRINT '" START TAPE THEN PRESS G "
1075 IF INKEY$<>"G" THEN GO TO 1075
1080 IF Z$="L" THEN LET Z$="1"
1085 IF Z$="S" THEN LET Z$="2"
1100 PRINT AT OF,O2; FLASH O1;M$;"ING PARAMETERS FILE": GO SUB VAL Z$*OI+1400
1110 PRINT AT OF,O2; FLASH O1;M$;"ING DATA FILE ": GO SUB VAL Z$*OI+1420
1120 PRINT AT OF,O2; FLASH O1;M$;"ING FORMULA FILE ": GO SUB VAL Z$*OI+1440
1200 PRINT AT OF,O0; FLASH O1;" TAPE OPERATIONS COMPLETED "'" PRESS X TO RETURN TO MENU "
1210 LET Z$=INKEY$: BEEP .5,O8: IF Z$<>"X" THEN GO TO 1210
1220 GO TO OB
1500 LET X$=N$+"P": LOAD X$ DATA A(): LET C=A(O1): LET C1=A(O2): LET A=A(O3): LET F=A(O4): DIM S$(C,C1*OA+O1): DIM F$(A,32): DIM G$(A,FLN): RETURN
1520 LET X$=N$+"D": LOAD X$ DATA S$(): RETURN
1540 LET X$=N$+"F": LOAD X$ DATA F$(): LET SFC=O0: LET FCF=O0: RETURN
1600 LET A(O4)=F: LET X$=N$+"P": BEEP O2,O8: SAVE X$ DATA A(): RETURN
1620 LET X$=N$+"D": BEEP O2,O8: SAVE X$ DATA S$(): RETURN
1640 LET X$=N$+"F": BEEP O2,O8: SAVE X$ DATA F$(): RETURN
2010 CLS : PRINT "******* SET UP A NEW FILE ******"
2020 PRINT '"ENTER THE NUMBER OF FORMULAE TO BE USED ";
2030 INPUT A: IF A<O1 OR INT A<>A THEN GO TO 2030
2040 PRINT TAB 29;A
2100 PRINT ''"ENTER THE NUMBER OF ROWS IN","YOUR MODEL";
2110 INPUT C: IF C<15 OR C>ON OR INT C<>C THEN GO TO 2110
2120 PRINT TAB 29;C: LET X=INT (((28000-A*162)/OA)/C): IF X>140 THEN LET X=140
2130 IF C*X>2000 THEN LET X=INT (2000/C)
2200 PRINT '"ENTER THE NUMBER OF COLUMNS","IN YOUR MODEL (max ";X;")";
2210 INPUT C1: IF C1<O3 OR C1>X THEN GO TO 2210
2220 PRINT TAB 29;C1
2300 PRINT '"ENTER THE NAME OF THIS FILE","(max 9 characters) ";
2310 INPUT N$: IF LEN N$>O9 THEN GO TO 2310
2320 PRINT N$''"ACCEPT ? (Press Y or N)"
2330 LET Z$=INKEY$: IF Z$<>"Y" AND Z$<>"N" THEN GO TO 2330
2340 IF Z$="N" THEN GO TO 2010
2400 LET F=O0: DIM A(O4): LET A(O1)=C: LET A(O2)=C1: LET A(O3)=A: DIM S$(C,C1*OA+O1): DIM F$(A,42): DIM G$(A,FLN): LET SFC=O0: LET FCF=O0
2410 PRINT '"FILE NOW SET UP"' FLASH O1;"PRESS X TO RETURN TO MENU"
2420 LET Z$=INKEY$: IF Z$<>"X" THEN GO TO 2420
2430 GO TO OB
3010 CLS : PRINT "****** SET SCREEN COLOURS ******"
3020 PRINT '"ENTER NUMBER OF BORDER COLOUR ";
3030 INPUT BC: IF BC<O0 OR BC>O7 OR INT BC<>BC THEN GO TO 3030
3040 PRINT BC''"ENTER NUMBER OF PAPER COLOUR ";
3050 INPUT PA: IF PA<O0 OR PA>O7 OR INT PA<>PA THEN GO TO 3050
3060 PRINT PA''"ENTER NUMBER OF INK COLOUR ";
3070 INPUT IK: IF IK<O0 OR IK>O7 OR INT IK<>IK OR IK=PA THEN GO TO 3070
3080 PRINT IK'' FLASH O1;"PRESS X TO RETURN TO MENU"
3085 INK IK: PAPER PA: BORDER BC
3090 LET Z$=INKEY$: IF Z$<>"X" THEN GO TO 3090
3100 GO TO OB
4010 CLS : IF C<>O0 THEN GO TO 4100
4020 PRINT AT OA,O0; FLASH O1;"NO FILE PRESENT TO PROCESS PRESS X TO RETURN TO MENU "
4030 LET Z$=INKEY$: IF Z$<>"X" THEN GO TO 4030
4040 GO TO OB
4100 IF SFC=O0 THEN GO SUB 200
4105 LET D=O3: LET E=O2: CLS : PRINT "CURRENT FILE IS "; BRIGHT O1;N$
4110 GO SUB OH
4120 LET LV=O2: LET Y=O3: LET X=31: LET G=O1: LET P$=FN V$()
4130 GO TO 5763
4140 LET Z=CODE INKEY$: IF Z<91 THEN GO TO Z*OA+5000
5075 GO TO OE
5080 IF D<=LH THEN GO TO 5084
5082 LET Q$=FN V$(): PRINT AT E,D;Q$: LET D=D-OA
5083 LET P$=FN V$(): PRINT AT E,D; INVERSE O1;P$: GO TO OE
5084 IF Y<=LH THEN GO TO 5086
5085 LET Y=Y-OA: LET X=X-OA: PRINT AT O1,LH; INVERSE O1;B$(Y TO X): IF CODE INKEY$=O8 THEN GO TO 5084
5086 IF LV=O4 THEN GO TO OJ
5089 GO SUB OI: GO TO OE
5090 IF D>OM THEN GO TO 5094
5092 LET Q$=FN V$(): PRINT AT E,D;Q$: LET D=D+OA
5093 LET P$=FN V$(): PRINT AT E,D; INVERSE O1;P$: GO TO OE
5094 IF Y>T+OA*(LV=4) THEN GO TO 5096
5095 LET Y=Y+OA: LET X=X+OA: PRINT AT O1,LH; INVERSE O1;B$(Y TO X): IF CODE INKEY$=9 THEN GO TO 5094
5096 IF LV=O4 THEN GO TO OJ
5099 GO SUB OI: GO TO OE
5100 IF E>15 THEN GO TO 5104
5103 LET Q$=FN V$(): PRINT AT E,D;Q$: LET E=E+O1: LET P$=FN V$(): PRINT AT E,D; INVERSE O1;P$: GO TO OE
5104 IF G<C-14 THEN LET G=G+O1
5105 PRINT AT LV,O0; INVERSE O1;C$(G*O3-O2 TO G*O3): IF CODE INKEY$=10 THEN GO TO 5104
5106 IF LV=O4 THEN GO TO OK
5109 GO SUB OI: GO TO OE
5110 IF E<=LV THEN GO TO 5114
5113 LET Q$=FN V$(): PRINT AT E,D;Q$: LET E=E-O1: LET P$=FN V$(): PRINT AT E,D; INVERSE O1;P$: GO TO OE
5114 IF G>LV-O1 THEN LET G=G-O1
5115 PRINT AT LV,O0; INVERSE O1;C$(G*O3-O2 TO G*O3): IF CODE INKEY$=11 THEN GO TO 5114
5116 IF LV=O4 THEN GO TO OK
5119 GO SUB OI
5650 GO TO OE
5651 GO SUB 250: GO SUB 210: FOR L=SR TO FR: FOR K=SC TO FC: IF S$(L,K*OA-9)=" " THEN GO TO 5653
5652 LET Z=CODE S$(L,K*OA-O9)-OI: LET S$(L,FN U() TO FN T())="FORM "+STR$ Z
5653 NEXT K: NEXT L: GO SUB OH: IF LV=O2 THEN GO SUB OI: RETURN
5654 GO SUB OK: RETURN
5665 GO TO OE
5671 GO SUB 250: GO SUB 210: IF FCF=O0 THEN GO SUB 130
5672 FOR L=SR TO FR: FOR K=SC TO FC: IF S$(L,K*OA-O9)=" " THEN GO TO 5677
5673 LET W=CODE S$(L,K*OA-O9)-OI: IF G$(W,O1)="R" THEN GO TO 150
5674 IF G$(W,O1)="C" THEN GO TO 160
5675 LET Z=VAL G$(W)
5676 LET S$(L,FN U() TO FN T())=STR$ Z
5677 NEXT K: NEXT L: IF LV=O2 THEN GO SUB OI: GO TO 5679
5678 GO SUB OK
5685 GO TO OE
5692 PRINT AT OG,OA; FLASH O1;"ENTER DATA": INPUT D$: IF LEN D$>O9 THEN LET D$=D$( TO O9)
5694 LET S$(G+E-LV,Y-OA*(LV=O4)+D-O4 TO Y-OA*(LV=O4)+D+O4)=D$: PRINT AT E,D;" ": PRINT AT E,D;D$: PRINT AT OG,OA;" "
5696 LET P$=FN V$(): PRINT AT E,D; INVERSE O1;P$
5699 GO TO OE
5702 PRINT AT OF,O0;"C create P display U formula usage A copy across D copy down E edit(change) K kill X exit "
5703 PRINT AT OG,O0;" "
5704 LET Z=CODE INKEY$: IF Z<65 OR Z>88 THEN GO TO 5704
5706 GO TO 6350+(10*Z)
5759 GO TO OE
5760 IF LV=O2 THEN GO TO 5764
5762 LET Y=Y-OA: LET G=G-O2
5763 LET LH=O3: LET LV=O2: PRINT AT O0,24; INVERSE O1;"LOCK OFF": GO TO OI
5764 LET YL=Y: LET Y=Y+OA: LET LH=13: LET LV=O4: LET GL=G: LET G=G+2: PRINT AT O0,24; INVERSE O1;"LOCK ON ": FOR L=O1 TO OM: NEXT L
5875 GO TO OE
5882 GO TO OB
5895 GO TO OE
5902 COPY : GO TO OE
7000 PRINT AT OG,O0; FLASH O1;"ENTER FORMULA NUMBER"
7001 INPUT Z: IF Z<O1 OR Z>F OR INT Z<>Z THEN GO TO 7001
7002 LET Z$=CHR$ (Z+OI): PRINT AT OG,O0; FLASH O1;"COPY TO WHICH COLUMN ?"
7003 INPUT W: IF W>C1 OR INT W<>W OR W<(Y+D)/OA-O3 THEN GO TO 7003
7004 FOR L=Y-OA*(LV=O4)+D-O5 TO W*OA STEP OA: LET S$(G+E-LV,L)=Z$: NEXT L
7009 GO TO 230
7019 GO TO OL
7021 LET F=F+O1: IF F<=A THEN GO TO 7025
7022 PRINT AT OG,O0; FLASH O1;"NO SPACE FOR ANY NEW FORMULA": PAUSE OI: PRINT AT OG,O0; FLASH O1;"PRESS C TO CONTINUE ": LET F=F-O1
7023 IF INKEY$<>"C" THEN GO TO 7023
7024 GO SUB OD: GO TO 230
7025 PRINT AT OG,O0; FLASH O1;"ENTER FORMULA NO. ";F: INPUT Z$: LET F$(F)=Z$: LET FCF=O0: GO TO 230
7029 GO TO 5703
7030 PRINT AT OG,O0; FLASH O1;"ENTER FORMULA NUMBER"
7031 INPUT Z: IF Z<O1 OR Z>F OR INT Z<>Z THEN GO TO 7031
7032 PRINT AT OG,O0; FLASH O1;"COPY TO WHICH ROW ? ": LET Z$=CHR$ (Z+OI)
7033 INPUT W: IF W>C OR INT W<>W OR W<G+E-O2 THEN GO TO 7033
7034 FOR L=G+E-LV TO W: LET S$(L,Y-10*(LV=4)+D-O5)=Z$: NEXT L
7039 GO TO 230
7040 PRINT AT OG,O0; FLASH O1;"NO. OF FORMULA TO BE CHANGED ?"
7041 INPUT Z: IF Z<O1 OR Z>F OR INT Z<>Z THEN GO TO 7041
7042 PRINT AT OG,O0; FLASH O1;"ENTER REVISED FORMULA ": INPUT Z$: LET F$(Z)=Z$: LET FCF=O0
7049 GO TO 230
7099 GO TO OL
7100 LET S$(G+E-LV,Y-OA*(LV=O4)+D-O5)=" ": GO TO 230
7149 GO TO OL
7151 FOR L=O1 TO A STEP O4: GO SUB 120: PRINT AT O4,O0;" ": FOR K=O1 TO O4: IF K+L-O1>A THEN GO TO 7153
7152 PRINT K+L-O1;" ";F$(K+L-O1)
7153 NEXT K: PRINT FLASH O1;"PRESS N FOR MORE FORMULAE"
7154 IF INKEY$<>"N" THEN GO TO 7154
7155 NEXT L: IF LV=O2 THEN GO SUB OH: GO TO OI
7156 GO SUB OJ: GO SUB OK: GO TO 232
7199 GO TO 5705
7200 GO SUB 5651: GO TO 230
7229 GO TO OL
7230 GO SUB OH: FOR L=O1 TO OM: NEXT L
7595 GO TO OE
9010 CLS : PRINT TAB O8; INVERSE O1;"SAXON COMPUTING"; INVERSE O0;''"****** FLEXICALC OPTIONS *******"
9020 PRINT ''" Press 1 to LOAD OR SAVE A FILE"''" Press 2 to SET UP A NEW FILE"''" Press 3 to SET SCREEN COLOURS"''" Press 4 to WORK ON THE CURRENT ","FILE"
9030 LET Z$=INKEY$: IF CODE Z$<49 OR CODE Z$>52 THEN GO TO 9030
9040 GO TO VAL Z$*1000
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.

