
About
This is the disc image the site's C course is written against. Mount it in MAME, type a program into ED80, compile it with HC, and run it - and keep it. It is equally useful on its own if you want to try HiSoft's C compiler on the Einstein.
What Is on It
- HC.COM, HiSoft-C Compiler V1.35 (1985), which compiles a
.Cfile straight to a runnable.COMin one step. - STDIO.H, STDIO.LIB, CPM.LIB and EIN.LIB, the library, all of it as C source the compiler reads: the standard functions, the CP/M functions, and the Einstein's own - screen, cursor, colours, redefined characters, lines, sprites, sound, and a keyboard scan that does not wait. EINLIB.HLP describes the last.
- ED.COM and ED80.COM, the editor, ED80, under the name you type and the name the compiler calls it by when it hands you back to the faulty line; ED.HLP is its help.
- BREAKOUT.COM, the game the course builds, finished, and its source BREAKOUT.C. See below.
- 72K of free space, which is where your own programs go: about nine of them at a time.
Why It Is an .mfi and Not a .dsk
MAME will not write to a .dsk image: the editor appears to save your work, and then the DOS answers Bad Data 0:, and the text is gone. The .mfi format is MAME's own, and MAME does write to it, so anything you save is still there next time.
Using It
Put the file somewhere you can find again and point MAME at it:
mame -rompath ~/roms einstein -flop1 ~/einstein/hisoftc.mfi -windowThe Einstein boots to TATUNG/XtalDOS 1.31 and the 0: prompt. ED HELLO.C opens the editor on a new file; type, then GRPH-K X and ENTER saves it. HC HELLO.C compiles it, in about half a minute, and prints a memory map; HELLO runs it. If the compiler finds an error it stops, names the line, and waits: press E and it opens the editor on that line, and when you save, it compiles again.
Three things worth knowing before you start, all of which stop people dead:
- C needs characters the Einstein's keyboard hides.
[and]are the LEFT and RIGHT arrow keys,{and}the same with SHIFT,^is UP,\is SHIFT and the½key - and the screen draws them as fractions and arrows. That is right, not a fault; the course's Appendix IV has the whole table. - ED80's command key here is GRPH, not CONTROL: GRPH-E, S, D and X move the cursor, GRPH-K X saves. CONTROL and a letter puts
^Ein your text. - A running loop cannot be stopped from the keyboard. Nothing stops it - not CONTROL-C, not BREAK. Save before you run anything new, and give a loop a way out.
Breakout
At the 0: prompt, type BREAKOUT. LEFT and RIGHT move the bat, SPACE launches the ball, and the aim is the wall of bricks at the top. Three lives; the ball quickens when half a wall is down; a cleared wall comes back faster and worth more; a beep for every brick. It is the program the course builds a section at a time - about 300 lines of C, all of it in BREAKOUT.C, in colour with characters of its own.
Real Hardware
Nothing on this page has been tried on a real machine. The compiler and the editor were sold for the Einstein and the disc's DOS is the Einstein's own, so it should be no different; if you find that it is, we would like to hear.
How It Was Made
It is the Einstein's XtalDOS 1.31 system tracks with HiSoft C, its libraries and ED80 - as installed for the Einstein by their original owner - copied on, nothing else, and the finished game compiled onto it by the compiler itself under MAME.


