The Loader Is Special Program That Takes Input of Object Code From Linker

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

The different types of loaders are, absolute loader, bootstrap loader, relocating loader (relative

loader), and, direct linking loader.

The code optimization in the synthesis phase is a program transformation technique,


which tries to improve the intermediate code by making it consume fewer resources (i.e.
CPU, Memory) so that faster-running machine code will result.

The loader is special program that takes input of object code from linker,
loads it to main memory, and prepares this code for execution by computer.
A Compiler is a language translator that takes as input a source program in some HLL

and converts it into a lower-level language (i.e. machine or assembly language).

Following are the different types of Compiler:

 Single Pass Compilers


 Two Pass Compilers
 Multipass Compilers

In single pass Compiler source code directly transforms into machine code
2 Pass

1. Front end: It maps legal code into Intermediate Representation (IR).


2. Back end: It maps IR onto the target machine

The multipass compiler processes the source code or syntax tree of a program
several times. It divided a large program into multiple small programs and process
them. It develops multiple intermediate codes. All of these multipass take the
output of the previous phase as an input. So it requires less memory. It is also
known as 'Wide Compiler'.

Lexical analysis:

It takes the modified source code from language preprocessors that are written in the form of
sentences. The lexical analyzer breaks these syntaxes into a series of tokens, by removing
any whitespace or comments in the source code.

Literal Table – Assembler tracks the usage of literals in a program through a Literal Table

DB / DW: These two pseudo-ops are used to define variables.

A Translator is a system program that converts a program in one language to a program

in another language.

Assembler is a language translator which takes as input a program in assembly

language of machine A and generates its equivalent machine code for machine A, and the

assembler itself is written in assembly language of Machine A.


A Cross-Assembler runs on one machine, but assembles ALP of another machine and

generates machine code for that machine.

Disassembler

As the name suggests, it converts machine code of a particular machine back to its

assembly language.

System software is a type of computer program that is designed to run a computer's


hardware and application programs. 

Label is used to assign a symbolic name for a memory location; it is optional.

Mnemonic is a human-readable keyword for the binary opcode of an instruction.

Operands are the data that the instruction operates upon. Operands may be direct values (literals)

or symbolic reference to stored data (symbols). Some instructions do not have operands, as the

opcode implicitly specifies the operands.

Comments are for programmer to understand the meaning of the ALP statement in context with

the remaining code.

Literals are plain values that are not associated with any variable name.

Symbols are the variable names that hold values needed throughout the program. The Assembler

stores these symbols and their definition addresses in a data structure called as the “Symbol Table”

Types of ALP Statements

ALP statements can be broadly categorized into following 3 types:

1. Assembler Directive statements


START ,ORG

2. Declarative Statements

3. Imperative Statements

MOT is a fixed length table defined by programmer as per assembly language of the underlying

machine.

POT is also a fixed length table defined by programmer as

per assembly language of the underlying machine.

ST is used to keep a track of symbols assigned to variables being

used in the program.

You might also like