TDTS10 Computer Architecture
CPU Simulator
Here is a CPU simulator based on a very simple architecture. The user's guide is here. And here are some program examples:Eqn
Simple
It is easiest to save the programs locally on your own hard drive or in your home directory. You can also insert programs manually.
The simple program looks like this:
LOD #3 - Load - Loads 3 into the accumulator (the only existing register in this architecture).
MUL X - Multiply - Multiplies what is in the accumulator with what is stored at address X.
STO Y - Store - Stores what is in the accumulator at address Y.
HLT - Halt - Terminates the execution.
NOP - No operation - An operation that does not do anything.
If you insert the program manually, do not forget to set X to something (otherwise you will multiply with 0).
If you do not know what to do with the simulator, you could try to find the instructions for the program we used in the lecture: z=(x+y)*3;
Page responsible: Unmesh Bordoloi
Last updated: 2008-02-17
