You are on page 1of 2

EENG410 Microprocessors I

Eastern Mediterranean University


Faculty of Engineering
Department of Electrical and Electronic Engineering

LAB1
Objective: Students will learn debug programming commands, and explore simple
Assembly Language Instructions in assembly and run them.

To run the program you need to follow these steps:

1- Use the Command Prompt file under EENG410 folder.

2- In the DOS screen write tasm myfilename.asm then press enter.

3- Write tlink myfilename.obj then press enter

4- Write debug myfilename.exe then press enter.

5- Type U CS:0000 000F then press enter. This will show the first 16 bytes in the Code Segment

6- Retrieve the value of DS (i.e. XXXX) . Then type D XXXX:0000 000F and press enter to
see the first 16 bytes of Data Segment, before running the program.

7- To run the program, type “G” then press enter.

8- Then type D XXXX:0000 000F and press enter to see the new content of the Data Segment
after running the program

(Opyional Step) type T and repeatedly press enter till you see the end of the program (i.e. INT
instruction in the end).

You need to write the relevant commands every time you run your program.

Lab Work:
As the first example we will see the addition of two hexadecimal numbers. Each
student should run the program and should try to trace it as well.

.MODEL SMALL
.STACK 64H
.DATA
X DB 52H
Y DB 29H
ORG 0010H
SUM DB ?

.CODE
MAIN: MOV AX, @DATA
MOV DS,AX
MOV AL,X
MOV BL,Y
ADD AL,BL
MOV SUM,AL
MOV AH,4CH
INT 21H
END MAIN

H.W. 1 (deadline: one week)


Write a program that uses ADD command to do the multiplication of 5H and 11H.
(Hint: Multiplication can be performed by iterative addition)

NOTES:
 Write your student ID, Course Code and the Lab Number on the cover page.
 Write your code in a separate piece of paper than cover page.
 Submit your homework to the office number EE 114 within the deadline
 Late submission will be accepted but you will lose 20 percent.

Research Assistant: Noushin Hajarolasvadi


Office: EE 114
E-Mail: noushin.hajarolasvadi@cc.emu.edu.tr

You might also like