Professional Documents
Culture Documents
Micro Lab1
Micro Lab1
LAB1
Objective: Students will learn debug programming commands, and explore simple
Assembly Language Instructions in assembly and run them.
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.
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
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.