How To Run Assembly Language Programs in Tasm: Steps For Executing An Assembly Language Program (ALP)

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

How to run assembly language programs in

TASM
Turbo Assembler (​TASM​) is a computer assembler (software for program

development) developed by Borland which runs on and produces code for 16-

or 32-bit x86 MS-DOS or Microsoft Windows. It can be used with Borland’s

high-level language compilers, such as Turbo Pascal, Turbo Basic, Turbo C

and Turbo C++.

Download ​TASM

Steps for executing an assembly language program (ALP):

1. Creating Source file:-​ First write the program using a text editor
such as DOS Edit (edit), wordpad, notepad and save the file with
.asm extension (e.g. hello.asm).
2. Assembly process:-​ Once the source file is created next step is to
assemble it by using ‘​tasm​’ command as shown below.

C:\tasm> tasm hello.asm


The following is the screen output produced by assembling the program with
the Borland assembler:

Turbo Assembler Version 4.1Copyright (c) 1988, 1996 Borland


International

Assembling file: hello.ASM

Error messages: None

Warning messages: None

Passes: 1

Remaining memory: 418k

The primary file produced by the assembly step is object file with .obj
extension.(e.g. hello.obj) and list file with .lst extension. Also assembler
checks the syntax of the program and displays line number with the mistake,
along with explanation. It also gives warning messages but a program with
warning messages will still assemble.
1. Linking Process:- ​In the LINK step, the linker reads the object file,
called ​obj​, as input and creates the executable file, called​ hello.exe
and link map file. Here is the command:

C:\tasm> tlink hello.obj

1. Executing the program:-​ Then the program can be run by just


typing the name or with .exe extension.

C:\tasm> hello.exe

this will run your program

You might also like