This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I am suppose to write classes for machine language code. I am suppose to take the description and wtire it in java. For instance a "LOAD RXY" is load the register R wtih the bit pattern found in the memory cell whose address is XY. I already have a class of registers and memory I just do not know how to start writting the code for a load.
int data = memory.fetch(xy); registers.load(R, data);
You'll have lots of little snips like this, one for each instruction. At some point, you're probably going to have to parse the instructions and figure out which one to call. A "switch" statement is one obvious way to do the latter.
But to get started, you might write a bunch of little instruction routines like the above, and try calling them from a test driver. You're definitely going to want some debug output routines to display the contents of memory and registers so that you can see if your instructions are doing the right thing.
Come to think of it, I guess I was helping you debug your "memory" class the other day, wasn't I?