CS 101: Brookshear Machine
Click here to return to the schedule

Background

To see how the machine language from the textbook comes to life, we will use an exciting, state-of-the-art interactive simulator! (Okay just kidding, this program is really old and barely runs. But someday we will rebuild it for the web using HTML5.)

Install you'll need to install Java if you don't have that already.

Instructions

You need to complete these steps before Wednesday's class:

The reason why it's so complicated is because of security reasons. On Windows, you can just double-click the jar file and it runs. But doing so turns out to be an easy way to get viruses (from other jar files you might find on the Internet).

Sample Program

Here is some machine code that calculates the sum of numbers from 1 to 10. The answer (1 + 2 + ... + 10 = 55) is stored in register 1. You should see 37 at the end of the program, because 37 in hexadecimal is 55 in decimal.

Acknowledgement

This software and the sample program are based on bmachine.sourceforge.net, last edited 10/03/2002.