Sei sulla pagina 1di 19

UNIT I

INTRODUCTION

SYSTEM SOFTWARE
Syllabus
Unit - I Introduction
Basic concepts - Machine structure - Simplified Instructional Computer.
Unit - II Assemblers
Functions - Machine dependent and Machine independent assembler
Features - Design options - Implementation - Example - MASM Assembler
Unit - III Loaders and Linkers
Functions - Machine dependent and Machine independent loader
features - Design options- Implementation - Example - MSDOS Linker.
Unit - IV Macro processors
Functions - M/C independent macro processor features - Macro processor
design options - Implementation - Example - MASM Macro processor
Unit - V Compilers and Utilities
Introduction to compilers - Different phases of compiler - System
software tools - Text editors - Interactive debugging systems.
Reference Books
1. Leland L.Beck, System Software - An Introduction to Systems
Programming, 3rd Edition, Addison Wesley,1999.
2. D.M.Dhamdhere, System Programming and Operating Systems,
Tata Mc Graw Hill Company, 1993.
3. A.U.Aho,Ravi Sethi and J.D.Ullman, Compilers Principles Techniques
and Tools, Addison Wesley,1988.
4. John J.Donovan, systems Programming, Tata Mc Graw Hill
Edition,1991.

UNIT I INTRODUCTION
SYSTEM SOFTWARE

UNIT I

INTRODUCTION

Overview
Objectives
1.0 Basic Concepts
Software
Software is a general term used to describe a collection of computer
programs, procedures and documentation that perform some tasks.
Softwares are broadly classified as
Application software
It is concerned with the solution of some problem,
using the computer as a tool, instead of how
computers actually work.
usually used by end-user
System software
System software consists of a variety of programs that
support the operation of a computer (ex: text editor,
compiler, debugger)
One characteristic in which most system software
differ
from
application
software
is
machine
dependency
A system software programmer must know the target
machine structure
System Software
Systems Software consists of a set of programs that support the
operation of a computer system and help, the programmer, to simplify
the programming process and run application software efficiently.
Examples of systems software are:
Text editors
Compilers
Loaders
Linker
Debugger
Assembler
Operating system

SYSTEM SOFTWARE

UNIT I

INTRODUCTION

Text editor

Write a program and modify it

Compiler

Translate into machine language (0, 1)

Loader or Linker

Load into memory and execution

Debugger

Detect errors in the program

Systems software can be classified in two groups:


1. Software to create a program development environment
Text editor
Compiler
Assembler
Linker
Debugger (low-level)
2. Software to create a run-time environment
Operating system
Loader
Dynamic Linker
Program libraries

Definitions and Terminologies


Text editor: Software that permits the creation and editing of text (i.e.
application programs).
Compiler: Translates programs written in a high level language to
object code or machine code.
Assembler: Translates programs written in assembly language to object
code or machine code.
Static Linker: Combines and resolves references between object
programs and creates the executable code.
Debugger: It is used to debug executable programs and their (lowlevel) related object code and source program.
Loader: Loads an executable code and starts its execution
SYSTEM SOFTWARE

UNIT I

INTRODUCTION

Libraries: Precompiled program that creates a set of functions for use


by other programs.
Dynamic Linker: Loads and links shared libraries at run-time
Operating system: An event driven program that make an abstraction
of the computer system. The operating system handles all resources
efficiently creates an environment for application programs to run, and
creates a friendly interface between the user and the computer system.

Basic Features and Design Options


Fundamental features
Basic functions and characteristics should remain
essentially the same, regardless of what machine is
being used.
Major design options
There is no single right way of doing things; a
software designer needs to be aware of the available
options in order to make intelligent decisions

1.1 System Software and Machine Architecture


SYSTEM SOFTWARE

UNIT I

INTRODUCTION

One characteristic in which most system software differ from


application software is machine dependency
e.g. assembler translate mnemonic instructions into
machine code
e.g. compilers must generate machine language code
e.g. operating systems are directly concerned with the
management of nearly all of the resources of a
computing system
There are some aspects of system software that do not directly
depend upon the type of computing system
(Machine
Independent)
e.g. general design and logic of an assembler
e.g. code optimization techniques

