Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

LAB 1: REVIEW OF 8085 PROGRAMMING

Objective:

Theory:

Introduction to Assembly language programming:

Machine language code consists of the 0-1 combinations that the computer decodes directly.
However, the machine language has the following problems:

• It greatly depends on machine and is difficult for most people to write in 0-1 forms.
• DEBUGGING is difficult.
• Deciphering the machine code is very difficult. Thus, program logic will be difficult to
understand.

To overcome these difficulties computer manufacturers have devised English-like words to


represent the binary instruction of a machine. This symbolic code for each instruction is called a
mnemonic.

Using these mnemonics machine language instructions can be written in symbolic form with each
machine instruction represented by one equivalent symbolic instruction. This is called an assembly
language.

Pros and Cons of Assembly Language:

• Assembly Language provides more control over handling particular hardware and software
• Assembly Programming generates smaller, more compact executable modules. This results
in faster execution of programs.
• On the other hand, assembly language is machine dependent. Each microprocessor has its
own set of instructions. Thus, assembly programs are not portable.

8085 programming model:


Instruction set:

• Data Transfer Instruction


• Arithmetic Instructions
• Logical Instructions
• Branching Instructions
• Control Instructions

Addressing modes:

The different ways in which microprocessor access the data is called addressing mode. There are
five different types of addressing modes in 8085.

• Immediate addressing mode


• Register addressing mode
• Direct addressing mode
• Indirect addressing mode
• Implied addressing mode

Programming:

Q1. WRITE AN ASSEMBLY LANGUAGE PROGRAM TO ADD THE DATA OF


MEMORY LOCATION 9000H AND 9001H AND STORE THE SUM AT 9003H AND
CARRY AT 9004H.
Q2. WRITE AN ASSEMBLY LANGUAGE PROGRAM TO SUBTRACT THE CONTENT
OF MEMORY LOCATION 9101H FROM 9000H AND STORE THE DIFFERENCE AT
9003H AND BORROW AT 9004H IF GENERATED.

Q3. WRITE AN ASSEMBLY LANGUAGE PROGRAM TO IDENTIFY THE NUMBER


STORED IN MEMORY LOCATION 9200H IS EITHER ODD OR EVEN.

Q4. WRITE AN ASSEMBLY LANGUAGE PROGRAM TO MULTIPLY THE DATA OF


MEMORY LOCATION 9000H AND 9001H AND STORE THE SUM AT 9003H AND
CARRY AT 9004H

Solution:

Q1.

S.N. Address Mnemonics Hex Value Comment


8000H 3A
Loads the value from 9000H to
1. 8001H LDA 9000H 00
accumulator
8002H 90
2.

Result and discussion:

Conclusion:

You might also like