Question
5. Consider the following E15 assembly program. /* OPCODE SRC DST IMMDATA */ myROM [0] = { jmp , RXX , RXX , 4 b0010
5. Consider the following E15 assembly program.
/* OPCODE SRC DST IMMDATA */
myROM [0] = { jmp , RXX , RXX , 4 b0010 };
myROM [1] = { jmp , RXX , RXX , 4 b0000 };
myROM [2] = { movi , RXX , Rg0 , 4 b1111 };
myROM [3] = { cmpi , RXX , Rg0 , 4 b0000 };
myROM [4] = { jz , RXX , RXX , 4 b1101 };
myROM [5] = { movi , RXX , Rg1 , 4 b1111 };
myROM [6] = { cmpi , RXX , Rg1 , 4 b0000 };
myROM [7] = { jz , RXX , RXX , 4 b0011 };
myROM [8] = { subi , RXX , Rg1 , 4 b0001 };
myROM [9] = { jmp , RXX , RXX , 4 b1101 };
myROM [10] = { subi , RXX , Rg0 , 4 b0001 };
myROM [11] = { jmp , RXX , RXX , 4 b1000 };
myROM [12] = { jmp , RXX , RXX , 4 b0000 };
myROM [13] = { jmp , RXX , RXX , 4 b0000 };
myROM [14] = { jmp , RXX , RXX , 4 b0000 };
myROM [15] = { jmp , RXX , RXX , 4 b0000 };
(a) When this program is run, how many times will the instruction in ROM cell 8 be executed? Explain.
(b) How many times will the instruction in ROM cell 10 be executed? Explain.
(c) How many times will the instruction in ROM cell 12 be executed? Explain.
(d) How many times will the instruction in ROM cell 1 be executed? Explain.
(e) Write an English sentence explaining what this program does. Your description should be highlevel, and should describe its overall effect, not its step-by-step behavior.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started