Instruction and Data Format
An instruction (instruction format) is a command to the microprocessor to perform a given task on a particular data. Each instruction (instruction format) is of two parts. One is to be performed, called the operation code or opcode and the second one is the data to be operated on, called the operand. Operands or data can be specified in different ways. It may include an 8-bit or 16-bit data, an internal register. a memory location, or it or 16-bit address. In some instructions, the operand is implicit.
Instruction Word Size
The 8085 instruction set is of three groups according to word size:
- One-word or one-byte instructions.
- Two-word or two-byte instructions.
- Three-word or three-byte instructions.
In the 8085 microprocessor, byte and words are synonymous because it is an 8-bit microprocessor. But, instructions are commonly referred to in terms of bytes rather than words.
One-byte instructions
A one-byte instruction includes an opcode and an operand in the same byte. Operand(s) are internal registers and are in the instruction in the codes. If there is no numeral present in the instruction then that instruction will be of one-byte, for example, MOV C, A, RAL, and ADD B, etc. Table M.1 shows examples of one-byte instruction.
Two-byte instructions
In a two-byte instruction, the first byte specifies the operation code and the nd byte specifies the operand. The source operand is a data byte and immediately following the opcode. If an 8-bit numeral is present in the instruction then that instruction will be of two-byte. Here, the numeral may be a data or an address. For example, in MVI A, 35H and IN 29H, etc. In a two-byte instruction, the first byte will be the opcode and the second byte will be for the numeral present in the instruction.
Three-byte instructions
In a three-byte instruction, the first byte specifies the opcode, and the following two bytes specify the 16-bit operand. The second byte is the low-order operand and the third byte is the high-order operand. If a 16-bit numeral is present in the instruction then that instruction will be of three-byte. Here, the numeral may be a data or an address, for example, in LXI H,3500H and STA 2500H, etc.
You may also like Features of 8085 Microprocessor
Leave a Reply