A little help needed please!
I am attempting to create a program that will simulate the [link=http://en.wikipedia.org/wiki/Manchester_Small-Scale_Experimental_Machine]Manchester
Baby (SSEM)[/link] in C++. Since I'm not very advanced with either language I'm finding it hard to even begin writing the code.
The simulation should take as input a text file containing a binary computer program written in the machine code language of the Baby (essentially 32 lines each of 32 bits of binary data corresponding to the store).
When the simulation is running, it should step through each line of the input program, simulating the fetch-decode-execute cycle. For example, after fetching an instruction, it should work out what that instruction is (which operation it corresponds to), what its operand is, then simulate the execution of that operation by moving data around the simulated hardware.
JMP - Copy content of the specified line into the CI
JRP - Add the content of the specified line into the CI
LDN - Copy the content of the specified line, negated, into the accumulator
STO - Copy the content of the accumulator to the specified store line
SUB - Subtract the content of the specified line from the accumulator
CMP - If the accumulator is less than 0 increment the CI
STP - Halt the Baby and light the