Page 51 - DCAP210_INTRODUCTION__TO_MICROPROCESSORS
P. 51
Unit 3: Assembly Language Programming of 8085
3. Performing logical operations Notes
4. Testing for a given condition and alerting the program sequence
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 (with some expectations). 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.
In copy inst the data in the source is not changed only the data in the destination
Arithmetic and logic operations are performed in the accumulator and the
results are stored in accumulator
3.4 Instruction Format
An instruction is a command to the microprocessor to perform a given task on a specified data.
Each instruction has two parts: one is task to be performed, called the operation code (opcode),
and the second is the data to be operated on, called the operand. The operand (or data) can be
specified in various ways. It may include 8-bit (or 16-bit ) data, an internal register, a memory
location, or 8-bit (or 16-bit) address. In some instructions, the operand is implicit.
3.4.1 Instruction Word Size
The entire group of instructions, called the instruction set, determines functions the microprocessor
can perform. The 8085 instruction set is classified into the following three groups according to
word size:
1. One-word or 1-byte instructions
2. Two-word or 2-byte instructions
3. Three-word or 3-byte instructions
In the 8085, “byte” and “word” are synonymous because it is an 8-bit microprocessor. However,
instructions are commonly referred to in terms of bytes rather than words.
3.4.2 One-Byte Instructions
A 1-byte instruction includes the opcode and operand in the same byte. Operand(s) are internal
register and are coded into the instruction.
For example:
Task Opcode Operand Binary Code Hex Code
Copy the contents of the MOV C,A 0100 1111 4FH
accumulator in the register C.
Add the contents of register ADD B 1000 0000 80H
B to the contents of the
accumulator.
Invert (compliment) each CMA 0010 1111 2FH
bit in the accumulator.
LOVELY PROFESSIONAL UNIVERSITY 45