Data File Format

Author(s): John D. Andrews
Publication: Syntax
Pub Details: Syntax/Syntax ZX80 v2 n8 (Volume 2, Issue 8)
Date: August 1981
Pages: 2-3

Here’s a program for 2K MicroAces that allows you to create indexed files on tape. Changes for 1K RAM follow the listing.

In this listing, I put some data in place to give you an idea of how the program works. It takes a filename, a table of contents indexed to line numbers in the program, and text. To start your own file, delete lines 100-115 and 500-515. Then SAVE on tape (make a master copy for other files).

LOAD a blank format tape and put your filename in the PRINT statement at line 100. Then add the table of contents (copying the format shown in the sample listing) in lines 100 through 299. Enclose information in PRINT statements between lines 500 and 4999. Separate blocks of text with GO TO 5000 statements. Type LIST (NL) so you can add the next line to your table of contents.

When you finish typing data, hit RUN (NL). Your table of contents will be displayed with a numeric prompt. Select the desired category and enter its number and NEWLINE. Data will be shown with a ” ” prompt. Keying (NL) returns you to your table of contents.

The routine at 9000 allows you to check how much unused RAM space you have before entering new data. After you get the program listing, enter RUN 9000 (NL). Hit any key to return to the listing.

To exit program, type STOP (NL) (NL). Then SAVE this finished program on tape. If you can’t get all the information you want on any one program, LOAD a clean format tape. Title it and go from there.

Keep a paper log of your file tape to locate data easily.

  10 PRINT ," DATA FILE"
20 PRINT ," ███████" (shift W)
30 PRINT
40 PRINT "IF PROMPT= QUOTES - KEY NEWLINE"
50 PRINT
60 PRINT ,"DATA LISTING"
70 PRINT "--------------------------------" (32 dashes)
80 PRINT " DATA LINE NO."
90 PRINT "--------------------------------" (32 dashes)
100 PRINT " AUTOMOTIVE"
110 PRINT "TIRES",,,"500"
115 PRINT "TIMING",,,"510"
300 INPUT A
301 CLS
302 GO TO A
500 PRINT " SIZE= H78-15. PRESSURE= 30 PSI"
505 GO TO 5000
510 PRINT " 3 DEGREES BTDC"
515 GO TO 5000
4999 STOP
5000 INPUT A$
5001 IF A$="" THEN CLS
5002 GO TO 70
9000 CLS
9001 LET P=18432-PEEK(16400)-PEEK(16401)*256
9002 PRINT P;" BYTES LEFT"
9003 LET T=2048-P
9004 PRINT ,"BYTES USED= ";T
9005 STOP
Syntactic Sum: -23289, 4K

MODIFICATIONS FOR 1K RAM

line 9001:  change 18432 to 17408.
line 9003:  LET T=1024-P.

Use GO SUB 5000 between blocks instead of GO TO 5000

New Syntactic Sum: -23264, 4K

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