How to, Uncategorized

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





Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s