i = j - k
IST_ARRAY
in Mic-1. It is just like ISTORE
except that it has an extra byte that is the number words on the stack to store
into consecutive local variables.
IST_ARRAY varnum byte
The instruction will store byte number of words from the stack into consecutive local variables, starting with local variable varnum.
Use symbolic names in conditional branch statements, but supply a table that gives hex addresses for each of these labels. Be sure all the labels have consistent addresses.
INVOKEVIRTUAL in MIC-1 has 22 lines of code, it has 11 lines of code in MIC-2. There are three types of changes:
For the MIC-1 INVOKEVIRTUAL command,
If there is a choice between marking a statement as being grouped with others or being removed, choose grouped.
Correction: line 5 in Mic-2 should be the same as line 12 in Mic-1. H does not needed to be updated in line 5 of Mic-2.
R3 = R0 / R2
R3 = R3 * R2
R2 = R0 + R1
R0 = R2 / R5
R6 = R3 - R6
R3 = R8 + R0
The quiz for this homework will be on Wednesday, December 2.