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

COLLEGE OF COMPUTER STUDEIS

INFORMATION TECHNOLOGY DEPARTMENT

CCS003L
(Computer System and Architecture)

EXERCISE

1
Running Assembly Language Using EMU8086

Student Name / Dianne Yael Cabrales


Group Name:
Nam Rol
e e
Members (if Group):

Section: TN21/1-C

Professor:
Ms.
I. PROGRAM OUTCOME/S (PO) ADRESSED BY THE LABORATORY EXERCISE

b. Analyze a complex problem and identify and define the computing requirements
appropriate to its solution.

II. COURSE LEARNING OUTCOME/S (CLO) ADDDRESSED BY LABORATORY


EXERCISE

1. Write the converted values and the result of the required operation of a number system.

III. INTENDED LEARNING OUTOME/S (ILO) ADDRESSES BY THE LABORATORY


EXERCISE
Create a simple program using Assembly Language.

IV. BACKGROUND INFORMATION

• Emu8086 is an 8086 microprocessor emulator and disassembler. It permit to assemble,


emulate and debug 8086 programs (16bit/DOS).
• A segmented memory model divides the system memory into groups of independent
segments referenced by pointers located in the segment registers. Each segment is used to
contain a specific type of data. One segment is used to contain instruction codes, another
segment stores the data elements, and a third segment keeps the program stack.

V. EXPERIMENTAL PROCEDURE:

1. Create a program that will display the lyrics of your favorite song.
Source code
.model small
.data

prompt db "Do you want to see the lyrics of my Favorite Song?$"


song db "Dear Maria by All Time Low$"
intro db 10,13,10,13,"[Intro]$"
intro1 db 10,13, "I got your picture$"
intro2 db 10,13, "Im coming with you$"
intro3 db 10,13, "Dear Maria, count me in$"
intro4 db 10,13, "Theres a story at the bottom if this bottle$"
intro5 db 10,13, "And Im the pen$"
verse db "[Verse]$"
verse1 db 10,13, "When the lights go off$"
verse2 db 10,13, "I wanna watch the way you$"
verse3 db 10,13, "Take the stage by strom$"
verse4 db 10,13, "The way you wrap those boys around your finger$"
verse5 db 10,13, "Go on and play the leader$"
verse6 db 10,13, "Cause you know it's what you're good at$"
verse7 db 10,13, "The low road for the fast track$"
verse8 db 10,13, "Make every second last$"
chorus db "[Chorus]$"
chorus1 db 10,13, "Cause I got your picture$"
chorus2 db 10,13, "Im coming with you$"
chorus3 db 10,13, "Dear Maria, count me in$"
chorus4 db 10,13, "Theres a story at the bottom of this bottle$"
chorus5 db 10,13, "And I'm the pen$"
chorus6 db 10,13, "Make it count when I'm the one$"
chorus7 db 10,13, "Who's selling you out$"
chorus8 db 10,13, "Cause it feels like stealing hearts$"
chorus9 db 10,13, "Calling your name from the crowd$"
last db "Hope you like my Favorite Song$"

anykey db 10,13,10,13, "Press any key to continue...$"

.code

mov ax,@data
mov ds, ax

mov ah,09
lea dx,prompt
int 21h

mov ah,09h ;pause


lea dx,anykey
int 21h
;input of the user
mov ah,07h
mov dx,00h
int 21h

mov ax, 03 ;clear - cls


int 10h

mov ah,09
lea dx,song
int 21h

mov ah,09
lea dx,intro
int 21h

mov ah,09
lea dx,intro1
int 21h

mov ah,09
lea dx,intro2
int 21h

mov ah,09
lea dx,intro3
int 21h

mov ah,09
lea dx,intro4
int 21h

mov ah,09
lea dx,intro5
int 21h

mov ah,09h ;pause


lea dx,anykey
int 21h
;input of the user
mov ah,07h
mov dx,00h
int 21h

