
About
The programs from Einstein Magazine & All Micro News No. 73, January to February 1995, typed in and on one bootable Xtal BASIC disc.
TEXTREAD, a simple BASIC Text Reader by Andrew McRobbie, shows how Xtal BASIC can open another file and read it a line at a time. It was printed under the name "A. Nonnymouse ???"; the editor wrote on page 2 that he had no note of who sent it, and Andrew McRobbie owned up in No. 74, page 3. It is here as printed, and again as TEXTRD2 with the missing REMs put back so it runs, with KEYBOARD.ASC, a short text file for it to read.
GREET.C, "Greetings O King", is the first Small-C example from Sid Dunn's "Cheap and Cheerful C, Part 1". It is on the disc as source, with the commands to build it.
The listings were printed on pages 17 and 18 of the magazine, which is on this site as Einstein Magazine No. 073. This disc saves you typing them in.
Running Them
Boot the disc, type XBAS, then LOAD "TEXTRD2" and RUN. It prints KEYBOARD.ASC and returns to Ready.
What Is in the Download
A zip holding the disc image as a DSK, the same disc as an MFI for MAME to write to, the listings as BASIC text and as tokenised Xtal BASIC, the C source and the text file, a README with the full account of each program, and the screen captures and MAME scripts used to test them.
Verified
Transcribed from the page images and run on the Einstein in MAME 0.289 with Xtal BASIC 4.2. Both BASIC programs were loaded into BASIC and saved back, giving the same bytes as our files. TEXTREAD as printed stops with Syntax Error in 40, because the comments on lines 40 to 100 follow a colon with no REM. TEXTRD2 reads and prints all ten lines of KEYBOARD.ASC and stops cleanly at the end of the file. GREET.C needs the Small-C compiler from UKEUG library volume PD224, which we do not have, so it has not been compiled or run. Not run on real hardware.
Kept as Printed, and Two Additions
TEXTRD2 and KEYBOARD.ASC are our additions. The article does not say what the author's own KEYBOARD.ASC held, so ours is a ten line file written for the reader to read. The reader holds at most ten lines (DIM A$(10), left as printed), and a comma ends a line early. The build commands for GREET.C from the article are in the README: cc greet, zmac greet=greet, zlink greet=greet,iolib,printf1. No addresses are in the listings.
The programs are their authors', published in Einstein Magazine in 1995.


