CS 353 Lab 6: Writing a PC-231 Simulator


For this lab you should write a program (an application might be better than an applet in this case) which implements a PC-231 architecture.

Like the simulator we have used in class (sim231), your program should be able to read in a file of hexadecimal numbers (3 digits each) and should then "run" the corresponding program on a simulated PC-231 architecture.

You should try to support exactly the PC-231 as described in the on-line document linked from the course homnepage ... but you may make *extensions* if you wish. This might range anywhere from using up a bit more of the instruction space (in some of the low-ordered commands) to perhaps something as ambitious as a 16-bit architecture with more features.

Most of the room for features is probably in the assembler, though (next lab!).

In any case, you should be able to run a (possibly slightly modifed) version of your Lab 5 code on your simulator to demonstrate that it works.

We will probably allow something more like 2 weeks for this lab.

Some extras

You may find this discussion of Java bit manipulation useful, or see Vipan Singla's page on this topic (also linked at the course home page).

There is some sample input in the file hex.txt; some smaller sample programs are available here.

Finally, here are some handy things to know about Java: