Professional Documents
Culture Documents
ACTIVITY NO.1: Displaying String: Objectives
ACTIVITY NO.1: Displaying String: Objectives
ACTIVITY NO.1: Displaying String: Objectives
1: Displaying String
Objectives:
At the end of this activity, the students are expected to:
1. learn how to make a program that display strings,
2. understand the purpose of the dollar sign ($) in the data directives,
3. be able to run a program, and
4. know how to trace and debug program errors in assembly language.
The codes:
For displaying string on screen
mov ah,09h
lea dx, <memory_location_name>
int 21h
Codes that get and register the starting memory address of data
segment.
Instruction:
Hello, World
3. Now, remove the dollar sign “$” in the source code, save, and run the program
again.
What happened to the output? Write your observation:
________________________________________________________________
________________________________________________________________
4. Return back the dollar sign ‘$’ into the source code. This time, remove the first
two lines of code under the code directive. These are:
mov ax,@data
mov ds,ax
Save the changes. Run the program again. Write your observation.
________________________________________________________________
________________________________________________________________
mov ax,@data
mov dx,ax
Save the changes then run the program again. Write your observation.
__________________________________________________________________
______________________________________________________________
6. Now, replace dx with the previous code ds so that the code we again the correct
code
mov ax,@data
mov ds,ax
8. Open the file exer_1.asm. Run and list down line numbers that contain error
and the error messages. Debug the program and write the correct source code.