MicroprocessorSimulation
Time Limit: 2 Seconds MemoryLimit: 65536 KB
Problem
Consider a small microprocessor that has the following properties:
Each word is four bits.
Addresses are two words. The high word always comes first. That is, the highword of a two-word address will always occupy the lower word of memory.
Memory is 256 words.
There are two accumulators, A and B, each storing one word.
There are nine instruction codes. Each instruction requires at least one wordto store the code that specifies the instruction. Four instructions havearguments and require an additional two words.
Each 4 bit number can have the values from 0 to 15, inclusive, in base 10. Wewill write these using hexadecimal in the usual way, i.e. A means 10, B means11, etc.
These are the nine instructions:
Code |
Words |
Description |
0 |
3 |
LD: Load accumulator A with the contents of memory at the specified argument. |
1 |
3 |
ST: Write the conte |