ProFile 2068

Products: Pro/File 2068
Developer(s): Thomas B. Woods
Date: 1984
Type: Program
Platform(s): TS 2068
Tags: Database

Pro/File 2068 is a free-form filing program by Thomas B. Woods (© 1984). Each record (a “file” in the program’s terms) is a page of up to 15 lines of 32 characters, typed in a full-screen editor. Records are found by typing a search command: any word or phrase, or several joined with AND, and each matching record is shown in turn with options to continue, copy it to the printer, delete it or edit it. AUTOSEARCH runs a search unattended, optionally printing every match and sorting the results on a chosen line, and DEFP sets which lines are printed. The whole database is kept inside the program and saved with it to tape.

The tape holds the BASIC program PRO/FILE (twice; the second copy also turns on caps lock) and 1,880 bytes of machine code at 63488. A cartridge edition with extra commands is on ProFile 2068 AROS.

Program Analysis

Structure

  • Lines 9860–9999 (the auto-start line): title screen, CLEAR 63488, loading of the machine code, and creation of a new file or loading of an old one.
  • Lines 1–150: main menu and search command.
  • Lines 1000–2000: display of each match and the record options.
  • Lines 5000–5117: the full-screen record editor; lines 5200–5240: AUTOSEARCH; lines 6000–6030: storing a record.
  • Lines 6500–6600: the DEFP print-format parser; lines 7000–7240: sorted output and printing.

Notable Techniques

  • All records live in one string, DIM d$(28020), with p as the end pointer. Searching, storing and deleting are done by machine code called with USR 64040, USR 64101, USR 63489, USR 63530 and USR 63640.
  • Several routines are called with an empty IF USR n THEN, a compact way to run machine code as a statement.
  • The editor handles its own cursor: arrow keys, insert/overtype toggle, line insert and delete, and caps lock by toggling system variable 23658. ON ERR traps errors during editing and when the sort line is entered.
  • SAVE f$ LINE 1 saves the program with its data, so a database file is a self-starting copy of Pro/File.

Potential Issues

  • Line 115 tests x$(LEN x$)=" AND ", comparing one character with a five-character string, so a command ending in AND is never caught there.
  • The editor’s prompt says to press STOP to close a record; line 5016 compares INKEY$ with the STOP token, which needs SYMBOL SHIFT and A.

Related Products

Machine language information storage and retrieval database for the 2068. Later available as a DOCK cartridge with more memory for data.

Related Articles

Contrary to popular belief, there is a Profile manual under construction. (I have seen the proofs with my own eyes.) There is however, one chapter to go before it is ready for the printer. The manual is comprised of not only instructions, but several modifications, program improvements and upgrades and will be a good tutorial on 2068 file handling in general.
Review of Tom Wood's database program.
Sadly, ZX PRO/FILE will not work on the new TS2068 without a substantial re-write of the machine code.

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