mov ax, 03 ;clear - cls


int 10h

mov ah,09
lea dx,verse
int 21h

mov ah,09
lea dx,verse1
int 21h

mov ah,09
lea dx,verse2
int 21h

mov ah,09
lea dx,verse3
int 21h

mov ah,09
lea dx,verse4
int 21h

mov ah,09
lea dx,verse5
int 21h

mov ah,09
lea dx,verse6
int 21h
mov ah,09
lea dx,verse7
int 21h

mov ah,09
lea dx,verse8
int 21h

mov ah,09h ;pause


lea dx,anykey
int 21h
;input of the user
mov ah,07h
mov dx,00h
int 21h

mov ax, 03 ;clear - cls


int 10h

mov ah,09
lea dx,chorus
int 21h

mov ah,09
lea dx,chorus1
int 21h

mov ah,09
lea dx,chorus2
int 21h

mov ah,09
lea dx,chorus3
int 21h

mov ah,09
lea dx,chorus4
int 21h

mov ah,09
lea dx,chorus5
int 21h

mov ah,09
lea dx,chorus6
int 21h

mov ah,09
lea dx,chorus7
int 21h

mov ah,09
lea dx,chorus8
int 21h

mov ah,09
lea dx,chorus9
int 21h

mov ah,09h ;pause


lea dx,anykey
int 21h
;input of the user
mov ah,07h
mov dx,00h
int 21h

mov ax, 03 ;clear - cls


int 10h

mov ah,09
lea dx,last
int 21h

mov ah,4ch
mov al,00h
int 21h

end
VI. QUESTION AND ANSWER:

1. What is your understanding about machine codes?

Machine code is a strictly numerical language which is intended to run as fast as possible, and it may be regarded
as the lowest-level representation of a compiled or assembled computer program or as a primitive and hardware-
dependent programming language.
2. How does the Assembly Language improve our programming skills?

Assembly language is as close to the processor as you can get as a programmer so a well designed algorithm is
blazing -- assembly is great for speed optimization. ... Much like an assembly line, you write code to push single
values into registers, deal with memory addresses directly to retrieve values or pointers.

Note: The following rubrics/metrics will be used to grade students’ output in the lab
Exercise 1.

Program (100 pts.) (Excellent) (Good) (Fair) (Poor)


Program Program executes Program executes Program executes Program does not
execution (20pts) correctly with no with less than 3 with more than 3 execute (10-11pts)
syntax or runtime errors (15-17pts) errors (12-14pts)
errors (18-20pts)
Correct output Program displays Output has minor Output has Output is incorrect
(20pts) correct output errors (15-17pts) multiple errors (10-11pts)
with no errors (12-14pts)
(18-20pts)
Design of output Program displays Program displays Program does not Output is poorly
(10pts) more than minimally display the designed (5pts)
expected (10pts) expected output required output (6-
(8-9pts) 7pts)
Design of logic Program is Program has slight Program has Program is
(20pts) logically well logic errors that do significant logic incorrect (10-
designed (18- no significantly errors (3-5pts) 11pts)
20pts) affect the results
(15-17pts)
Standards Program code is Few inappropriate Several Program is poorly
(20pts) stylistically well design choices inappropriate written (10-11pts)
designed (18- (i.e. poor variable design choices
20pts) names, improper (i.e. poor variable
indentation) (15- names, improper
17pts) indentation) (12-
14pts)
Delivery The program was The program was The program was The program was
(10pts) delivered on time. delivered a day delivered two days delivered more
(10pts) after the deadline. after the deadline. than two days after
(8-9pts) (6-7pts) the deadline. (5pts)

Topic How Computer Works


Lab Activity No 1
Lab Activity Running Assembly Language
Using EMU8086
CLO 1
Program execution (20)
Correct output (20)
Design of output (10)
Design of logic (20)
Standards (20)
Delivery (10)
TOTAL

You might also like