0% found this document useful (0 votes)
14 views

Instruction Types and AssemblerFile

The document provides an introduction to 8085 assembly language programming, describing different types of instructions including data transfer, arithmetic, logical, branching, and machine control operations. It explains the differences between machine language, assembly language, and how an assembler is used to convert assembly language instructions into machine code that the microprocessor can understand and execute.

Uploaded by

Kaseya Takahashi
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)
14 views

Instruction Types and AssemblerFile

The document provides an introduction to 8085 assembly language programming, describing different types of instructions including data transfer, arithmetic, logical, branching, and machine control operations. It explains the differences between machine language, assembly language, and how an assembler is used to convert assembly language instructions into machine code that the microprocessor can understand and execute.

Uploaded by

Kaseya Takahashi
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/ 16

Introduction to 8085 Assembly

Language Programming
ECE 3010 Microprocessor & Interfacing
Dr. Nu War
Professor
Faculty of Computer Systems and Technologies
Myanmar Institute of Information Technology
Instruction Classification

Instruction Types
Assembly Language
Programming Model
Instruction Format
Instruction Classification

Instruction Types

Assembler
Instruction Types

Data Transfer (Copy) Operations


Arithmetic Operations
Logical Operations
Branching Operations
Machine Control Opearations
Data Transfer Operations
 Copies data from a location called a source to another location called a
destination, without modifying the contents of the source.
 Types:
Between registers
Copy the contents of register B into register D
Specific data byte to a register or a memory location
Load register B with the data byte 32H
Between a memory location and a register
from memory location 2000H to register B.
Between an I/O device and the accumulator
form an input keyboard to the accumulator
Arithmetic Operations
 Perform arithmetic operations such as addition, subtraction, increment, and decrement
 Addition
 Any 8-bit number or the contents of register, or the content of a memory location can be added to
the contents of the accumulator and the sum is stored in the accumulator.
 No two other 8-bit registers can be added directly except DAD instruction (16 bit data directly)
 Subtraction
 Any 8-bit number or the contents of register, or the content of a memory location can be
subtracted from the contents of the accumulator and the result is stored in the accumulator.
 No two other 8-bit registers can be added directly .
 The subtraction is performed in 2’s complement, and the results, if negative, are expressed in 2’s
complement.
 Increment/Decrement
 The 8-bit contents of a register or a memory location can be incremented or decremented by 1.
Logical Operations
 Perform various logical operations with the contents of the accumulator.
 AND, OR, Exclusive-OR
 Any 8-bit number or the contents of register, or the content of a memory location can be
logically ANDed, Ored or Exclusive-Ored with the contents of the accumulator and the result
is stored in the accumulator.
 Rotate
 Each bit in the accumulator can be shifted either left or right to the next position
 Compare
 Any 8-bit number or the contents of register, or the content of a memory location can be
compared for equality, greater than or less than, with the contents of the accumulator and the
result is stored in the accumulator.
 Complement
 The contents of the accumulator can be complemented; all 0s are replaced by 1s and all 1s are
replaced by 0s.
Branching Operations

 Alters the sequence of program execution either conditionally or


unconditionally
 Jump
Conditional jumps are an important aspect of the decision-making
process in programming. ( test for a certain condition (eg Zero or
Carry flag) and alter the program sequence when the condition is met)
 Call, Return, and Restart
Change the sequence of a program either by calling a subroutine or
returning from a subroutine.
Machine Control Operations

Control machine functions

Halt

Interrupt

Do nothing
Assembly Language
Machine Language
Mnemonics
Assembler
Machine Language
 A microprocessor executes instructions given by the user
 Instructions should be in a language known to the microprocessor
 Microprocessor understands the language of 0’s and 1’s only
 This language is called Machine Language
 For 01001111,
 A valid machine language instruction of 8085
 It copies the contents of one of the internal registers of 8085 to another

01001111=4F MOV C, A
Example 1: A Machine language program to add two
numbers

3E 01 ; Copy value 01H in register A


06 02 ; Copy value 02H in register B
80 ; A=A+B
EF ; Go back to monitor 0111 1000
Assembly Language of 8085

It uses English like words to convey the action/ meaning called as
MNEMONICS
MOV to indicate data transfer
ADD to add two values
SUB to subtract two values
Example 2: Assembly language program to add
two numbers
MVI A, 01H ; Copy value 01H in register A
MVI B, 02H ; Copy value 02H in register B
ADD B ;A=A+ B
RST 5

Assembly language is specific to a given processor


Assembly language of 8085 is different than that of Motorola 6800
microprocessor
Assembler

Microprocessor understands Machine Language only!


Microprocessor cannot understand a program written in Assembly
language
A program known as Assembler is used to convert a Assembly
language program to machine language

Assembly Machine
Assembler
Language Language
Program
Program Code
Assignment

What is the advantage of using assembly language instead


of writing a program directly in machine language?
What type of programs are usually written in assembly
language?
What is the advantage of using a CPU register for
temporary data storage over using a memory location?

You might also like