|The B-Machine ©1982-2015|
The B-machine is a video-based computer-model of a machine whose natural
language is minimal BASIC. The B-machine executes the BASIC commands OLD,
NEW, SAVE, and LIST so that you may make a program or call up an existing
one. When the program is run, the B-machine interprets each statement by
acting on line numbers, variables, and values as they move from one
component to another in the form of tokens.
For example, the GOTO statement, for example, moves the contents of the token recognizer (a line number) to the control unit and then moves the program forwards or backwards until the target line number appears in the current line number register.
The tour program is a segmented BASIC program that shows each component in operation. It asks for your name, what part of the machine you want to learn about, and for values to use in calculations. To the B-machine, the tour program is just an ordinary BASIC program.
A library of programs demonstrate algorithms, such as the accumulation of compound interest, taking you beyond mechanics by using logic and arithmetic to do surprising things.
Teachers will want an operating manual: to summarize the subset of BASIC that B will accept, to support the algorithms and programming concepts, and to offer exercises and problems. For more advanced study, the manual could describe how the token recognizer and the evaluator work, and how the machine is controlled by 'micro-code'. The manual could be 32 to 64 pages.
The Mac's menus and dialog boxes can be used to control the speed and other aspects of the B-machine. Alert boxes and the mini-finder can be used too.
The startup screen and package art could be renditions of the enclosed drawing (Sorry! Not sharing at this time). The working screen is a two-dimensional model.
Sounds can be associates with each action. Synthesized narration can be given for each operation the machine performs!
The Development of the B-machineAfter completing some research on the formation of whole programs, I focused on the notion that only one statement appears before
the computerat a time. I wondered what machinery would be necessary to interpret all minimal BASIC statements that might appear in my imagined statement register. I assembled abstract concepts of scanners, stacks, and the Turing machine as I developed stories of all the actions of this
BASIC machine. I named it
B, after the C, D, Lisp, and P-machines. I wanted to animate this verbal-graphic model to support a textbook I was writing. Such an animation would have been very expensive without using computer graphics. Thus, the B-machine became a program to produce live animation driven by programs loaded or entered interactively.
B was originally programmed in VAX/VMS BASIC on a 24x80 screen, June, 1982.
The above was written in 1984! My plans are to develop a version generalized to several languages not just BASIC, including lisp and PostScript. I have the program running under YABASIC on linux. LOL. I have ideas for other such educational automatons.
Words and concept ©1982, John E. Miller, Portland, Oregon.