Application program

System program

Is primarily concerned with solution of


some problem using the computer system

Are intended to support both the operation


and use of the computer itself

The focus is on the application, not on the


computing system

They are usually related to the architecture


of the machine on which they are to turn

1.2 Simplified Instructional Computer (SIC)

A hypothetical computer that includes the hardware features most


often found on real machines
SIC standard model
SIC/XE
Upward compatible
o Programs for SIC can run on SIC/XE

Memory

8-bit bytes
3 consecutive bytes form a word
Addressed by the lowest number byte
215 (32768) bytes in the computer memory

SYSTEM SOFTWARE

UNIT I

INTRODUCTION

Registers (5 registers / each 24-bits)

Data

SIC does not have any stack. It uses the linkage register to store
the return address.
It is difficult to write the recursive program. A programmer has to
maintain memory for return addresses when we write more than
one layer of function call.
formats
Characters
o 8-bit ASCII codes
Integers
o 24-bit binary numbers
o 2s complement for negative values
No floating-point numbers (exist in SIC/XE)

Instruction formats
24-bits format

Note that the memory size of SIC is 215 bytes


X is to indicate index-address mode
SYSTEM SOFTWARE

UNIT I

INTRODUCTION

Addressing modes

Instruction Set

SYSTEM SOFTWARE

UNIT I

INTRODUCTION

Simple I/O Example for SIC

SYSTEM SOFTWARE

UNIT I

INTRODUCTION

SIC Programming Examples Data Movement

SIC Programming Examples Arithmetic

SYSTEM SOFTWARE

UNIT I

INTRODUCTION

SIC Programming Examples Looping & Indexing

SIC Programming Examples Indexing & Looping

SYSTEM SOFTWARE

UNIT I

INTRODUCTION

Define storage
WORD/BYTE
Reserve one word/byte of storage
RESW/RESB
Reserve one or more words/bytes of storage

Example
ALPHA
FIVE
CHARZ
C1

RESW
WORD
BYTE
RESB

1
5
C`Z
1

Special symbols (SIC & SIC/XE)


# : immediate addressing
@ : indirect addressing
+ : format 4
: the current value of PC
SYSTEM SOFTWARE

UNIT I

INTRODUCTION

C` : character string
op m, x : x denotes the index addressing

1.3 SIC/XE machine architecture


Memory

Maximum memory available on a SIC/XE system is 1 megabyte


(220 bytes)
Instruction format and addressing modes are changed

Register (Additional registers)

Registers S and T are only for storing data. They can not use for
accumulator
Data formats
There is a 48-bit floating-point data type

sign bit s (0: +, 1: -)


fraction f: a value between 0 and 1
exponent e: unsigned binary number between 0 and 2047

Instruction formats
Since the memory used by SIC/XE may be 220 bytes, the instruction
format of SIC is not enough.
Solutions:
Use relative addressing
Extend the address field to 20 bits
SIC/XE instruction formats:

SYSTEM SOFTWARE

UNIT I

INTRODUCTION

Addressing modes
New relative addressing modes for format 3

Mode

Indicati
on

Target address
calculation

Base relative

b=1,p=0

TA=(B)+ disp (0 <= disp


<= 4095)

Program-counter
relative

b=0,p=1

TA=(PC)+disp (-2048<=
disp<= 2047)

When base relative mode is used, disp is a 12-bits unsigned


integer
When program-counter relative mode is used, disp is a 12-bits
signed integer
Direct addressing for formats 3 and 4 if b=p=0
These two addressing mode can combine with index addressing
if x=1 , the term (X) is added to the target Address.

Instruction set
Standard SICs instruction
SYSTEM SOFTWARE

UNIT I

INTRODUCTION

Load and store registers (B, S, T, F)


