Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 15

Experiment Number : 3

Experiment Title : 8088/8086 Programming using debug

Date Performed : September 17, 2021

Date Submitted : September 18, 2021

Instructor : Engr. Jullius Bancud

Subject/Section : Computer Architecture and organization/ COE41

Leader : Mendoza, Zara Marie

Members : Baluyot, Allen Nicko

:Tambong, Ariel

Presentation : _________________

Data and Results : _________________

Analysis and Conclusion : _________________

Answers to Questions : _________________

Total : _________________

Instructor’s Signature :__________________


LABORATORY NO. 3
8088/8086 PROGRAMMING USING DEBUG

Objectives ( your own objectives (3))


 To be able to know more that emu8086 is a powerful, offline and free software for
emulation, disassembling and debugging of 8086 programs i.e, 16 bits/DOS.” It is an
Integrated Development Environment (IDE) that write a source, assemble it and link
into . COM or . EXE file then trace it in machine code and source file.
 To gain more knowledge and expand the understanding that 8086 Microprocessor
Emulator, also known as EMU8086, is an emulator of the program 8086
microprocessor. It is developed with a built-in 8086 assembler. This application is
able to run programs on both PC desktops and laptops. This tool is primarily designed
to copy or emulate hardware. Emu8086 combines an advanced source editor,
assembler, disassembler, software emulator (Virtual PC) with debugger, and step by
step tutorials. This program is extremely helpful for those who just begin to study
assembly language. It compiles the source code and executes it on emulator step by
step.
 Familiarizing that assembly programming language is a low-level language which is
developed by using mnemonics. The microcontroller or microprocessor can
understand only the binary language like 0's or 1's therefore the assembler convert the
assembly language to binary language and store it the memory to perform the tasks.

Procedure ( your own procedure)

1. Identify the problem


2. Formulating ideas and gather ideas between our group members to be able to give
solution to the problem
3. Encoding of the codes and run it
4. Check the errors that may occur in the program
5. Debug the program if there is an errors
6. Run for the emulators to show the output of the program
7. Screenshot the following output and paste it to the documentation of the laboratory 3.
Programming Problem

1. Formulate an Assembly program that will display the different characters (‘0’ to ‘9’)
using LOOP with separator (underscore) horizontally.

Sample output:

0_1_2_3_4_5_6_7_8_9_

CODE
#make_COM#
ORG 100H

.MODEL SMALL
.STACK 100H
.DATA
.CODE

MOV AX, @DATA ; INITIALIZING DS


MOV DS, AX

MOV CX, 9 ; COUNTER


MOV DL, "0"

top:
PUSH DX
PUSH CX
MOV AH, 2
INT 21h

MOV DL, "_" ; DISPLAY THE UNDERSCORE


MOV AH, 2
INT 21h

POP CX
POP DX
INC DL
loop top

MOV DL, "9"


MOV AH, 2
INT 21h
MOV AH, 4ch
MOV AL,00h
INT 21h
ret
OUTPUT

2. Formulate an Assembly program that will display the given sample output.
Sample output:

9876543210

CODE
#make_COM#

; COM file is loaded at CS:0100h


ORG 100h

.MODEL SMALL
.STACK 0100H
.DATA
.CODE

MOV AX, @DATA ; INITIALIZING DS


MOV DS, AX

MOV CX, 10 ; COUNTER


MOV DX, 57 ; DISPLAY 9

L: ; LOOPING
MOV AH, 2
INT 21H
DEC DL ; DECREMENT
loop L

ret
OUTPUT
3. Formulate an Assembly program that will display the first 15 letters in alphabet
horizontally.

Sample output:

abcdefghijklmno

Code
#make_COM#

; COM file is loaded at CS:0100h


ORG 100h

.MODEL SMALL
.STACK 0100H
.DATA
.CODE

MOV AX, @DATA ; INITIALIZING DS


MOV DS, AX

MOV CX, 000FH ; COUNTER


MOV AH, 02H
MOV DL, 'a' ; DISPLAY a
b: INT 21H ; LOOPING
INC DL ; INCREMENT
LOOP b
MOV AX, 4C00H
INT 21H

Ret

Output

4. Formulate an Assembly program that will display the lowercase English alphabets
from z to a.

Sample output:

zyxwvutsrqponmlkjihgfedcba

CODE
#make_COM#

; COM file is loaded at CS:0100h


ORG 100h

.MODEL SMALL
.STACK 0100H
.DATA
.CODE

MOV AX, @DATA ; INITIALIZING DS


MOV DS, AX

MOV CX, 26 ; COUNTER


MOV DX, 122 ; DISPLAY THE z

L: ; LOOPING
MOV AH, 2
INT 21H

DEC DX ;DECREMENT
loop L

ret
OUTPUT

5. Formulate an Assembly program that will display the Uppercase English alphabets.
Sample output:

ACEGIKMOQSUWY

CODE
#make_COM#

; COM file is loaded at CS:0100h


