Professional Documents
Culture Documents
Deepak John
COE,Poonjar
COMPUTER TYPES
SUPER COMPUTERS
ALU
Output
Interconnection between
Processor and Memory
•
•
•
last word
0 0 1 2 3 0 3 2 1 0
4 4 5 6 7 4 7 6 5 4
• •
• •
• •
k k k k k k k k k k
2 -4 2 -4 2 -3 2- 2 2 - 1 2 - 4 2- 1 2 - 2 2 -3 2 -4
B Data for
the program
Two-phase procedure
-Instruction fetch
C
-Instruction execute
Opcode Operand
Operand
Opcode Address A
Memory
Pointer to operand
Operand
Instruction
Registers
Operand
Deepak John, Department Of IT ,COE ,Poonjar
Register Indirect Addressing
• EA = (R)
• Operand is in memory cell pointed to by contents of
register R
• Mov (R1),A
Instruction
Registers Memory
100
AR = 100
101
102 1 1 0 A
103
104
XR = 2
100
AR = 100
101
102 1 1 0 A
103
104
AR = 2
100 0 0 0 5
BR = 100
101 0 0 1 2
102 0 0 0 A
Usually points to 103 0 1 0 7
the beginning of 104 0 0 5 9
an array
Opcode Operands
What to do with the data Where to get data and
(ALU operation) put the results
• An instruction has the following format:
between a main .
Bottom
43
program and BOTTOM
element
subroutines .
.
• SP-Stack pointer is a .
2k-1
processor register
used to keep track of PUSH: inserting an Element
the address of the POP: removing an element
element of the stack
that is at the Top
Deepak John, Department Of IT ,COE ,Poonjar
SP 19
-28 -28
17 SP 17
. .
. .
. .
43 43
(a) After push from NEWITEM (b) After pop into ITEM
Deepak John, Department Of IT ,COE ,Poonjar
Subroutines
• Only one copy of subroutine is store in a memory to save
space. Any program that want to use a subroutine simply
branches to its starting location.
• When a subroutine returns, the assembler has to make
sure that it returns to the appropriate location. The
simplest way is to use a link register to save the content of
the PC when a subroutine is called.
.
.
. Return
1000
PC 204
Link 204
Call Return
•Clock speed
•Type and number of instructions available
•Average time required to execute an instruction
•Memory access time
•Power dissipation in the system
•Number of I/O devices and types of I/O devices connected
•The data transfer capacity of the bus