o LDB, STB,
Floating-point arithmetic operations
o ADDF, SUBF, MULF, DIVF
Register-register arithmetic operations
o ADDR, SUBR, MULR, DIVR
Register move operations
o RMO
Supervisor call (SVC)
o generates an interrupt for OS
Input/Output
SIO, TIO, and HIO: start, test, and halt the operation of
I/O device

Programming examples (SIC/XE)


Data Movement

Programming examples (SIC/XE)


Arithmetic

SYSTEM SOFTWARE

UNIT I

INTRODUCTION

Programming examples (SIC/XE)


Looping & Indexing

Programming examples (SIC/XE)


Indexing & Looping

SYSTEM SOFTWARE

UNIT I

INTRODUCTION

Programming examples (SIC/XE)


Subroutine call & Record Input

SYSTEM SOFTWARE

UNIT I

INTRODUCTION

Summary
Key Terms
System software, Assembler, Loader, Compiler, Simplified
Instructional Computer
Key Term Quiz
1. ------------------ consists of a set of programs that support the
operation of a computer system and help the programmer to
simplify the programming process and run application software
efficiently.
2. ---------------- translates programs written in assembly language to
object code or machine code.
3. A loader is program/system software that loads -------------- and
starts its execution.
4. ---------------- translates programs written in a high level language to
object code or machine code.
5. --------- is a hypothetical computer that includes the hardware
features most often found on real machines

Multiple Choice Questions


1) What are the maximum memory size of SIC?
(a)2 power 15 (b)2 power 12 (c)2 power 13

(d)15 power 2

2) How many addressing modes do SIC support?


(a)1 (b)2 (c)3 (d)4
3) How does SIC determine whether the result of a TD instruction is
successful?
(a)CC is set to = (b) CC is set to < (c)CC is set to > (d)CC is set
to < or =
4) What are the two general purpose registers in SIC/XE?
(a)B & S (b)T & B (c)T & F (d)S & T
5) What are the maximum memory size of SIC/XE?
(a)2 power 15 (b)2 power 20 (c)20 power 2

(d)15 power 2

6) How many number of instruction format is available in SIC/XE?


(a)1 (b)2 (c)3 (d)4
SYSTEM SOFTWARE

UNIT I

INTRODUCTION

7) How many additional registers are present in


SIC/XE?
(a)9 (b)2 (c)4 (d)5
8) The three I/O instructions of SIC/XE are
(a)TD,RD,WD (b)TD,SD,WD (c)TD,SD,HD

(d)SIO,TIO,HIO

9) The machine instruction format of SIC is


(a)24 bit format (b)48 bit format (c)16 bit format
format

(d)8 bit

Descriptive Questions
Part A
1.
2.
3.
4.
5.
6.

Define system software.


Give some applications of operating system.
Define compiler and interpreter.
Define loader.
What is the need of MAR register?
Give any two differences between base relative addressing and
program counter relative addressing used in SIC/XE.
7. Define indirect addressing
8. Define immediate addressing.
9. What is the difference between the instructions LDA # 3 and LDA
THREE?
10.
How do you calculate the actual address in the case of
register indirect with immediate index mode?
11.
Write the sequence of instructions to perform
the operation BETA = ALPHA+5 using SIC/XE
instructions.
12.
What is the use of TD instruction in SIC architecture?
Part - B
1.
2.
3.
4.
5.

Explain in detail the architecture of SIC machine.


With instruction formats, explain the instruction set of SIC/XE.
Highlight the salient features of SIC/XE machine architecture.
Discuss about the VAX machine structure in detail.
Explain any two-system software tools highlighting their
advantages and disadvantages.
6. Write short notes on
a. Data formats and instruction formats.
b. I/o programming.
7. Write a sequence of instructions for sic to set
SYSTEM SOFTWARE

UNIT I

INTRODUCTION

VAL1 = VAL2 + INCR2


VAL3 = VAL4 + INCR2
Illustrate how the same calculation could be performed on
SIC/XE.
8. The variables V!, V2, V3 are assumed as an array of 100 words
each. Write a sequence of instructions for SIC to add together the
corresponding elements of v1, v2 and store it in v3.

SYSTEM SOFTWARE

Potrebbero piacerti anche