File Exchange

image thumbnail

Extended Brookshear Machine emulator and assembler

version 1.7 (101 KB) by

Emulator and assembler for a simple computer, a teaching aid for computer science courses.



View License

This is an emulator for the machine described in Computer Science: An Overview, 10th edition, by J. Glenn Brookshear (Pearson Education, 2008). It is extended with some additional instructions and the machine is equipped with a bitmapped display.

The emulator is intended for teaching and learning. It has been used successfully in an introductory computer systems course in the first term (semester) of a computer science programme.

The machine has 256 1-byte memory cells, 16 1-byte registers, and an instruction set with 16 operations. It may be programmed by entering machine code into the emulator, or using a simple assembly language.

The emulator is managed using a GUI, started by executing bmachine, which is in the top level of the directory. The GUI allows memory and register contents to be viewed in a variety of ways (as binary, hex, ASCII, signed integers or floats). Machine code in memory is also displayed as descriptive text or as assembly language instructions. Memory can be updated directly by editing the fields in the emulator, and individual instructions can be executed to see their effect on memory and registers; alternatively, programs may be executed sequentially.

A simple assembler is also provided. Assembly language may be read from a text file and loaded into memory. Two example programs are provided, and HTML documents describing the machine, its emulator and the assembler can be displayed from the GUI.

A 32x32 binary bitmapped display shows the contents of the upper half of memory. This allows programs to create simple graphics, providing excellent possibilities for interesting student exercises.

Comments and Ratings (0)



Minor bug fix in dble2f8: now throws an exception with an id (previously used error without an id).


Repeating update of 8 January 2009, because the zip file and description were not updated.


Updated file


Shortened instruction description that was being truncated; changed screensize test for larger font; added Contents.m files; switched off some M-Lint warnings.

MATLAB Release
MATLAB 7.7 (R2008b)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video