- Assembly - Memory Management
- Assembly - File Management
- Assembly - Macros
- Assembly - Recursion
- Assembly - Procedures
- Assembly - Arrays
- Assembly - Strings
- Assembly - Numbers
- Assembly - Loops
- Assembly - Conditions
- Assembly - Logical Instructions
- Assembly - Arithmetic Instructions
- Assembly - Constants
- Assembly - Variables
- Assembly - Addressing Modes
- Assembly - System Calls
- Assembly - Registers
- Assembly - Memory Segments
- Assembly - Basic Syntax
- Assembly - Environment Setup
- Assembly - Introduction
- Assembly - Home
Assembly Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Assembly - Environment Setup
Local Environment Setup
Assembly language is dependent upon the instruction set and the architecture of the processor. In this tutorial, we focus on Intel-32 processors pke Pentium. To follow this tutorial, you will need −
An IBM PC or any equivalent compatible computer
A copy of Linux operating system
A copy of NASM assembler program
There are many good assembler programs, such as −
Microsoft Assembler (MASM)
Borland Turbo Assembler (TASM)
The GNU assembler (GAS)
We will use the NASM assembler, as it is −
Free. You can download it from various web sources.
Well documented and you will get lots of information on net.
Could be used on both Linux and Windows.
Instalpng NASM
If you select "Development Tools" while instalpng Linux, you may get NASM installed along with the Linux operating system and you do not need to download and install it separately. For checking whether you already have NASM installed, take the following steps −
Open a Linux terminal.
Type whereis nasm and press ENTER.
If it is already installed, then a pne pke, nasm: /usr/bin/nasm appears. Otherwise, you will see just nasm:, then you need to install NASM.
To install NASM, take the following steps −
Check
website for the latest version.Download the Linux source archive nasm-X.XX.ta.gz
, where X.XX
is the NASM version number in the archive.
Unpack the archive into a directory which creates a subdirectory nasm-X. XX
.
cd to nasm-X.XX
and type ./configure. This shell script will find the best C compiler to use and set up Makefiles accordingly.
Type make to build the nasm and ndisasm binaries.
Type make install to install nasm and ndisasm in /usr/local/bin and to install the man pages.
This should install NASM on your system. Alternatively, you can use an RPM distribution for the Fedora Linux. This version is simpler to install, just double-cpck the RPM file.
Advertisements