Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1.1. Suppose the hypothetical processor of Figure 1.3 also has two I/O instructions: 0011 = Load AC from I/O 0111 = Store AC to I/O
1.1. Suppose the hypothetical processor of Figure 1.3 also has two I/O instructions:
0011 = Load AC from I/O 0111 = Store AC to I/O
In these cases, the 12-bit address identifies a particular external device. Show the pro- gram execution (using format of Figure 1.4) for the following program:
1. Load AC from device 5. 2. Add contents of memory location 940. 3. Store AC to device 6. Assume that the next value retrieved from device 5 is 3 and that location 940 contains a value of 2.
Fetch stage Execute stage CPU registers Memory 300 1 9 4 0 301 5 9 4 1 302 2 9 4 1 Memory CPU registers 3 0 0 PC 300 1 9 4 0 AC 301 5 9 4 1 19 4 0 IR 302 2 9 4 1 3 01 PC 000 3 AC 1940 IR 940 0 00 3 941 0 0 0 2 940 0 0 0 3 941 0 0 0 2 Step 1 Step 2 Memory Memory 300 1 9 40 3015 9 41 302 2 9 4 1 CPU registers CPU registers 3 0 1PC 300 19403 0 2 PC 00 0 3 AC 301 5 9 4 1 5 9 4 IR 302 2 9 4 1 0 00 5 AC 5941IR 940 0 00 3 941 0 0 0 2 3 +2-5 940 0 0 0 3 941 0 0 0 2 Step 3 Step 4 Memory Memory 300 1 9 40 301 5 9 4 1 302 2 9 4 1 CPU registers CPU registers 3 0 2 PC 300 1 9 4 0 000 5AC| 3015 9 4 1 29 4 IR 302 2 9 4 1 3 0 3 PC ? ? ? 51AC 29 41 IR 940 0 0 0 3 941 0 0 0 2 940 0 00 3 941 0 0 0 5 Step 5 Step 6 Figure 1.4 Example of Program Execution (contents of memory and registers in hexadecimal) Fetch stage Execute stage CPU registers Memory 300 1 9 4 0 301 5 9 4 1 302 2 9 4 1 Memory CPU registers 3 0 0 PC 300 1 9 4 0 AC 301 5 9 4 1 19 4 0 IR 302 2 9 4 1 3 01 PC 000 3 AC 1940 IR 940 0 00 3 941 0 0 0 2 940 0 0 0 3 941 0 0 0 2 Step 1 Step 2 Memory Memory 300 1 9 40 3015 9 41 302 2 9 4 1 CPU registers CPU registers 3 0 1PC 300 19403 0 2 PC 00 0 3 AC 301 5 9 4 1 5 9 4 IR 302 2 9 4 1 0 00 5 AC 5941IR 940 0 00 3 941 0 0 0 2 3 +2-5 940 0 0 0 3 941 0 0 0 2 Step 3 Step 4 Memory Memory 300 1 9 40 301 5 9 4 1 302 2 9 4 1 CPU registers CPU registers 3 0 2 PC 300 1 9 4 0 000 5AC| 3015 9 4 1 29 4 IR 302 2 9 4 1 3 0 3 PC ? ? ? 51AC 29 41 IR 940 0 0 0 3 941 0 0 0 2 940 0 00 3 941 0 0 0 5 Step 5 Step 6 Figure 1.4 Example of Program Execution (contents of memory and registers in hexadecimal)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