0% found this document useful (0 votes)
26 views5 pages

Assignment No.1

Kiran Suryakant Khamkar is a student with PRN 22210084 and Roll Number 221035 studying in class SY-A (A2). The document discusses the basics of assembly language programming including assemblers, linkers, debuggers, assembler directives, macros, procedures, syntax, and compiling/linking process. It also covers Linux assembly system calls.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views5 pages

Assignment No.1

Kiran Suryakant Khamkar is a student with PRN 22210084 and Roll Number 221035 studying in class SY-A (A2). The document discusses the basics of assembly language programming including assemblers, linkers, debuggers, assembler directives, macros, procedures, syntax, and compiling/linking process. It also covers Linux assembly system calls.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Name: Kiran Suryakant Khamkar

PRN No.: 22210084


Roll No.: 221035
Class: SY-A (A2)
Subject: CAO

ASSIGNMENT NO 1

TITLE: Basics of Assembly Language.


THEORY:
1. ASSEMBLER:
- An assembler is a low-level programming tool used in microprocessor-
based systems to convert
human-readable assembly language code into machine code, which can
be directly executed by the
microprocessor.
- It performs task like translating assembly instructions into binary
instructions and generating object
files.
- It helps bridge the gap between high-level programming languages and
the binary instructions that
a microprocessor understands, making it easier for programmers to write
and modify code for a
specific microprocessor architecture.
- An assembler is a software tool used to convert human readable
assembly languages code into
Machine code which can be executed by a computers central processing
unit (CPU).

2. LINKER:
- A linker is a software tool used in microprocessor-based systems to
combine multiple object files
and resolve references between them to create a single executable
program.
- It ensures that all the pieces of a program work together correctly by
connecting functions and
variables from different source code files, allowing them to communicate
with each other and
produce a functioning program.
- It resolves symbols and addresses, ensuring that different parts of
program can interact correctly.

3. DEBUGGER (TURBO DEBUGGER):


- A debugger is a software tool used for testing and debugging assembly
language programs.
- Turbo Debugger was a debugging tool associated with specific
programming environments,
- It is a specific debugger that offers features for analysing through
assembly code, setting
breakpoints, inspecting memory, etc.

4. ASSEMBLER DIRECTIVES AND RESERVE DIRECTIVES:


- In assembly language programming, directives are special instructions
that are not part of the actual
machine code instructions executed by the processor. They provide
guidance to the assembler and
help control various aspects of the assembly process. Two common types
of directives are
"assembler directives" and "reserve directives."
- Assembler Directives:
- Assembler directives (or pseudo-ops) are commands provided to the
assembler to control the
assembly process. They do not correspond to machine code instructions
executed by the processor
but instead provide instructions to the assembler itself.
- Assembler directives are used to define data, set up the program
structure, allocate memory, and
perform other tasks during the assembly process.
- Examples of common assembler directives include:
.data: Specifies a data section where data is defined.

.text: Indicates the code section where the program's instructions are
located.

Reserve Directives:
- Reserve directives are a subset of assembler directives that are
specifically used to allocate memory
space for data.
- These directives are used to reserve memory for variables, arrays, and
other data structures within
the program.
- Reserve directives are crucial for organizing data in memory, ensuring
proper memory allocation,
and managing data sizes.
- Examples of common reserve directives include:
.space or .skip: Reserves a specific number of bytes for data.
.byte: Reserves a byte (8 bits) for a single data element.
.word: Reserves a word (typically 16 or 32 bits) for data.

5. MACROS AND PROCEDURES:


- A macro is a way to define a reusable block of code in assembly
language. Macros are like
functions or subroutines but are expanded inline during the assembly
process.
- Macros are typically defined with a name and a set of parameters,
similar to functions in high-level
programming languages.
- Macros are often used for code that needs to be repeated multiple times
with slight variations.
- They can help reduce code duplication and make the source code more
readable.
- Procedures are reusable code blocks that are separate from the main
code, and control is transferred
to them during execution. They are essential for code organization and
modularity.

6. BASIC SYNTAX OF ASSEMBLY LANGUAGE:


- Assembly language uses mnemonics to represent machine instructions,
registers, memory
locations and operands.
- The syntax may vary between different assembly languages but generally
follows a structure of
mnemonic, operands and comments.

7. COMPILING AND LINKING IN ASSEMBLY PROGRAM:


- Compiling and linking an assembly program involves several steps to
transform your human-
readable assembly code into an executable binary file that can run on a
computer.

1. Write your assembly code


2. Assemble the code:
3. Link the object files:
4. Execute the program
- Compiling and linking help manage complex programs and external
libraries.
8. LINUX ASSEMBLY SYSTEM CALLS:
- In Linux, assembly language programs can make system calls to request
various operating system
services.
- System calls are a fundamental way for user-level programs to interact
with the kernel.

You might also like