0% found this document useful (0 votes)
16 views14 pages

(LE) BMMA2343 Microprocessor Technology (Lecture 08)

mikro

Uploaded by

faizirwan415
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views14 pages

(LE) BMMA2343 Microprocessor Technology (Lecture 08)

mikro

Uploaded by

faizirwan415
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

Chapter 6a

Introduction to Intel 8085


(Instructions)
BMMA 2343 MICROPROCESSOR TECHNOLOGY

Norain binti Rahim


Universiti Teknikal Malaysia Melaka
[email protected]

UTeM | Excellence Through Competency


Chapter Overview

1. Instruction Format
2. Addressing Modes
3. Flowchart
4. Register Pair

UTeM | Excellence Through Competency


3 1. Instruction Format
• There are two parts in instruction format:
o Opcode (Operation Code) : the task to be performed.
o Operand : data to be operated.

• 8085 instruction set consists one, two or three byte


instructions. The first bytes is always opcode.

• The operand can be specified in various ways. It may include


8/16 bits of data, an internal register, a memory location, or an
8/16 bits of address.

• In some instructions, the operand is implicit.

UTeM | Excellence Through Competency


4 1. Instruction Format
Instruction are commonly referred to in terms of bytes:

a) 1-byte instructions

Opcode + Operand

b) 2-byte instructions

Opcode Operand

c) 3-byte instructions

Opcode Operand Operand

UTeM | Excellence Through Competency


5 a. One-Byte Instructions
• One-byte instruction includes the opcode and operand in the
same byte.

• Example:
Mnemonics Machine Code

Operation Opcode Operand Binary Code Hex Code

Copy the content of MOV C, A 0100 1111 4FH


accumulator to Register C
Add the contents of ADD B 1000 0000 80H
Register B to the content
of accumulator
Invert (complement) each CMA 0010 1111 2FH
bit in accumulator

Shows that each instruction has two parts:


Opcode and Operand

UTeM | Excellence Through Competency


6 b. Two-Byte Instructions
• The first byte specifies the opcode and the second byte
specifies operand.

• Example:
Mnemonics Machine Code

Operation Opcode Operand Binary Code Hex Code

Load data 32H into MVI A, 32H 0011 1110 3EH


accumulator 0011 0010 32H
Load data F2H into MVI B, F2H 0000 0110 06H
Register B 1111 0010 F2H

• These instructions would require two memory locations each


to store the binary codes.

UTeM | Excellence Through Competency


7 c. Three-Byte Instructions
• The first byte specifies the opcode and follows by two bytes
specify the 16-bit address.

• Example:
Mnemonics Machine Code

Operation Opcode Operand Binary Code Hex Code

Load contents of memory LDA 2050H 0011 1010 3AH


2050H into accumulator 0101 0000 50H
0010 0000 20H
Jump to memory address JMP 2085H 1100 0011 C3H
2085H 1000 0101 85H
0010 0000 20H

• These instructions would require three memory locations


each to store the binary codes.

UTeM | Excellence Through Competency


8 2. Addressing Modes
• The microprocessor has different ways of specifying the data for
the instruction. These are called addressing modes. 8085 has
five addressing mode:

Addressing Description Example


Modes
Implied When no address is specified in the instruction. CMA
HLT
Immediate • Immediate addressing of opcode and
immediately followed by a data. MVI B, 45H
• Mnemonic ending with I indicate the opcode is ADI 34H
immediate addressing.
Direct • Opcode that is followed by the memory address
where the executed data to be stored. LDA 4000H
• Memory address is usually needs two words.
Indirect Uses special register to refer to a memory MOV A, M
address. ADD M
Register Opcode that is followed by the register where the MOV B, A
data to be taken from. CMP E

UTeM | Excellence Through Competency


9 3. Flowchart
• The preliminary step in writing a program is to represent the
idea into a pictorial format called flowchart.

• Below is the symbol and its meaning in constructing flowchart:

Symbol Name Description


Process Represents a process, operation or task.

Decision • Represent a decision-making block.


• Used to identify a point in the program
where a condition is evaluated.

Terminator Indicates the beginning or end of a program.

UTeM | Excellence Through Competency


10 3. Flowchart

Symbol Name Description


Used to show an operation that brings data
Input / Output into a program, or an operation that sends
data out of the program (aka represent
input/output).
Predefined Such a subroutine
process

Direction Exhibit the direction flow of the flowchart

UTeM | Excellence Through Competency


11

UTeM | Excellence Through Competency


12 4. Register Pair

• 8085 is an 8-bit microprocessor. So, its general purpose


registers are 8-bits wide.

• But it uses 16-bit addresses. To allow manipulation of the 16-


bit addresses, the 8085 allows its registers to be paired.

• In other words, it is possible to combine two 8-bit registers


together into 16-bit super register or a register pair.

• The 8085 recognizes only 3 register pairs:


BC, DE and HL.

UTeM | Excellence Through Competency


13 4. Register Pair
• A register pair is identified with the name of the first register
in the pair.

• Therefore, the three register pairs are called:


o B : for BC register pair
o D : for DE register pair
o H : for HL register pair

• To place a 16-bit number into a register pair, we can place an


8-bit number in each of two registers separately.

• For example: MVI H, 40H


MVI L, 01H
UTeM | Excellence Through Competency
14 4. Register Pair
• There is also an instruction in 8085 where we can place a 16-
bit data directly into a register pair in only one step.

• For example: LXI H, 40001H

H L

40 01

• Instruction LXI can be used to load register pair with immediate


16-bit data.

• From the previous example: LXI H, 4001H will place the 16-bit
data (4001H) into the register pair HL.

UTeM | Excellence Through Competency

You might also like