Assume that
the next value retrieved from device 5 is 3, and that location 940 contains a
value of 2.
#1. Fetch:
The instruction at memory location 300 (this is the content of PC) is loaded into
IR. This instruction is 3005 (load AC
from I/O device 5)
PC) is
loaded into IR. This instruction is 3005 (load AC
from I/O device 5)
Memory
|
|
CPU
Registers
|
||
300
|
3005
|
|
300
|
PC
|
301
|
5940
|
|
|
AC
|
302
|
7006
|
|
3005
|
IR
|
|
|
|
|
|
940
|
0002
|
|
I/O
Device
|
|
|
|
|
005
|
0003
|
#2.
Execute : AC is loaded with the content of I/O device 5. PC is incremented.
Memory
|
|
CPU
Registers
|
||
300
|
3005
|
|
301
|
PC
|
301
|
5940
|
|
0003
|
AC
|
302
|
7006
|
|
3005
|
IR
|
|
|
|
|
|
940
|
0002
|
|
I/O
Device
|
|
|
|
|
005
|
0003
|
#3.
Fetch: The instruction at memory location 301 (this is the content of PC) is
loaded into IR. This instruction is 5940
(add AC to the content of location 940)
Memory
|
|
CPU
Registers
|
||
300
|
3005
|
|
301
|
PC
|
301
|
5940
|
|
0003
|
AC
|
302
|
7006
|
|
5940
|
IR
|
|
|
|
|
|
940
|
0002
|
|
I/O
Device
|
|
|
|
|
005
|
0003
|
#4.
Execute: The content of AC is added to the content of location 940. The result
is in AC. PC is incremented
Memory
|
|
CPU
Registers
|
||
300
|
3005
|
|
302
|
PC
|
301
|
5940
|
|
0005
|
AC
|
302
|
7006
|
|
5940
|
IR
|
|
|
|
|
|
940
|
0002
|
|
I/O
Device
|
|
|
|
|
005
|
0003
|
#5.
Fetch: The instruction at memory location 302 (this is the content of PC) is
loaded into IR. This instruction is 7006
(store AC at I/O device 6)
Memory
|
|
CPU
Registers
|
||
300
|
3005
|
|
302
|
PC
|
301
|
5940
|
|
0005
|
AC
|
302
|
7006
|
|
7006
|
IR
|
|
|
|
|
|
940
|
0002
|
|
I/O
Device
|
|
|
|
|
005
|
0003
|
#6.
Execute: The content of AC is stored into I/O device 6. PC is incremented.
Memory
|
|
CPU
Registers
|
||
300
|
3005
|
|
303
|
PC
|
301
|
5940
|
|
0005
|
AC
|
302
|
7006
|
|
7006
|
IR
|
|
|
|
|
|
940
|
0002
|
|
I/O
Device
|
|
|
|
|
005
|
0003
|
|
|
|
006
|
0005
|
No comments:
Post a Comment
thanks for comment :) this will answer after approval