This document discusses microprocessor instructions and data formats used by the 8085 microprocessor. It describes the different types of instructions based on byte size - 1-byte, 2-byte, and 3-byte instructions. It explains the opcode and operand parts of instructions. It also discusses various data formats used like ASCII, BCD, hexadecimal, signed and unsigned integers.
2. INTRODUCTION
An instruction is a command issued in the form
of a bit pattern to perform a given task on a
specified data.
Each instruction basically consists of two parts,
the first part is called OPCODE and the second as
OPERAND.
The operand either provides the data or specifies
data to be operated on. The operand can be
specified in a number of ways, it includes:
3. INTRODUCTION
8 – bit /16 – bit internal general purpose register
A memory location
8 – bit port address/16 – bit memory address
Implicit operand: the operand is not specified, instead it is
assumed in register.
A programmer can easily write a program in alphanumeric
symbols instead of zeros and ones.
Meaningful and easily rememberable symbols are chosen
for the purpose, examples are: ADD for addition, SUB for
subtraction, CMP for comparison etc. Such symbols are
called MNEMONICS.
4. INTRODUCTION
A program written in mnemonics is known as assembly
language program.
The writing of a program in assembly language is much easier
and faster as compared to the writing of a program in machine
language, both assembly language and machine language are
microprocessor-specific.
A microprocessor-specific language is known as a low-level
language.
The distinguishing features of an assembly language is that
corresponding to one mnemonic, there is only one machine
code.
On the other hand, corresponding to one statement of a high-
level language, there is a number of machine codes.
5. INSTRUCTION FORMAT (INSTRUCTION WORD SIZE)
An instruction is a command to the microprocessor to
perform a given task on specified data.The 8085
instruction set is classified into the following three group
according to word size or byte size:
1-byte instructions
2-byte instructions
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 byte rather than words.
In all instructions the first byte is always the opcode,
while remaining are operands.
6. ONE – BYTE INSTRUCTIONS
In a 1 –byte instruction, there is only one Hex code, known as a
Opcode or machine code.
Such type instructions include the opcode and operand in the
same byte. For example:
These instructions are one-byte instructions having only one
hex code each, known as opcode, performing three different
tasks.
In the first instructions both operand registers are specified.
In the second instruction, the operand B is specified and the
other operand accumulator is assumed.
Similarly, in the third instructiion, the accumulator is assumed
to be the implicit operand. These instrucions require one
memory location each, stored in 8 – bit binary format in
memory.
8. TWO – BYTE INSTRUCTIONS
In a 2 – byte instruction, the first byte specifies
the operation code (opcode) and the second byte
specifies the operand. For example:
These instructions would require two memory
locations each to store the hex code. The data
bytes 45H are taken arbitrarily as examples.
10. THREE – BYTES INSTRUCTIONS
In a 3 – bytes instruction, the first byte specified
the opcode and the rest – two bytes specifies the
16 – bit address. Note the second byte is the low-
order address and the third byte is the high-order
address. For example:
These instructions would rquire three memory
location each to store the hex codes. The 16-bit
address F050 and F070H are taken arbitrarity as
example:
12. OPCODE FORMAT
The microprocessor 8085 has has 8-bit opcode. To
understand, how a opcode is designed/formated in
microprocessor. We need to specify all operation codes
(opcode) in binary format and 8-bits are divided in various
groups. The opcode is unique for each instruction and
contains the information about operation register to be
used, memory to be used, etc.
The microprocessor 8085 identifies, all operation, registers
and status flags with a specific code, known as opcode.
For example, all internal registers are identified as follows:
There is different code for each operation. Some of the
operation codes are identified as follows:
16. DATA FORMAT
The 8085 is an 8-bit microprocessor and it can
process only binary numbers.
However, the real world operates in decimal number
and languages of alphabets and characters.
Therefore, it is needed to code binary number into
different media.
In 8-bit microprocessor system, commonly used
codes and data formats are ASCII,BCD,HC,Signed
integer and unsigned integer. They are explained as
follows:
17. ASCII CODE
The ASCII stands for American Standard Code for
Information Interchange: it is pronounced as “ask-
ee”.
It is a 7-bit alphanumeric code that represents
decimal numbers, English alphabets and
nonprintable characters such as carriage return.
The ASCII code is widely used in small computers,
peripherals, instruments and communication devices.
Extended ASCII is an 8-bit code. The additional
number (beyond 7-bit ASCIIcode) represents
graphical characters.
19. BCD CODE
The term BCD stands for binary-coded decimal,
it is used for decimal numbers (0 to 9 digit), are
represented by four binary bits (from 0000 to
1001).
The remaining numbers, 1010 (A) to 1111 (F), are
considered invalid. An 8-bit register in the 8085
MP can accommodate two BCD numbers.
20. HEX CODE (HC)
Hex code is widely used with computers and other
digital systems.
The base of hex code is 16. the digit from 0 to 9 are
same as those of the decimal numbers.
In this code 10 is represented by A, 11by B, 12 by C,
13 by D, 14 by E and 15 by F.
The decimal number 16 is represented by 10H, 17 by
11H, 18 by 12H, 32 by 20H, 33 by 21H and so on.
An 8-bit register in the 8085 MP (microprocessor)
can accommodate two hex code numbers.
21. SIGNED INTEGER
A signed integer is either a positive number or a negative
number.
In an 8-bit processor, the most significant digit, D7 is used
for the sign, 0 represents the positive sign and 1 represents
the negative sign.
Therefore, the largest positive integer that can be processed
by the 8085 is 0111 1111 (7FH): the remaining hex
numbers,80H to FFH are considered as negative numbers.
However, all negative numbers in 8085 microprocessor are
represented in 2’s compliment format.
22. UNSIGNED INTEGER
An integer without a sign can be represented by
all the 8-bits in a microprocessor register.
Therefore, the largest number that can be
processed at one time is FFH.