Docsity

Instruction set in MPI, Schemes and Mind Maps of Microprocessor and Interfacing

Partial preview of the text

Download Instruction set in MPI and more Schemes and Mind Maps Microprocessor and Interfacing in PDF only on Docsity!

  • INSTRUCTION SET OF

Instruction Set of 8085

ļ‚— 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.

ļ‚— These 8-bits of binary value is called Op-Code or Instruction Byte.

Data Transfer Instructions

  • These instructions move data between registers, or between

memory and registers.

  • These instructions copy data from source to destination.
  • While copying, the contents of source are not modified.

Data Transfer Instructions

Opcode Operand Description MOV Rd, Rs Rd, M M, Rs Copy from source to destination. ļ‚— This instruction copies the contents of the source register into the destination register. ļ‚— The contents of the source register are not altered. ļ‚— If one of the operands is a memory location, its location is specified by the contents of the HL registers. ļ‚— Example: MOV B, C ļ‚— MOV B, M ļ‚— MOV M, C

Data Transfer Instructions

Opcode Operand Description LXI Reg. pair, 16-bit data Load register pair immediate ļ‚— This instruction loads 16-bit data in the register pair. ļ‚— Example: LXI H, 2034 H

Data Transfer Instructions

Opcode Operand Description LDA 16 - bit address Load Accumulator ļ‚— The contents of a memory location, specified by a 16- bit address in the operand, are copied to the accumulator. ļ‚— The contents of the source are not altered. ļ‚— Example: LDA 2034H

Data Transfer Instructions

Opcode Operand Description LHLD 16 - bit address Load H-L registers direct ļ‚— This instruction copies the contents of memory location pointed out by 16-bit address into register L. ļ‚— It copies the contents of next memory location into register H. ļ‚— Example: LHLD 2040 H

Data Transfer Instructions

Opcode Operand Description STA 16 - bit address Store accumulator direct ļ‚— The contents of accumulator are copied into the memory location specified by the operand. ļ‚— Example: STA 2500 H

Data Transfer Instructions

Opcode Operand Description SHLD 16 - bit address Store H-L registers direct ļ‚— The contents of register L are stored into memory location specified by the 16-bit address. ļ‚— The contents of register H are stored into the next memory location. ļ‚— Example: SHLD 2550 H

Data Transfer Instructions

Opcode Operand Description XCHG None Exchange H-L with D-E ļ‚— The contents of register H are exchanged with the contents of register D. ļ‚— The contents of register L are exchanged with the contents of register E. ļ‚— Example: XCHG

Addition

  • Any 8-bit number, or the contents of register, or the contents of

memory location can be added to the contents of accumulator.

  • The result (sum) is stored in the accumulator.
  • No two other 8-bit registers can be added directly.
  • Example: The contents of register B cannot be added directly to the

contents of register C.

Subtraction

  • Any 8-bit number, or the contents of register, or the contents of

memory location can be subtracted from the contents of

accumulator.

  • The result is stored in the accumulator.
  • Subtraction is performed in 2’s complement form.
  • If the result is negative, it is stored in 2’s complement form.
  • No two other 8-bit registers can be subtracted directly.

Arithmetic Instructions

Opcode Operand Description ADD R M Add register or memory to accumulator

ļ‚— The contents of register or memory are added to the contents of

accumulator.

ļ‚— The result is stored in accumulator.

ļ‚— If the operand is memory location, its address is specified by H-L pair.

ļ‚— All flags are modified to reflect the result of the addition.

ļ‚— Example: ADD B or ADD M

Arithmetic Instructions

Opcode Operand Description ADC R M Add register or memory to accumulator with carry

ļ‚— The contents of register or memory and Carry Flag (CY) are added to the

contents of accumulator.

ļ‚— The result is stored in accumulator.

ļ‚— If the operand is memory location, its address is specified by H-L pair.

ļ‚— All flags are modified to reflect the result of the addition.

ļ‚— Example: ADC B or ADC M