You are on page 1of 8

System Software Lab

Report on
Open Ended Experiment

SIC / XE Two pass assembler with independent feature program blocks

Submitted By

MEGHA IJANTAKAR 01FE21BCS042


SHREYA GOUDAR 01FE21BCS030
DHANSHREE PATIL 01FE21BCS310
KIRTHI GOANKAR 01FE21BCS255

Course Teachers:

Dr.Sujatha C
Mrs.Umadevi F.M

.
School of Computer Science and Engineering,
Vidyangar, Hubballi–580031, India.

Academic year 2023-24


ABSTRACT

This report presents the design and implementation of a two-pass assembler for the SIC/XE ar-
chitecture, catering to the unique demands of modular programming through independent feature
program blocks. The assembler follows a comprehensive approach, accommodating the extended
instruction set, addressing modes, and additional registers introduced in the SIC/XE architecture.

Pass 1 involves lexical analysis, symbol table creation, and location counter management. It ef-
fectively handles forward references within program blocks, creating an intermediate representa-
tion of the source code while preserving the modular structure.

Pass 2 leverages the intermediate code generated in the first pass to produce the final machine
code. Symbol table lookup ensures accurate address resolution, while the assembler assembles
each program block independently, providing modularity and facilitating scalable software de-
velopment.

The implementation incorporates error handling mechanisms, macro processing (if applicable),
and optimizations to enhance efficiency. The abstract concludes with a succinct presentation of
major results, emphasizing the assembler's ability to handle modular programming in SIC/XE,
catered to the needs of protocol designers, software engineers, and educators interested in
streamlined assembly programming. The report provides insights into the design choices and ex-
perimental approaches employed, encouraging further exploration by readers interested in the in-
tricacies of SIC/XE assembly language processing.

The abstract sets the stage for an in-depth exploration of the two-pass assembler, inviting readers
to delve into the report for a comprehensive understanding of the design, features, and outcomes
of the implemented system.
CONTENTS

Chapter Page
Title
No. No.

1. Introduction 1

2. Algorithm Design 1–2


DS and Algorithms used.

3. Implementation 3-6
Code snippet. Write about each code snippet in 2-3 lines.. What it
does. 2-4 pages

4 Results and Discussion 7-10


Write the Input and Output for your OEE. 3 different types of inputs
and output. You can put Screen shots or actual output file. 2-4 pages

5 Conclusion 11
150-200 words
12
References
Put in IEEE format

Abstract.
This report presents the design and implementation of a two-pass assembler for the SIC/XE ar-
chitecture, catering to the unique demands of modular programming through independent feature
program blocks. The assembler follows a comprehensive approach, accommodating the extended
instruction set, addressing modes, and additional registers introduced in the SIC/XE architecture.

Pass 1 involves lexical analysis, symbol table creation, and location counter management. It ef-
fectively handles forward references within program blocks, creating an intermediate representa-
tion of the source code while preserving the modular structure.

Pass 2 leverages the intermediate code generated in the first pass to produce the final machine
code. Symbol table lookup ensures accurate address resolution, while the assembler assembles
each program block independently, providing modularity and facilitating scalable software de-
velopment.

The implementation incorporates error handling mechanisms, macro processing (if applicable),
and optimizations to enhance efficiency. The abstract concludes with a succinct presentation of
major results, emphasizing the assembler's ability to handle modular programming in SIC/XE,
catered to the needs of protocol designers, software engineers, and educators interested in
streamlined assembly programming. The report provides insights into the design choices and ex-
perimental approaches employed, encouraging further exploration by readers interested in the in-
tricacies of SIC/XE assembly language processing.

The abstract sets the stage for an in-depth exploration of the two-pass assembler, inviting readers
to delve into the report for a comprehensive understanding of the design, features, and outcomes
of the implemented system.

Introduction.

System software serves as the foundational framework that enables seamless interaction between
hardware and user applications within computing environments. Comprising diverse programs
such as operating systems, compilers, and assemblers, system software plays a pivotal role in
optimizing hardware resources and facilitating efficient execution of applications. This
introduction provides a broad understanding of the significance of system software and sets the
stage for a deeper exploration of the challenges and innovations within this dynamic field.

Our motivation for delving into the design of a two-pass assembler for the SIC/XE architecture
with independent feature program blocks stems from the ongoing evolution of computing
technology. As modern architectures continue to advance, the demand for system software
capable of harnessing these advancements efficiently becomes increasingly pronounced. Our
focus on the two-pass assembler addresses a specific need for robust system software capable of
supporting scalable and collaborative software development through the incorporation of
independent feature program blocks.

Within this context, the problem statement and objectives of our work become clear. We aim to
develop a two-pass assembler that not only adheres to the specifications of the SIC/XE
architecture but also introduces the novel concept of independent feature program blocks. This
approach seeks to enhance modularity in assembly programming, offering a solution that aligns
with the contemporary requirements of software development.

The organization of the report provides a roadmap for readers to navigate the subsequent
chapters. Chapter 2 delves into the detailed design of the assembler, exploring the data structures
and algorithms that underpin its functionality. Moving to Chapter 3, readers will gain insights
into the specific code snippets employed during the implementation, offering a closer
examination of the assembler's intricacies. Subsequent chapters unfold the evaluation, results,
and conclusion, providing a comprehensive exploration of our innovative solution for a two-pass
assembler catering to the SIC/XE architecture with independent feature program blocks. This
structured approach ensures a logical progression through the conceptualization, design, and
implementation stages of our solution.

Algorithm Design
The successful implementation of a two-pass assembler for the SIC/XE architecture with inde-
pendent feature program blocks relies on effective data structures (DS) and well-thought-out al-
gorithms. In this section, we outline the key components of the algorithm design, shedding light
on the DS and algorithms employed.

Pass1:

Symbol Table: A data structure to store information about symbols (labels), including their ad-
dresses and attributes.

Location Counter: A counter to keep track of the address of the current instruction being pro-
cessed.

Intermediate Code Representation: A suitable data structure to store the intermediate code gener-
ated during the pass.

• Location counter is initialized to 0 when the block begins.

• Save the location counter value when switching to another block and restore the location
value when resuming a previous block.

• Each label is assigned the address which is relative to the start of its block. The block
name or number the label belongs to is also

• stored along with its relative address.

• At the end of Pass 1, the location counter of each block indicates the length of the block.

• Finally, each block is assigned a start address which is relative to the beginning of the en-
tire program

PASS1: Algorithm
Pass2:
• In Pass 2, after initializing block numbers and location counters in Pass 1, the algorithm
checks for 'USE' directives. If the opcode is 'USE,' it sets the block number for the speci-
fied block name found in the operand field.

• The algorithm then searches the symbol table (SYMTAB) for the operand, and if found,
it stores the symbol's value along with the address of the block number as the operand's
address. This step ensures that the assembler associates the correct block number with the
specified block name and updates the operand's address accordingly.

• The objective of Pass 2 is to refine the information gathered during Pass 1, resolving ad-
dresses and operands for generating the final machine code.

Algorithm:

You might also like