Computer Programming: Instruction Format

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

The OUT instruction copies the contents of the ______ to the output port address.

accumulator

The LHLD instruction loads the contents of specified memory location to ______ register and contents of next higher location to H-register.

L

The SHLD instruction stores the contents of ______ register to specified memory location and contents of H register to next higher memory location.

L

The XCHG instruction exchanges ______ pair with HL pair.

<p>DE</p> Signup and view all the answers

The ADD instruction is a ______ byte add instruction.

<p>1</p> Signup and view all the answers

The OUT instruction is a ______ byte instruction.

<p>2</p> Signup and view all the answers

The LHLD instruction is a ______ byte instruction.

<p>3</p> Signup and view all the answers

The microprocessor performs various arithmetic operations such as ______, subtraction, increment and decrement.

<p>addition</p> Signup and view all the answers

The LXI instruction is used to load the ______ register with a 16-bit value.

<p>H</p> Signup and view all the answers

The SHLD instruction is the opposite of ______ instruction.

<p>LHLD</p> Signup and view all the answers

Flashcards are hidden until you start studying

Study Notes

Instruction Description and Format

  • An instruction consists of two parts: operation code (Op-Code) field and operand or address field.
  • Operand can be specified in various ways, including 8-bit or 16-bit data, internal register, memory location, or 8-bit or 16-bit address.

Instruction Format

  • One address format (1 byte instruction): 1 byte is Op-code and operand is default.

Elements of Instruction Set

  • Each instruction contains information required for execution by the processor.
  • Elements of a machine instruction:
    • Operation code (Op-code): specifies the operation to be performed (e.g. ADD, I/O).
    • Source operand reference: inputs for the operation.
    • Result operand reference: the result of the operation.

Examples of Instructions

  • ADD R1, R0: adds the contents of R0 with the contents of R1 and stores the result in R1.
  • OUT 8-bit address: copies the contents of the accumulator to the output port address specified in the 2nd byte.
  • LHLD 16-bit address: loads the contents of the specified memory location to the L-register and the contents of the next higher location to the H-register.
  • SHLD 16-bit address: stores the contents of the L-register to the specified memory location and the contents of the H-register to the next higher memory location.
  • XCHG: exchanges the DE pair with the HL pair.

Arithmetic Group Instructions

  • The 8085 microprocessor performs arithmetic operations such as addition, subtraction, increment, and decrement.
  • Arithmetic operations have the following mnemonics:
    • ADD R/M: 1 byte add instruction.

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

More Like This

Use Quizgecko on...
Browser
Browser