NOTE: Labs 1-3 depend upon each other. It is very important that you keep up with the due dates and get all three labs working. You will not be able to do the labs until you have successfully completed the previous ones! You will be given 5 late days total for all 5 labs -- save them for labs 2 and 3!
You will need to use a Unix or Linux machine for this assignment
(such as those in CSIL -- you can use them remotely if you like).
/cs/class/cs154/ist
There is a binary you can install at home also at:
/cs/class/cs154/ist.tar.gz
The MIC-1 microprogram you will modify is in ist/frend/one/one.mal
With some minor differences, this is essentially the same code as
described
in the Matloff handout and described in class. You will also need to
modify one.def if you change any of the opcodes.
You must also write your own test MAC program.
Assume that the FIND instruction requires that its arguments are already on the stack: the integer to find is at m[sp], the starting address of the block of integers is in m[sp+1], and number of words (integers) is in m[sp+2]. When the instruction completes, pop off the arguments and write the result (address of the first occurrence of the search integer) in m[sp].
It is completely up to you how you implement FIND, other than the technical restrictions set here.
Your design must allow the correct execution of any existing MAC-1 machine-language program.
By the way, this "contest" is in keeping with microcoding in general. In high-level programming, we usually don't care about small increases in speed; usually the clarity of the code is more important. But microcode directly affects the overall speed of the machine itself, so optimal code is of great value.