Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
4-address instructions
3-address instructions
2-address instructions
1-address instructions
0-address instructions
1
Classification of instructions
(continued)
2
Classification of instructions
(continued)
3
Classification of instructions
(continued)
4
Classification of instructions
(continued)
5
Classification of instructions
(continued)
A 0-address instruction uses a stack
to hold both operands and the result.
Operations are performed between
the value on the top of the stack TOS)
and the second value on the stack
(SOS) and the result is stored on the
TOS
op code
6
Comparison of
instruction formats
As an example assume:
that a single byte is used for the op
code
the size of the memory address space
is 16 Mbytes
a single addressable memory unit is a
byte
Size of operands is 24 bits
Data bus size is 8 bits 7
Comparison of
instruction formats
(continued)
8
4-address instruction
op code destination source 1 source 2 next address
1 byte 3 bytes
1 byte
14
Example 2.1 text
expression evaluation a = (b+c)*d - e
15