Purpose
The purpose of this lab is to familiarize you with the
lower-level operations of a computer, specifically machine and
assembly language instructions.
Introducing xMachine
We will use a simulated processor called 'xComputer' for experimentation.
This computer has a few advantages over a 'real' device:
- It's written in Java so you can run it anywhere
- It's a somewhat simplified architecture ideal for teaching
- The language is an elegant and clear assembler variant
- It uses a simple 16-bit architecture
- It shows what's going on more clearly than a 'real' processor
- It provides some error checking
- It's safer than a real device, because it operates in a virtual machine
xMachine was written by David Eck. He has provided complete documentation and
tutorials available here:
The xMachine applet is available by clicking on this button:
The Project
Create a multiplier in xMachine language. Consider the following factors:
- You'll need two inputs and an output
- You may need some additional data cells
- Think of the definition of multiplication
- You'll probably need a loop
- You can't assume the answer (eg it should work on any inputs)
Turning it in
Copy and paste your code to a text document. Please be sure to add your name.
The following rubrik will be considered for grading:
- Quality of the code (Does it work)
- Code style (labels, indentation)
- Completeness (Does it do all it needs to do)
Save your program as nameml.txt where name is your userID.
Please submit in the provided oncourse dropBox.