You are on page 1of 8

ACTIVITY 2:

Introduction to
Assembly Language

Submitted by:
Alcantara, John Joaquin S. (Student’s Name) | September 2020

Submitted to:
ENGR. JOSEPH L. RICOHERMOSO (Instructor’s Name) | 16 September 2020

Classified as Internal
Lab 2
Introduction to Assembly Language
Objective:

To be familiar with Assembly Language

Introduction:

Assembly Language is a programming language that is very similar to machine


language, but uses symbols instead of binary numbers. It is converted by the assembler
(e.g. Tasm and Masm) into executable machine-language programs.

To make programs in assembly language, you must know some information about the 8086
microprocessor. The 8086 contains 14 registers. Each register is 16 bits long.

DISCUSSION:
Assembly instructions are made up of an operation code (op-code) and a set of operands. The
op-code identifies the action to be taken. The operands identify the source and destination of
the data. The operands identify CPU registers, memory locations, or I/O ports. The complete
form of an instruction is:

op-code destination operand, source operand

for example:
INC AX ; one operand (add 1 to register AX)

MOV AX, 100 ; two operands (store 100 in register AX)

PROCEDURES: Take screenshots as often as possible for your final report. Include a description for
each screenshot.

Classified as Internal
Hello Program
1 click Start (All) Programs Run then write cmd and click OK.
2 Go to directory C:\Tasm\Bin
3 Type the command C:\Tasm\Bin\edit Hello.asm
4 A blue screen will open, write the following Hello program

5 Write c C:\Tasm\Bin\tasm hello.asm to create the file hello.obj This file is the machine
language for the program.
6 Write C:\Tasm\Bin tlink hello.obj to create the file hello.exe This file is the executable
program.
7 Finally, write C:\Tasm\Bin \hello.exe You will show the message hello, world on DOS
screen.

SCREENSHOTS AND ITS DESCRIPTION:

Figure 1.1

“First of all, you need to mount the 8086 files of course then edit the hello program because that’s our
objective for this activity”

Classified as Internal
Figure 1.2

“This is the edit tab/window of the Hello asm. This indicates the needed code to proceed to the next
step.

Figure 1.3

“This step is the result when you’re done with the coding and editing in Figure 1.2”

Classified as Internal
Figure 1.4

“The final step before you debug this program is that you need to link and check if there’s error. Link
hello.obj and simply typing Hello or Hello.exe to check if it’s working.”

Classified as Internal
How to Debugging Assembly Language programs:

1. Turbo Debugger:
The Turbo Debugger is a program that allows you to single-step your program (that means
run it line-by-line while you watch what happens). You can observe the registers, the
memory dump, individual variables, flags, and the code as you trace through your program.
Also it is used to debug errors that have to be made by logic reasons.

After you write your program you can use assembly turbo debugger by follow the following:

C:\Tasm\Bin\td Hello

Figure 2.1

“This debug windows shows the registered codes, memory, variable and flags. Codes that you input
earlier can also be terminate in this window.”

Classified as Internal
Figure 2.2

“This screenshot is the final product when you terminate the less important command/code. As you can
see at the top right, the program is complete and ready to use. You can exit the debug with ctrl+f9”

Classified as Internal
DATA SHEET
Write the previous code, “Hello To My first Assembly lab” program then then Use Debugger to single
step through this program using the F7 (TRACE) command.

What’s your observation and Analysis?

Do you encounter any issues?

DATA ANALYSIS
My analysis is that coding this activity needed to be done still in the dosbox tasm because the
versions of modern operating system is not compatible or cannot be done by cmd option.

CONCLUSION
My conclusion is that when you finish coding the said program. It shows how many memory
dump, individual variable, and flags. In order to link the hello.obj, you need to edit the objective and
input the correct and precise language codes.

RECOMMENDATIONS
My recommendations since I encountered 2 issues making thing activity. First is be flexible and
find alternative ways for the code to work. Lastly, you don’t need to rely only on the instruction since
we all have different version of operation system, specifications, and modem.

Classified as Internal

You might also like