Next: Extending the Smalltium
Up: The Mintel Smalltium Microprocessor
Previous: 6 Traps
We realize that this project may seem very difficult, so we have
provided a step-by-step guide on how to get started with it:
- Read this document at least twice. It will probably make more
sense the second time you read it.
- Read and understand the example assembly language programs we
have provided. You will need to become familiar with the
Smalltium assembly language in order to write test programs.
- Try writing a few simple assembly language programs and
running them through the assembler. Take a look at the output
of the assembler and see how it corresponds to the assembly
language code. Review section 3 for general
information about assembly language and section 5 for
information about the individual instructions and assembly
language examples.
- Read and understand the code we have provided for the
simulator (cpu.pas or cpu.cpp). We have already implemented
three of the instructions and one of the traps for you, to
give you an idea of how it is done.
- Assemble hi.asm and run it in the simulator. It only uses the
three instructions that we provided, so it should run
correctly. Try writing another assembly program that only
uses these instructions and run it in the simulator as well.
- Now start implementing each of the instructions. Test each
new instruction as you implement it and make sure that it
works before moving on to the next one. Write a small assembly
language program for each instruction that only uses the
instructions you have implemented so far, and demonstrates
that the new instruction works. We suggest implementing the
instructions in the following order:
- The traps. You will need the traps in order to
display the results in your debugging programs. Start
with the output traps, then do the input traps (you
can't really test the input without output).
- ADD, SUB, MULT, and DIV.
- LOAD and STORE.
- JMP and CMP. At this point, addnum.asm should work.
- LOADi and STOREi. At this point, hello.asm should work.
- After you have the simulator working to this point, sit back
and take a breather and congratulate yourself for getting this
far. But you're not done yet! Now you get to exercise your
creativity and show us how good you really are. The next
section will tell you various things you can do to extend the
Smalltium beyond these specifications.
Next: Extending the Smalltium
Up: The Mintel Smalltium Microprocessor
Previous: 6 Traps
James Clingenpeel
Thu Feb 29 18:00:38 MST 1996