Microprocessor
Microprocessor
INSTRUCTION FORMAT:
All instruction of 8085A 𝜇𝑝 are 1 to 3 bytes in length. The bit
pattern of the first cycle is the op-code. The bit pattern is decoded in
the instruction register and provides information used by the timing
and control section to generate sequence of elementary operations-
micro operations - that implement the instruction.
The 8-bit of the op-code is divided into three portions. First group D7,
D6, second group D5 D4 D3 and third group D2 D1 D0. D2 D1 D0 when
necessary contains the source code SSS as discussed in previous
lecture. D2 D1 D0 group contains the code of destination register DDD.
If a register pair is involved, the code bits RP is placed in D5 D4.
Whenever D5 D4 represents the register pair D3 normal tells whether it
is loading operation or storing operation. The first group D7 D6 gives
the idea of the mnemonic of the operation code.
Whenever a 2-byte instruction is used the first byte at memory
location N is the op-code of the instruction followed by either an 8-bit
data or an 8-bit address at memory location N+1.
Whenever a 3-byte instruction is involved, the first byte at
memory location N is the opcode followed by either a-16 bit address
or a 16-bit data. The second memory location i.e., N+1 contains the
lower order addresses or data and the third memory location N+2
contains the higher order address or data.
ADDRESSING MODES:
Most of the instruction execution requires two operands e.g.
transfer of data between two registers of a microprocessor system.
How the 𝜇𝑝 knows the positions of these operands? The method of
identifying the operands position by the instruction format is known as
the addressing mode. Whenever two operands are involved in an
instruction, the first operand is assumed to be in any register of the
𝜇𝑝 itself. It is for the user to put that operand in the register involved.
The second operand may be located in one of the following.
i. In any general purpose register of the microprocessor.
ii. In a particular external memory location.
iii. It can be immediately available in an instruction format.
iv. In an I/O device.
MOV r1, r2: This is an ALP statement and meaning of the instruction
is move the content of register r2 to register r1. The opcode for the
instruction is 01 DDD SSS. DDD specifies the code for the
destination register r2 and SSS specifies the code for source register
r1. The first two bits 01 specify the MOV operation e.g., MOV B, A
the opcode of the instruction is (01 000 111)2 = 47H.
where the memory location ‘N’ contains the opcode (00 110 010)2 =
(3A)H followed by a lower order 8-bits of address <B2> and higher
order 8-bit of address <B3> at memory location N+1 & N+2
respectively. The meaning of instruction is load the accumulator from
the memory location whose 16-bit address is available directly, in the
instruction itself. The macro RTL implemented is,
(A) M(B3, B2)
This is symbolic representation. Only one operand is involved in the
instruction execution.
e.g. MVI r, data there is two byte instruction .the instruction format is
00 DDD 110 N
<B2> N+1