2. INSTRUCTION SET
An instruction is a binary pattern designed inside a
microprocessor to perform a specific function.
The entire group of instructions that a microprocessor
supports is called Instruction Set.
8085 has 246 instructions.
Each instruction is represented by an 8-bit binary value.
3. Instruction has two parts
Opcode
Operand
Opcode: The task to be performed
Operand: data to be operated on
4. T-state
A portion of an operation carried out in one system clock period
is called as T-state
5. Instruction cycle
It is time required to complete the execution of the instruction. It consists
of 1-5 M/Cs. Fetch, decode and execute are sub tasks of instruction cycle
8. INSTRUCTION CLASSIFICATION- BASED ON OPERATIONS
The Classification of Instruction Set of 8085 can be categorized into five different
groups based on the nature of operations.
1. Data transfer operations
2. Arithmetic operations.
3. Logical operations
4. Branching operations
5. Machine control operations
9. DATA TRANSFER OPERATIONS
This group of instructions copy data from a location called a source to
another location called a destination, without modifying the contents of
the source. In technical manuals, the term data transfer is used for this
copying function.
Ex: MOV, MVI, LXI,LDA etc.., data transfer in nothing but similar to
copy function
10. Data transfer Types
1. Between Registers.
2. Specific data byte to a register or a memory location.
3. Between a memory location and a register.
4. Between an I/O device and the accumulator.
11. ARITHMATIC OPERATIONS
The arithmetic instructions of 8085 perform the following operations
Addition
Subtraction
Increment and decrement operations.
12. ARITHMATIC OPERATIONS
Addition
Any 8-bit number, or the contents of a register, or the contents of a memory location can
be added to the contents of the accumulator and the resulted sum is stored in the
accumulator.
The resulted carry bit is stored in the carry flag.
In 8085, no two other registers can be added directly, i.e. the contents of B and C registers
cannot be added directly.
To add two 16-bit numbers the 8085 provides DAD instruction. It adds the data within the
register pair to the contents of the HL register pair and resulted sum is stored in the HL
register pair.
13. ARITHMATIC OPERATIONS
Subtraction
Any 8-bit number, or the contents of a register, or the contents
of a memory location can be subtracted from the contents of the
accumulator and the result is stored in the accumulator.
The resulted borrow bit is stored in the carry flag
In 8085, no two other registers can be subtracted directly.
15. LOGICAL OPERATIONS
The logical instructions provided by 8085 perform the following
operations.
AND
OR
NOT
EX-OR
COMPARE
ROTATE
COMPLEMENT
16. LOGICAL OPERATIONS
Logical
Using logical instructions, any 8-bit number, or the contents of a
register, or of a memory location can be logically ANDed, ORed, or
Exclusive-ORed with the contents of the accumulator and the result
is stored in the accumulator.
The result also affects the flags according to definition. For example,
the zero result sets the zero flag.
17. LOGICAL OPERATIONS
Rotate
These instructions allow shifting of each bit in the accumulator
either left or right by 1 bit position.
Complement
The result of accumulator can be complemented with this It
replaces all 0s by 1s and all 1s by 0s.
18. LOGICAL OPERATIONS
Compare
Any 8-bit number, or the contents of a register,
or the contents of a memory location can be
compared for equality, greater than, or less
than, with the contents of the accumulator.
19. BRANCHING OPERATIONS
These instructions allow the 8085 to change the
sequence of the program, either unconditionally or
under certain test conditions.
These instructions include branch instructions,
subroutine call and return instructions and restart
instructions.
21. The microprocessor operations related to data manipulation can be summarized
in four functions:
1. Copying data
2. Performing arithmetic operations
3. Performing logical operations
4. Testing for a given condition and alerting the program sequence
22. Some important aspects of the instruction set are noted below:
1. In data transfer, the contents of the source are not destroyed; only the contents of
the destination are changed. The data copy instructions do not affect the flags.
2. Arithmetic and Logical operations are performed with the contents of the
accumulator, and the results are stored in the accumulator. The flags are affected
according to the results.
3. Any register including the memory can be used for increment and decrement.
4. A program sequence can be changed either conditionally or by testing for a given
data condition.