ORG 100h

.MODEL SMALL
.STACK 0100
.DATA
C DB "ACEGIKMOQSUWY $"
.CODE

MOV AX, @DATA


MOV DS, AX

MOV AH, 09H


MOV DX, OFFSET C
INT 21H

MOV AX, 4C00H


INT 21H
RET
OUTPUT

6. Formulate an Assembly program that will display the Uppercase English alphabets.
SAMPLE OUTPUT:

J
I
H
G
F
E
D
C
B
A

CODE
#make_COM#

; COM file is loaded at CS:0100h


ORG 100h

.MODEL SMALL
.STACK 0100H
.DATA
.CODE

MOV AX, @DATA ; INITIALIZING DS


MOV DS, AX

MOV CX,10 ; COUNTER


MOV AH,02H
MOV DL,74 ; TO DISPLAY J
L: ; LOOPING
INT 21H
MOV BL, DL
MOV DL, 10
INT 21H
MOV DL, 0DH
INT 21H
MOV DL,BL
DEC DL
LOOP L

MOV AX, 4C00H


INT 21H

RET
OUTPUT
7. Formulate an Assembly program that will show your name, your academic year and
course, and the name of your school on screen. (Each Members)

Sample Output

LEAN P. BANCUD
4th Year – Computer Engineering
Universidad De Manila

CODE
#make_COM#

; COM file is loaded at CS:0100h


ORG 100h

.MODEL SMALL
.STACK 0100
.DATA

A1 DB 0AH,0DH, "ARIEL M. TAMBONG $"


A2 DB 0AH,0DH, "4TH Year-Computer Engineering $"
A3 DB 0AH,0DH, "Universidad De Manila $"
A4 DB 0AH,0DH, " $"
A5 DB 0AH,0DH, "ALLEN NICKO BALUYOT $"
A6 DB 0AH,0DH, "4TH Year-Computer Engineering $"
A7 DB 0AH,0DH, "Universidad De Manila $"
A8 DB 0AH,0DH, " $"
A9 DB 0AH,0DH, "ZARA MARIE MENDOZA $"
A10 DB 0AH,0DH, "4TH Year-Computer Engineering $"
A11 DB 0AH,0DH, "Universidad De Manila $"

.CODE
MOV AX, @DATA
MOV DS, AX

MOV AH, 09H


MOV DX, OFFSET A1
INT 21H

MOV AH, 09H


MOV DX, OFFSET A2
INT 21H

MOV AH, 09H


MOV DX, OFFSET A3
INT 21H

MOV AH, 09H


MOV DX, OFFSET A4
INT 21H

MOV AH, 09H


MOV DX, OFFSET A5
INT 21H

MOV AH, 09H


MOV DX, OFFSET A6
INT 21H
MOV AH, 09H
MOV DX, OFFSET A7
INT 21H

MOV AH, 09H


MOV DX, OFFSET A8
INT 21H

MOV AH, 09H


MOV DX, OFFSET A9
INT 21H

MOV AH, 09H


MOV DX, OFFSET A10
INT 21H
MOV AH, 09H
MOV DX, OFFSET A11
INT 21H

MOV AX, 4C00H


INT 21H

RET

OUTPUT
Conclusions
Ariel M. Tambong

Nung una naguluhan po ako sa mga codes nya pero binalikan ko lang ung ppt tsaka
ung mga example dun tapos sinundan sundan ko lang. nalito ako nung una sa number
2 at 6 kasi nung nirerarun ko sa 2 somosobra siya ng 9 un pala mali ung nalagay ko sa
counter ko sa 6 din ganun pero natama ko naman nung huli.

Baluyot, Allen Nicko F.

Firstly as we answering the laboratory about the emu8086 i realize na mas madali
itong gamitin kumpara sa ginagamit namin last lesson kasi pwede mong balikan ung
pagkakamali mo para maayos mo. Nahirapan kami at naging challenging din ito
samin kasi first time namin makagamit ng ganitong application pero nasagutan naman
namin. Lastly nahirapan ako mag install kasi may error sa pag rrun ng and pag
simulate ng program kaya tumagal kami.

Mendoza, Zara Marie A.

This laboratory and lesson we have last time is challenging for me because I'm not
familiar to this application emu8086, but this application is more easier than the
previous application we have because we can go back to the errors that occur and we
can see the errors if we run the program, lastly i struggling in the installation of the
application because their id an error when we are running the program and we
couldn't do anything because there is no way or tutorial in YouTube on how this
application fixed the emulators
Reference

https://www.elprocus.com/8086-assembly-language-programs-explanation/

https://bowenstaff.bowen.edu.ng/lectureslides/1585830528.pdf

https://bowenstaff.bowen.edu.ng/lectureslides/1585830528.pdf?
fbclid=IwAR3idFL0V-4W1T-
SCq62AzLJbv896Eqj875GtSNPNEK_0HMOHH95q0dB0c8

You might also like