These are the instructions used in programming the Simplified Instructional Computer(SIC).
Here,
A stands for Accumulator
M stands for Memory
CC stands for Condition Code
PC stands for Program Counter
RMB stands for Right Most Byte
L stands for Linkage Register
a)
Instruction set size – It tells the total number of instructions defined in the processor.
Opcode size – It is the number of bits occupied by the opcode which is calculated by taking log of instruction set size.
Operand size – It is the number of bits occupied by the operand.
Instruction size – It is calculated as sum of bits occupied by opcode and operands.
MNEMONIC | OPERAND | OPCODE | EXPLANATION |
---|---|---|---|
ADDR | R1, R2 | 90 | R2 = R2 + R1 |
CLEAR | R1 | 04 | R1 = 0 |
COMPR | R1, R2 | A0 | compares R1 and R2 |
DIVR | R1, R2 | 9C | R2 = R2 / R1 |
LDB | M | 68 | B = M |
LDS | M | 6C | S = M |
LDT | M | 74 | T = M |
MULR | R1, R2 | 98 | R2 = R2 * R1 |
RMO | R1, R2 | AC | R2 = R1 |
SHIFTL | R1, n | A4 | left shifts R1 n times |
SHIFTR | R1, n | A8 | right shifts R1 n times |
STB | M | 78 | M = B |
STS | M | 7C | M = S |
STT | M | 84 | M = T |
SUBR | R1, R2 | 94 | R2 = R2 – R1 |
TIXR | R1 | B8 | X = X + 1; compares X and R1 |
Here,
M stands for Memory
R1 and R2 are registers (A, B, S, T)
b)
JEQ | M | 30 | if CC set to =, PC = M |
JEQ m 3/4 30 PC <-- m if CC set to =
For type-4 category having N instructions each having 1 floating point register operand (6 bits) will consume N* 2^6 = 2048 (calculated from previous step). Therefore, N = 32.
These are the instructions used in programming the Simplified Instructional Computer(SIC).
Here,
A stands for Accumulator
M stands for Memory
CC stands for Condition Code
PC stands for Program Counter
RMB stands for Right Most Byte
L stands for Linkage Register
a)
MNEMONIC | OPERAND | OPCODE | EXPLANATION |
---|---|---|---|
ADDR | R1, R2 | 90 | R2 = R2 + R1 |
CLEAR | R1 | 04 | R1 = 0 |
COMPR | R1, R2 | A0 | compares R1 and R2 |
DIVR | R1, R2 | 9C | R2 = R2 / R1 |
LDB | M | 68 | B = M |
LDS | M | 6C | S = M |
LDT | M | 74 | T = M |
MULR | R1, R2 | 98 | R2 = R2 * R1 |
RMO | R1, R2 | AC | R2 = R1 |
SHIFTL | R1, n | A4 | left shifts R1 n times |
SHIFTR | R1, n | A8 | right shifts R1 n times |
STB | M | 78 | M = B |
STS | M | 7C | M = S |
STT | M | 84 | M = T |
SUBR | R1, R2 | 94 | R2 = R2 – R1 |
TIXR | R1 | B8 | X = X + 1; compares X and R1 |
Here,
M stands for Memory
R1 and R2 are registers (A, B, S, T)
b)
JEQ | M | 30 | if CC set to =, PC = M |
JEQ m 3/4 30 PC <-- m if CC set to =
(a) (10 points) The hexadecimal form of a 3-byte instruction for SIC/XE is 010030. The opcode...
The second phase of your semester project is to write pass one of a two‑pass assembler for the SIC assembler language program. As with Phase 1, this is to be written in C (not C++) and must run successfully on Linux. Pass one will read each line of the source file, and begin the process of translating it to object code. (Note: it will be to your advantage to have a separate procedure handle reading, and perhaps tokenizing, the source...
5 Exercises Now that everything is working you can try the following exercises. To complete them you will need to refer to the documentation in Appendix A- The MiteASM Assembler and Appendix B - The MiteFPGA Processor. Write an assembly language program for an over counter for a cricket umpire. This should display a count on the 7-segment display. The count should increase by 1 when button 0 is 1. pressed. It should reset to 0 when button 1 is...
There is an example below
Now that everything is working you can try the following exercises. To complete them you will need to refer to the documentation in Appendix A The MiteASM Assembler and Appendix B The MiteFPGA Processor. Write an assembly language program for an over counter for a cricket umpire. This should 1. display a count on the 7-segment display. The count should increase by 1 when button 0 is pressed. It should reset to 0 when button...