Question: Question 3 - (10 Points) Hex Add. 1 Label Instruction Consider the MARIE program on the right a) List the hexadecimal code for each instruction
Question 3 - (10 Points) Hex Add. 1 Label Instruction Consider the MARIE program on the right a) List the hexadecimal code for each instruction b) Draw the symbol table. 100 1 101 102 1 103 104 Test1 105 1 106 1 107 1 108 1 109 1 10A 1 10B 1 100 Test2 10D 1 10E 10F 1 110 1 111 1 112 113 1 XYEG 114 115 Done 116 X 117 1 Y INPUT STORE X INPUT STORE Y SUBT X SKIPCOND 000 JUMP Test2 LOAD X OUTPUT LOAD Y OUTPUT JUMP Done SKIPCOND 800 JUMP XYEG LOAD Y OUTPUT LOAD X OUTPUT JUMP Done LOAD X OUTPUT HALT DECO DECO Hint: Opcode 0000 0001 0010 0011 0100 0101 0110 Instruction Opcode Jns x 0111 Load X 1000 Store X 1001 Add x 1010 Subt X 1011 Input 1100 Output Instruction Halt Skipcond Jump X clear AddI X Jumpi x
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
