Exp 2

You might also like

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

Course Code: EEE-318.

Course Title: Microprocessor and Interfacing Lab.

Experiment No: 02
Experiment Name: Convert Uppercase to Lowercase Letter by a Program.

Date of Experiment: 29-06-2021


Date of Submission: 04-07-2021

Submitted To, Submitted By,

MR. SHEMUL SUTRA DHAR Name: Ashikul Islam Shipon


Lecturer, ID: 183001068 (D1)
Department Of EEE
Batch: 183
Green University Of Bangladesh
Department Of EEE

Green University Of Bangladesh

Remarks
Objective:
1. We will learn about the various instructions of the code from this program and see it through
the Emulator 8086 software.
2. We will learn about how to convert Uppercase to Lowercase Letter by a Program.

Theory:
Assembly Language: It is a low-level programming language that uses a code to instruct a
machine or processor to perform a task.

Low level language: It is a type of language that has less instruction set to make the processor
work so that the programmer can easily understand the low level language compared to the
high level language.

ORG 100: ORG (abb. for Origin) is called a type of assembly directive (it is not an instruction of
any kind). In a word, it can be called the format of the program.

.DATA: .DATA is used to work with data in the program. This section declares any various
constant values, file size, or buffer size etc.
MSG: MSG is short form of message.

DB: DB segment means that memory will start working with one or more byte values. It stores
the byte value in memory.

.CODE: .CODE is used to write the main program line of a program that is used to operate a
microprocessor. This is a fixed area.

LEA: Use LEA (Lower effective address) instruction to display input message at output.

MAIN PROC: We use the MAIN PROC instructions when we start the main procedure of a
program.

MOV AH, 1: MOV AH, 1 instruction is used when we do not have any input in the
program. This instruction is used for input only.

INT 21H: The INT 21H instruction is used to run the input output operation smoothly.

MOV AH, 2: MOV AH, 2 instructions are used when we want to get something as output in the
program. This instruction is used for output only.
MOV: It’s an instruction format. It’s using for moving data from one location to another.

ADD: ADD instruction is used when adding information stored in one register to information
stored in another register.

AX: It is a 16 bit general category register. It is used for the accumulator.

@DATA: It’s a kind of source instruction. We use instruction @DATA when we need an instant
value.

DS: It’s a 16 bit segment category register. DS’s full meaning is Data segment.

MOV AH,9: It is an output operation. It’s one of the instruction which is used for seeing output
result on emulator screen.

MOV DL,0DH: We use instruction for carriage return. Carriage return means to return to the
beginning of the current line.

MOV DL,0AH: This instruction we used for line feed.

MOV BL,20H: This instruction is used for converting part. Along with this instruction we use
ADD CL, BL to converting a word from upper case to lower case.

END MAIN: This is the Ending instruction of a program.

RET: RET is the short form of return. It’s also ending format.

Program/code:
ORG 100H

.DATA

MSG1 DB 'ENTER THE UPPERCASE: $'

.CODE

MAIN PROC

MOV AX,@DATA

MOV DS,AX

LEA DX,MSG1

MOV AH,9

INT 21H
MOV AH,1

INT 21H

MOV CL,AL

MOV AH,2

MOV DL,0DH

INT 21H

MOV DL,0AH

INT 21H

MOV BL,20H

ADD CL,BL

MOV AH,2

MOV DL,CL

INT 21H

MAIN ENDP

END MAIN

RET

Output/Result:
Discussion:
Through this experiment I can learn Emulator 8086 software and how to convert
Uppercase to Lowercase Letter by a Program in this software. Here we can learn about
different 16 bit and 8 bit registers, how these registers store data, what types of
registers are. Also from the code here we have .DATA, MOV, .CODE, LEA,ADD, MOV
AH,1, MAIN PROC etc. work to know about it. Now I can program with this software to
convert an uppercase letter to a Lowercase letter.

You might also like