0% found this document useful (0 votes)
46 views17 pages

25 V5C Laboratory3

Uploaded by

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

25 V5C Laboratory3

Uploaded by

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

De La Salle Lipa

College of information technology and


Engineering
Electrical engineering department

Laboratory Exercise 3
Segmentation and Addressing Modes

Roda, Angelo Y. DOP: 11 - 21 - 17


BSEE – 4th Year DOS: 11 - 25 - 17
V5C - Microsy
Grade

Engr. Ramon P. Flores IV


Instructor
I. Objectives:
At the end of the exercise, the students
must be able to:
1. Understand the physical segmentation of
the memory, and the logical segmentation
of programs;
2. Determine the different addressing
modes; and
3. Learn how to calculate the physical and
offset addresses

II. Theory
DOS are mainly used to read a
character or a string from the keyboard,
which could be an iput data to a program
and display characters or strings, which
could be results or an output of a program.
Emulator 8086 is a windows based
application for assembly programming. It is
an Integrated Development Environment
(IDE) that includes advanced source editor
and 8086 assembler. Compared to other
major assemblers like Borland’s Turbo
Assembler (TASM) and Microsoft Macro
Assembler (MASM). Emulator 8086 has a
much easier syntax and, but will still
generate a program that can be executed
on any computer that runs 8086 machine
code.

III. Materials and Equipment used


Pc/s Description Manufacturer Range
1 Emulator 8086 ---- NA
1 Laptop LENOVO 100-240v
IV. Schematic Diagram

V. Final Data Sheet


A program that will convert upper case
letters to small case letters with maximum of
20 letters.
These are the codes that are used:
Org 100H
.MODEL SMALL
.STACK 200
.DATA
CRLF DB 0DH,0AH,'$'

MSG1 DB 'Enter a string of UPPER CASE


letters (max 20 characters).:',0DH,0AH,'$'
MSG2 DB 'In lower case it is:',0DH,0AH,'$'
BUFFER DB 21,22 DUP(?)

.CODE
.STARTUP

LEA DX,MSG1
MOV AH,09H
INT 21H

MOV AH,0AH
LEA DX,BUFFER
INT 21H

LEA DX, CRLF


MOV AH,09H
INT 21H

MOV AH,09H
MOV BH,00H
MOV BL,BUFFER[1]
MOV BUFFER[BX+2],"$"
INT 21H

MOV AH,09H
LEA DX,MSG2
INT 21H
MOV BP,02H ;LOOP
MOV CX,BX
AGAIN:

ADD BUFFER[BP],20H
INC BP
LOOP AGAIN
LEA DX,BUFFER[2]
INT 21H

.EXIT

END

THE CODE IN EMU 8086:


After pressing the RUN, this is the result. The
upper case letters converted to lower case.
VI. Discussion
Study the codes we need in this
experiment that our instructor discussed.
First we run Emulator 8086 and then we
read the laboratory manual for further
instructions of the experiment.
The familiarization with the commands
that are used in Emulator 8086, the samples
that are written in the manual because it is
crucial to have knowledge on that certain
example because it will be used in our
laboratory work. The first example taught us
how certain codes will function like the MOV
INT LEA and AS DX. The same goes for
example number two but with a little bit of
twist like the inputting of inputs to show the
offset message.
We perform codes that will ask the user
to input any upper case letters maximum of
20 and after that the program will show to
the user the converted lower case of the
input. With the help of the instruction
manual given to us by our professor there
are guidelines and examples that lead us to
perform well in this experiment. the code or
the assembly language program has the
directives like model small, stack, data and
code. These are the main backbone of the
program when the program is being run the
input must enter a capital letter and will
convert it to a small or no capitalize output.
From the photocopy given to us the
program 3-2 displays a message and reads
a new message from the keyboard.
VII. Conclusion
I therefore conclude that in this
experiment are another familiarization and
another addition to the knowledge in using
the application emulator 8086. The physical
segmentation of the memory, the term
segmentation is the process in which the
main memory of computer is divided into
different segments and each segment has
its own base address. The segmentation is
used to increase the execution speed of
computer system. One advantage of the
segmented memory is that it allows the
placing of code data and stack portions of
the same program in different parts.
The laboratory exercise lets us
create a program which requires am input of
a capital letters that converts it to a small
letters. It has a maximum of 20 characters
per input. After this code that has been ran,
different addresses are used and different
addressing mode in this program.

You might also like