Pro/File Plus is a database management program that stores and searches records in a large string array, using machine code routines called via RANDOMIZE USR and USR to handle low-level data operations. The program supports multi-word Boolean search queries using AND, NOT, and OR tokens, and includes a full-screen text editor for entering and modifying records with insert/overwrite toggle, cursor movement, and line manipulation via SHIFT-key codes. Files are saved and loaded as raw CODE blocks at a fixed memory address derived from PEEK 23627 and PEEK 23628, allowing the entire data area to be preserved to tape. Additional features include configurable print formats specified by line numbers and separators, auto-sort via a machine code sort routine at address 64731, date stamping, copy, delete, and edit operations on individual records, and running totals accumulated during searches.
Program Analysis
Program Structure
Pro/File Plus is organized into functional blocks, each occupying a distinct line-number range. The initialization and startup code lives at lines 9990–9999, the main menu and command dispatch at lines 5–115, record display and search control at lines 1000–2000, file add/edit routines at lines 5000–5117, AUTO search at lines 5200–5441, LOAD/SAVE at lines 5500–8230, print-format definition at lines 6400–6600, machine-code-assisted search output at lines 7000–7311, value accumulation at lines 9200–9260, and utility subroutines at lines 9100–9850. GO TO targets are encoded as VAL "nnnn" throughout, a standard memory optimization.
Initialization and Variable Conventions
Line 9996 sets up all numeric constants as short single-letter variables, a classic technique to save memory and speed up execution:
O = 0(NOT PI rounded)U = 1(SGN PI)H = 2F = 4G = 7K = 10J = 15Q = 32(CODE ” “, used as the column width of records)R = 256
The main data store is DIM d$(27379), a single large string used as a flat byte array for all records. The current file pointer is P, initialized to 29. Record display uses DIM e$(15,32), a 15-row by 32-column string array representing one screenful of record lines.
Machine Code Integration
The program makes heavy use of machine code routines residing in high RAM, called via RANDOMIZE USR and USR in expressions. The key entry points are:
| Address | Purpose |
|---|---|
| 63489 | String-to-record processing (used in file add loop) |
| 63530 | Returns new file pointer after adding records |
| 63575 | Reads next record from data store into e$(1) |
| 63640 | Returns record size (used to step pointer back) |
| 63792 | Numeric validity test (for SUM accumulation) |
| 64022–64027 | Saved/restored file-pointer state for search restart |
| 64035–64036 | Random seed mirror of system vars 23670–23671 |
| 64040 | Boolean search engine entry point |
| 64046 | Variant search entry (used when changing search mid-stream) |
| 64268 | Initialization routine (called at line 4) |
| 64523 | AUTO search / ordered scan entry point |
| 64731 | Sort routine; POKE 64602,S sets sort field |
| 65101 | Returns current record count or position |
The machine code is loaded as a CODE block at address 63488 with length 2046 bytes (lines 9000, 9990). The BASIC program saves and reloads this block alongside the BASIC itself.
Screen Editor (Lines 5000–5117)
The built-in full-screen editor allows entry and modification of records in a 15×32 grid stored in e$(). It implements:
- Insert/overwrite toggle via key code 7 (
iflag) - Cursor movement: left (8), right (9), down (10), up (11)
- Line delete (4), line erase to end (5), line insert (20/SYMBOL SHIFT)
- Delete character left (12), caps lock indicator (6)
- ENTER advances to next line (key code 13)
- Cursor flash using
FLASH 1on the character under the cursor - The insert mode is shown by printing the cursor character in INK 7 (white); overwrite in INK 2 (red)
The editor dispatches on CODE y$ via computed GO TO 5100+CODE y$ for control keys (codes 1–17), and falls through to character insertion for printable input.
Search System
The primary search command is entered at line 100. The machine code at 64040 performs the actual Boolean match, with the result returned via j$ (a single character peeked from address 23670 after the USR call). Search modes include:
- Normal forward search with counted hits (
T1) - AUTO mode (line 5200) which sorts before searching and can print results via
LPRINT - Mid-search command change using
>or>=options, which saves and restores the file pointer - Restart (
R) resets all counters and re-runs from the beginning
The variable Y acts as a print flag (1 = print to LPRINT, 0 = screen only), and Y$ doubles as both the sort-field selector and the post-display option response.
Print Format Definition (Lines 6500–6600)
The DEFP command allows the user to specify which record lines to print and in what order, using a format string of line numbers separated by / or .. The format is compiled into C$, a string where each character is either a line-number byte or a CHR$ 0 newline marker. The D flag distinguishes between suppressing blank lines (D=1) and printing them anyway (D=0). "ALL/" expands to all 15 lines.
File Storage Format
The entire database lives in d$(), a 27379-byte string. Records are stored sequentially from position 29 onward; the first 28 bytes hold the filename (bytes 2–6), record count as a string (bytes 11–16), and date (bytes 21–26). The file pointer P tracks the current read position. SAVE and LOAD use CODE blocks anchored to the address obtained from PEEK 23627 + 256*PEEK 23628, which is the start of the d$() data in RAM.
ON ERR Usage
ON ERR is used defensively in several places: line 5007 loops back to the cursor flash on any error during editing, line 5016 resets on tape errors during search character input, line 60 catches tape errors and displays them, and line 9400 handles BREAK during search by setting Y$=" STOP " and continuing gracefully.
Notable Idioms and Techniques
PAUSE O: LET x$=INKEY$— efficient single keypress wait without a polling loopGO TO CODE "w"evaluates toGO TO 119(ASCII ‘w’ = 119), a compact redirect to line 119GO TO CODE "n"→ line 110;GO TO CODE "i"→ line 105; similar tricks throughoutLET X$=X$at lines 119, 1058, etc. — forces the string through the expression evaluator, likely to normalize it for the machine code search parserB=(PEEK 64024 + R*PEEK 64025)— reading a 16-bit little-endian value from two consecutive POKEd bytes- Line 9830 draws a decorative border box using
DRAWwith computed pixel lengths derived fromVAL "134"andVAL "48"
Potential Anomalies
- Line 1000 uses a bare
IF USR VAL "63575" THENwith no following statement — the THEN clause is empty, relying on the side effect of the USR call loading data intoe$(1)regardless of the return value. The conditional simply skips the next line if the USR returns nonzero (end-of-file). This is intentional. - Line 5235 does
LET A=O: GO TO K*Kwhich isGO TO 100, returning to the main search prompt — correct behavior when the user declines to sort. - Line 9991 uses
DELETE VAL "8999",VAL "9000"to remove the bootstrap lines after first run, cleaning up the program in memory.
Content
Source Code
3 LET D$( TO J+F)="*SEARCH IS COMPLETE": POKE VAL "23609",E: LET J$="": LET a=O: LET x$="": LET t=O: LET t0=O
4 RANDOMIZE p: POKE VAL "64035",PEEK VAL "23670": POKE VAL "64036",PEEK VAL "23671": RANDOMIZE USR VAL "64268"
5 IF INKEY$=" " THEN ON ERR GO TO VAL "9400": PRINT AT VAL "21",O; FLASH U;"BREAK TO EXIT/ENTER TO CONTINUE ": PAUSE O: GO TO F+U
6 BORDER O: PAPER O: LET y=O: DIM e$(J,Q): CLS
9 IF J$="U" THEN LET X$=X$: GO TO CODE "w"
10 IF y$="D" OR y$=" STEP " THEN POKE VAL "64022",PEEK VAL "64026": POKE VAL "64023",PEEK VAL "64027": LET B=(PEEK VAL "64024"+R*PEEK VAL "64025")+B: POKE VAL "64024",B-R*INT (B/R): POKE VAL "64025",INT (B/R): GO TO J*K
20 PRINT AT U,G; PAPER INT PI; INK O;" PRO/FILE PLUS 5 ": PRINT INK G-U;AT INT PI,F;"Separate MULTI-WORD";TAB F;"command words with the";TAB F;"tokens ""AND"", ""NOT"", ""OR"""
30 INK G: PLOT CODE "x",CODE "CODE ": GO SUB VAL "9830": INK F+U
40 INK INT PI: PRINT AT G,O;: GO SUB VAL "9850"
50 INK G-U: PRINT AT G+G,O;"A)dd files","T)ick on/off","AUTO)search","DEFP)rint formatDATE files","EDIT phrase","""SAVE"" ""LOAD"" ""MERGE"""
60 ON ERR RESET : IF x$="TAPE ERROR" THEN PRINT AT K+K,F+U; FLASH U;X$
100 LET T1=O: INPUT "SEARCH COMMAND? ";X$: IF X$="NN" THEN GO TO VAL "9998"
101 IF X$="EDIT" THEN INPUT "EDIT PHRASE: ";P$: GO TO U
102 IF x$="DEFP" THEN PRINT AT G+G,O;: PLOT CODE "x",G*K: GO SUB VAL "6500": INK O: GO SUB VAL "9830": INK G: PRINT AT G+H,G;A$; INK O;E$(U);E$(U);E$(U): GO TO CODE "2"
103 IF x$="AUTO" THEN GO TO VAL "5200"
104 IF X$="RST" THEN LET P=VAL "29": GO TO U
105 IF X$="DATE" THEN INPUT "NEW DATE: ";D$(VAL "21" TO G*F): GO TO U
106 INK F+U: CLS : IF x$="A" THEN GO TO VAL "5000"
107 IF x$="LOAD" OR X$="MERGE" THEN GO TO VAL "5500"
108 IF X$="SAVE" THEN GO TO VAL "8200"
109 IF X$="T" THEN LET E=ABS (E-K): GO TO U
110 IF x$="" THEN GO TO K
115 IF x$(LEN x$)=" AND " OR LEN X$>VAL "50" THEN GO TO K
119 LET X$=X$
120 RANDOMIZE USR VAL "64040"
130 LET j$=CHR$ PEEK VAL "23670": IF J$="T" OR J$="S" THEN INPUT "WHICH LINE TO CALCULATE?";RW: IF RW<U OR RW>J THEN GO TO VAL "130"
145 IF A=O THEN IF J$="U" THEN LET Z$="0": LET A=U: LET Y=O: LET Y$=" STEP ": INPUT "WHICH LINE TO CHANGE? ";L: INPUT "WHAT DATA TO CHANGE? ";P$: INPUT "WHAT IS NEW DATA? ";Q$: IF LEN Q$<U OR LEN Q$>Q OR L<U OR L>J THEN LET A=O: GO TO VAL "145"
150 LET B=USR VAL "65101": CLS
1000 PRINT AT O,O;: DIM E$(J,Q): LET e$(U)="": IF USR VAL "63575" THEN
1010 IF (A=O OR J$="U") AND e$(U, TO VAL "18")=d$(H TO J+F) AND b<p THEN CLS : GO TO J*K
1020 IF B<P THEN LET T1=T1+U: IF Y AND A=O THEN GO TO VAL "7203"
1040 PRINT AT K+K,O;X$
1045 IF A THEN GO TO VAL "7000"
1047 PRINT AT K+K,O;X$
1049 LET T0=T0-(T0 AND J$="S"): IF e$(U, TO VAL "18")<>D$(H TO J+F) AND CODE j$>Q THEN GO TO VAL "8500"+CODE J$
1050 GO SUB VAL "9100": PAPER F+U: INK O: PRINT AT J+U,O;"Press ENTER to continue","C)opy D)elete E)dit A)dd fileG)oto menu R)estart searchM)ore info TYPE SEARCH COMMAND": INPUT "OPTION? ";Y$
1051 IF Y$="M" THEN PAPER O: INK F+U: PRINT AT J+U,O;: GO SUB VAL "9850": INPUT "OPTION? ";Y$: IF Y$="M" THEN GO TO VAL "1050"
1055 PAPER O: INK F+U
1056 IF Y$=">" OR Y$=">=" THEN LET L=PEEK VAL "64022": LET C=PEEK VAL "64023": INPUT "NEW SEARCH COMMAND? ";X$: IF X$="" THEN GO TO VAL "1056"
1057 IF Y$=">" OR Y$=">=" THEN IF X$(LEN X$)=" AND " OR LEN X$>Q THEN GO TO VAL "1056"
1058 IF Y$=">" OR Y$=">=" THEN LET X$=X$: RANDOMIZE USR VAL "64046": POKE VAL "64022",L: POKE VAL "64023",C: LET Y=Y$=">=": LET Y$=""
1059 IF Y$<"8" AND Y$>"0" THEN IF E$(U, TO F+U)="#DEFP" THEN GO TO VAL "6400"
1060 IF y$="" AND b<p THEN CLS : GO TO K*J+(VAL "895"*A)
1070 IF y$="G" THEN GO TO U
1080 IF PEEK VAL "64026"+R*PEEK VAL "64027"<>PEEK VAL "23627"+R*PEEK VAL "23628"+G-U AND (y$="D" OR y$="E") THEN GO TO VAL "4000"
1090 IF y$="R" THEN LET t=O: LET t1=O: LET t0=O: CLS : LET x$=x$: GO TO CODE "w"+(A*VAL "5121")
1100 IF y$="C" THEN GO TO VAL "7205"
1200 IF y$="DEFP" THEN PRINT AT K+K,O,,,,: PRINT AT J+U,O;: PLOT CODE "x",CODE "2": GO SUB VAL "6500": INK O: GO SUB VAL "9830": LET y$="M": GO TO VAL "1051"
1500 IF y$<>"" AND y$<>"E" AND y$<>"D" THEN LET A=O: LET X$=Y$: GO TO CODE "i"
2000 GO TO VAL "1050"
4000 LET p=p-USR VAL "63640": LET B=P: IF y$="D" THEN LET y$="": GO TO U
4010 GO TO VAL "5002"
5000 DIM e$(J,Q): CLS
5002 LET m=O: LET z=VAL "23658": LET i=O: LET L=O: LET C=O
5003 IF Y$=" AND " THEN BEEP U/K,J+J
5004 INK U: PLOT O,CODE "0": PAPER G-U: DRAW CODE " COPY ",O: INK O: PRINT AT J+U,O; PAPER U; INK G;"ENTER:Next line or use SHIFT and1:Switch Insert/Over 2:Caps lock3:Line Delete 4:Line Erase5-8:Move Cursor 9:More Info";AT L,C;: LET m=O
5005 INK G-U: PAPER O: FLASH U: PRINT AT L,C;SCREEN$ (L,C)
5007 ON ERR GO TO VAL "5005"
5010 LET Y$=INKEY$: IF Y$="" THEN GO TO 5010
5016 IF Y$>=" AND " AND Y$<>" THEN " THEN ON ERR RESET : FLASH 0: GO TO 6000
5020 BEEP E/1000,40: FLASH 0: PRINT AT L,C;SCREEN$ (L,C): IF CODE y$<16 THEN GO TO 5100+CODE y$
5025 IF i THEN LET e$(L+1)=e$(L+1, TO C)+" "+e$(L+1,C+1 TO 31): PRINT AT L,0;e$(L+1)
5027 IF y$=" THEN " THEN GO TO 7205
5028 IF Y$="AT " AND I THEN LET Q$=E$(L+1,C+2 TO ): LET E$(L+1,C+1 TO )=P$+Q$: PRINT AT L,0;E$(L+1): LET C=(C+LEN P$)*(C+LEN P$<31): GO TO 5035
5029 IF Y$="AT " AND NOT I THEN LET Q$=E$(L+1,C+1+LEN P$ TO ): LET E$(L+1)=E$(L+1, TO C)+P$+Q$: PRINT AT L,0;E$(L+1): LET C=(C+LEN P$)*(C+LEN P$<31): GO TO 5035
5030 PRINT AT L,C;y$: LET e$(L+1,C+1)=y$: LET C=(C+1)*(C<31)
5035 LET L=L+(C=0 AND L<14): FLASH 1: PRINT AT L,C;SCREEN$ (L,C)
5040 PRINT INK 2+i*5;AT L,C; FLASH 1;SCREEN$ (L,C)
5103 GO TO 5010
5104 FOR x=L TO J-H: LET e$(x+U)=e$(x+H): PRINT AT x,O;e$(x+U): NEXT x: LET e$(J)="": PRINT e$(J): GO TO VAL "5040"
5105 LET e$(L+U,C+U TO )="": PRINT AT L,O;e$(L+U): GO TO VAL "5040"
5106 POKE Z,(PEEK z=O)*VAL "8": PRINT AT L,C; INK G; PAPER U;CHR$ (CODE "<"+(PEEK z/F)): PAUSE K+K: PRINT AT L,C;e$(L+U,C+U): GO TO VAL "5040"
5107 LET i=NOT i: GO TO VAL "5040"
5108 LET C=C-U+(Q AND C=O): GO TO VAL "5040"
5109 LET C=(C+U)*(C<Q-U): GO TO VAL "5040"
5110 LET L=(L+U)*(L<G+G): GO TO VAL "5040"
5111 LET L=L-U+(J AND L=O): GO TO VAL "5040"
5112 LET e$(L+U)=e$(L+U, TO C)+E$(L+U,C+H TO ): PRINT AT L,O;E$(L+U): GO TO VAL "5040"+(VAL "68" AND C>O)
5113 LET C=O: LET L=L+U: LET L=L-(L>G+G): GO TO VAL "5040"
5114 FOR x=J TO L+H STEP -U: LET e$(x)=e$(x-U): PRINT AT x-U,O;e$(x): NEXT x: LET e$(L+U)="": PRINT AT L,O;e$(L+U): GO TO VAL "5040"
5115 IF m=O THEN PRINT BRIGHT U; PAPER U;AT J+H,O;"SYMBOL SHIFT:Line Insert","STOP:Close File",,: LET m=-U: GO TO VAL "5040"
5116 IF m=-U THEN PRINT AT J+U,O;: GO SUB VAL "9850": LET m=U: GO TO VAL "5040"
5117 GO TO VAL "5004"
5200 LET a=U: PRINT AT G+G,O; PAPER O; INK G;" PRINT OUT? (Y/N)",,,,,,,: INPUT Y$: LET Y=Y$="Y"
5220 LET Z$="0": PRINT AT G+G,O;"TYPE LINE NUMBER BY WHICH FILES WILL BE ORDERED. Type ""0"" if ordering is not required": INPUT Z$: IF z$="" THEN GO TO U
5222 ON ERR GO TO VAL "5220": IF VAL Z$>=O AND VAL Z$<=J THEN GO TO VAL "5230"
5225 GO TO VAL "5220"
5230 ON ERR RESET : IF VAL Z$ THEN LET S=VAL Z$: CLS : GO TO VAL "5240"
5235 LET A=O: GO TO K*K
5240 RANDOMIZE USR VAL "64731": IF S THEN POKE VAL "64602",S
5441 LET X$="*": LET X$=X$: RANDOMIZE USR VAL "64040": GO TO VAL "7000"
5500 PLOT CODE "x",CODE "2": GO SUB VAL "9830": PRINT AT J+U,U;"HAS THIS FILE BEEN SAVED?(Y/N)": PAUSE O: LET y$=INKEY$: IF y$<>"Y" THEN GO TO U
5505 IF X$="LOAD" THEN LET P=U
5506 PRINT AT J+U,U; PAPER F+U; INK O;"WHAT FILE NAME DO YOU WISH ";AT J+H,U;"TO LOAD\::";: INPUT F$: PRINT f$
5507 LET P=P-U: LOAD F$CODE PEEK VAL "23627"+R*PEEK VAL "23628"+P+G-U: LET F$=D$(P+H TO P+G+F): LET P=P+VAL D$(P+K+H TO P+J+U): BEEP U/H,J+J: GO TO U
6000 IF J$="U" THEN LET D$(P)=CHR$ (VAL "42"-A*VAL "42")
6001 FOR x=U TO J
6004 LET e$(x)=e$(x)
6005 IF USR VAL "63489" THEN
6010 NEXT x
6020 LET p=USR VAL "63530": LET B=P-B
6030 GO TO F-(y$=" STOP ")+(a*(y$=" STEP "))+(VAL "4996"*(Y$=" TO "))+(VAL "4999"*(Y$=" AND "))
6400 LET C$="": LET N=O: LET A$=E$(VAL Y$*H+U): FOR X=Q TO U STEP -U: IF A$(X)<>" " THEN LET A$=A$( TO X)+"/": GO SUB VAL "6515": LET Y$="G": GO TO VAL "1070"
6410 NEXT X: LET Y$="G": GO TO VAL "1070"
6500 PRINT INK G;" ENTER DESIRED FORMAT. Type ALL ";" or line numbers separated by"," ""/"" or ""."". Use ""0"" to print blank lines",,: GO SUB VAL "9830"
6510 LET C$="": LET n=O: INPUT "format?";a$: LET a$=a$+"/": IF a$(U)="/" OR A$(U)="." THEN GO TO VAL "6510"
6515 IF A$="ALL/" THEN LET C$="": FOR X=U TO J: LET C$=C$+CHR$ X+CHR$ O: NEXT X: LET D=INT PI: GO TO VAL "6555"
6520 LET D=U: FOR x=U TO LEN a$: IF a$(x)<"." OR a$(x)>"9" THEN GO TO VAL "6510"
6525 IF X<LEN A$ THEN IF A$(X)<"0" AND A$(X+U)<"0" THEN GO TO VAL "6510"
6530 IF a$(x)="/" OR A$(X)="." THEN LET n=VAL a$(d TO x-U): LET d=x+U: IF n<J+H THEN LET c$=c$+CHR$ n
6535 IF n>J+U THEN GO TO VAL "6510"
6537 IF A$(X)="/" AND N THEN LET C$=C$+CHR$ O
6540 NEXT x
6550 LET C$=C$( TO LEN C$-U)
6555 LET D=U: FOR X=U TO LEN A$: IF A$(X)="." THEN LET D=O
6556 NEXT X
6600 RETURN
7000 IF VAL Z$=O THEN GO TO VAL "7202"
7005 LET B=USR VAL "64523": IF B<p THEN DIM E$(J,Q): LET E$(U)="": GO SUB VAL "7310"
7010 IF B=P THEN LET A=O: LET X$="ALL DONE": GO TO CODE "n"
7202 LET t1=t1+(b<p): IF Y=O THEN GO TO VAL "1047"
7203 IF B=P OR E$(U, TO H)="##" THEN GO TO VAL "7229"
7204 IF INKEY$=" " THEN IF Y=H THEN LET Y=U
7205 IF CODE INKEY$=J-H THEN LET Y=H
7206 IF Y<>H THEN GO TO VAL "7213"
7207 LET L=O: LET C=O: FOR X=H TO Q: IF E$(U,X)=" " THEN LET C=X+U: GO TO VAL "7209"
7208 NEXT X: IF C=O THEN GO TO VAL "7212"
7209 FOR X=C TO Q: IF E$(U,X)=" " THEN LET L=X-U: LET X=Q
7210 NEXT X: IF L=O THEN LET E$(U)=E$(U,C TO )+" "+E$(U, TO C-H): GO TO VAL "7212"
7211 LET E$(U)=E$(U,C TO L)+" "+E$(U, TO C-H)
7212 IF Y$="C" THEN LET Y=O
7213 FOR X=U TO LEN C$: IF CODE C$(X)=O THEN LPRINT : GO TO VAL "7225"
7220 IF D THEN IF CODE C$(X)<=J THEN IF E$(CODE C$(X))>" " THEN LPRINT E$(CODE C$(X));: GO TO VAL "7225"
7221 IF NOT D THEN IF CODE C$(X)<=J THEN LPRINT E$(CODE C$(X));: GO TO VAL "7225"
7222 IF CODE C$(X)=J+U THEN LPRINT "CNT=";T1;" SUM1=";T;" SUM2=";T0;: GO TO VAL "7225"
7223 LET X=X+U: IF X<LEN C$ THEN IF CODE C$(X)>O THEN LET X=X-U
7225 NEXT X: LPRINT
7227 IF y$=" THEN " THEN GO TO VAL "5005"
7229 IF j$="T" OR J$="S" THEN GO TO VAL "1049"+(y$="C")
7230 IF A AND B<p AND Y$<>"C" THEN CLS : GO TO VAL "7000"
7235 IF Y AND A=O THEN GO TO J*K
7240 GO TO VAL "1047"
7310 PRINT AT O,O;: LET e$(U)="": IF USR VAL "63575" THEN
7311 RETURN
8000 LET X$="TAPE ERROR": GO TO F
8200 CLS : PRINT AT K,O;"PRESS ANY KEY TO SAVE ": PAUSE O
8205 CLS : ON ERR GO TO VAL "8000": LET D$(H TO G+F)=F$: LET D$(K+H TO J+U)=STR$ P: SAVE F$CODE PEEK VAL "23627"+R*PEEK VAL "23628"+G-U,P
8220 BEEP U/H,J+J: PRINT AT K+K,O;" REWIND TO VERIFY/BREAK TO STOP "
8225 VERIFY ""CODE
8230 BEEP U/H,J+J: GO TO U
8548 GO TO U
8567 GO TO U
8568 LET P=P-USR VAL "63640": CLS : LET X$=X$: GO TO CODE "w"
8582 GO TO U
8583 GO TO VAL "9250"
8584 GO TO VAL "9200"
8585 LET P=P-USR VAL "63640": GO TO VAL "9300"
8900 GO TO U
8999 STOP
9000 CLS : PRINT #4: LOAD "p/f"CODE : SAVE "PROFILE" LINE VAL "9991": SAVE "p/f"CODE VAL "63488",VAL "2046": GO TO 9990
9100 IF J$="U" THEN LET T1=T1/H
9105 PRINT AT J,O;"CNT=";T1;: IF J$="T" OR J$="S" THEN PRINT " SUM1=";T;" SUM2=";T0
9110 RETURN
9200 POKE VAL "63798",J+U: LET E$(RW,U)=E$(RW,U): IF USR VAL "63792" THEN LET T=T+VAL E$(RW, TO J+U)
9205 LET e$(RW,J+H)=e$(RW,J+H): IF USR VAL "63792" THEN LET t0=t0+VAL e$(RW,J+H TO )
9210 IF Y AND (J$="T" OR J$="S") THEN GO TO J*K
9220 GO TO VAL "1050"-(VAL "900"*a*y)
9250 POKE VAL "63798",Q: LET E$(RW,U)=E$(RW,U): IF USR VAL "63792" THEN LET T=T+VAL E$(RW): LET T0=VAL E$(RW)
9260 GO TO VAL "9210"
9300 IF P$=E$(L, TO LEN P$) THEN LET E$(L)=Q$+E$(L,LEN P$+U TO ): PRINT AT L-U,O;E$(L)
9310 GO TO VAL "6000"
9400 PAUSE K+K: LET Y$=" STOP ": ON ERR RESET : GO TO U
9830 DRAW VAL "134",O: DRAW O,-VAL "48": DRAW H-R,O: DRAW O,CODE "0": DRAW CODE "x",O: RETURN
9850 PRINT "FILE: "; INK G;F$; INK INT PI;" ORDER: "; INK G;S, INK INT PI;"OPEN: "; INK G;LEN D$-P;: PRINT " bytes DATE:"; INK G;D$(VAL "21" TO F*G);TAB O;: PRINT "FORMAT:"; INK G;a$,,,TAB O;: RETURN
9990 CLEAR : SAVE "PROFILE" LINE VAL "9991": BEEP VAL ".5",VAL "30": SAVE "p/f"CODE VAL "63488",VAL "2046": BEEP VAL ".5",VAL "30": VERIFY "": VERIFY ""CODE : BEEP VAL ".5",VAL "40": GO TO VAL "9996"
9991 DELETE VAL "8999",VAL "9000": BORDER NOT PI: PAPER NOT PI: INK VAL "7": CLEAR VAL "63487": LOAD ""CODE : CLS : POKE VAL "23658",VAL "8"
9996 DIM d$(VAL "27379"): LET P=VAL "29": LET P$="": LET O=NOT PI: LET B=O: LET U=SGN PI: LET H=U+U: LET F=H+H: LET G=VAL "7": LET K=VAL "10": LET J=VAL "15": LET Q=CODE " ": LET R=VAL "256": LET A$="ALL/": GO SUB VAL "6515": LET S=O: LET D$(K+K TO VAL "29")=CHR$ U+"SET DATE*"
9997 LET Y$="": LET E=K: PRINT AT J+F,U+U; INK G;"Press ""C"" to CREATE a new file or ""L"" to LOAD an existing one": PAUSE O: LET X$=INKEY$: PRINT AT J+F,O;D$(CODE "d" TO VAL "164"): IF X$="L" THEN LET X$="LOAD": GO TO VAL "5505"
9998 PRINT AT J+F,F; INK G;"ENTER A NAME FOR THIS FILE": INPUT F$: IF f$="" OR LEN f$>K THEN GO TO VAL "9998"
9999 GO TO U
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.
