Вы находитесь на странице: 1из 6

ABSTRACT

Assembler is a program that translates programs from assembly language to machine


language. Before an assembly program can be executed on the computer platform, it must
be translated into the machine language of the target hardware. A program called
assembler does the translation task. The assembler takes as input a stream of assembly
commands, and generates as output a stream of equivalent binary instructions. The
resulting code can be loaded as-is into the computer's memory, and then executed by the
hardware.

Assembler is essentially a text-processing program, designed to provide

translation services. Carries out the following operations: Parse the symbolic command
into its underlying fields; For each field, generate the corresponding bits in the machine
language; Replace all symbolic references (if any) with numeric addresses of memory
locations; Assemble the binary codes into a complete machine instruction. The translation
of symbols to numeric addresses is done it two conceptual stages. First, the assembler
creates a symbol table, associating each symbol with a designated memory address. Next,
the assembler uses the symbol table to translate each occurrence of each symbol in the
program to its allocated address. Inside the 8085, instructions are really stored as binary
numbers, not a very good way to look at them and extremely difficult to decipher. An
assembler is a program that allows you to write instructions in, more or less, English
form, much more easily read and understood, and then converted or assembled into hex
numbers and finally into binary numbers.

Page 1

INTRODUCTION
Assemblers perform one-to-one translation of symbolic source statements written in assembly
language to the corresponding machine language instructions. Assembly language is intermediate
between the high-level language and machine language. Assembly language is the symbolic
representation of a computers binary encodingmachine language. Assembly language is more
readable than machine language because it uses symbols instead of bits. The symbols in
assembly language name commonly occurring bit patterns, such as opcodes and register
specifiers, so that it can be read and remembered. In addition, assembly language permits
programmers to use labels to identify and name particular memory words that hold instructions
or data.
An assembler reads a single assembly language source file and produces an object file containing
machine instructions and bookkeeping information that helps combine several object files into a
program. Figure illustrates how a program is built. Most programs consist of several filesalso
called modules that are written, compiled, and assembled independently. A program may also
use prewritten routines supplied in a program library. A module typically contains references to
subroutines and data defined in other modules and in libraries. The code in a module cannot be
executed when it contains unresolved references to labels in other object files or libraries.
Another tool, called a linker, combines a collection of object and library files into an executable
file, which a computer can run.

Page 2

HARDWARE AND SOFTWARE REQUIREMENTS

The system will run on a system with 1GB RAM, running Windows.
Consisting of turbo c as a software for the implementation of the project.
C programming will be used for developing the software as a language for coding.

Page 3

FUNCTIONAL REQUIREMENTS
The program will be consisting of the functions like stacks, queues, and making use of some of
the applications of data structures.

NON FUNCTIONAL REQUIREMENTS

This program will help in converting high level language to machine level language.

By converting the high level language to machine level language we can reduce the work
of the system and by doing this job we can say that the performance of the system will be
increased.

The performance of this code is high as here two pass assembler coding is done.
This program is used as a code to convert a high level language to a machine level
language and by doing this we can increase the performance of the computer.

Page 4

C LANGUAGE DATA STURCTURES FEATURES IDENTIFIED

Opcode Table
Register Table
Symbol Table
Literal Table
Literal Pool Table

BRIEF DESCRIPTION OF THE DATA STRUCTURES USED


1. Opcode Table: Assembler need not to enter information in this table. This table with
information is available with the assembler. The assembler does not enter information in this
table but uses this data structure.
To determine valid imperative statement.
Find length of instruction
Find corresponding machine Opcode.
Fields of Opcode Table:
(a) Opcode
(b) Machine code.
(c) Type of Opcode.
(d) Length of Opcode.
2. Register Table: This table stores the information about registers supported by system.
Fields of Register Table:
Lab Manual - Software Design Laboratory 4 VPCOE, Baramati
Two Pass Assembler
(a) Register name.
(b) Machine constant.
3. Symbol Table: This table is used to record information about symbols in program.
Symbols can be
Label appearing on any statement.
Constant declared by 'DC' statement.
Storage variable declared by 'DS' statement
This table is created by Pass-I and used by Pass-II of 2-pass assembler.
Fields of Symbol Table:
(a) Symbol no.
(b) Symbol name.
(c) Symbol address.
Page 5

4. Literal Table: This table is used to store the information about literals. This table is created
by Pass-I and used by Pass-II of 2-pass assembler.
Fields of Literal Table:
(a) Literal no.
(b) Literal.
(c) Literal address.
5. Literal Pool Table: This table stores information about literal pools in the assembly program.
No of literal pools is always 1 greater than number of LTORG statements in assembly program.
This table is created by Pass-I and used by Pass-II of 2-pass assembler.
Pool table can be implemented as one dimensional array where index of array indicates literal
pool no and POOLTABLE[x] indicates literal number of starting literal in literal pool 'x'

INNOVATION AND USEFULLNESS

Here the high level language is being converted to machine level language by using a c
code which helps to do so.
This converting of the language helps the system to increase its system performance.
A two pass assembler reads the source code twice. Each read through is called a pass.
The advantage of two pass assembler is that it allows forward referencing in the source
code because when the assembler is generating the code it has already found the all
references.

Page 6

Вам также может понравиться