chap 1 spcc 2013

Systems Software
Systems Software
Assembler, Cross-Assembler and Disassembler
Compiler, Cross-Compiler and Decompiler
Pre-processors and Macro Processors
Loaders and Linkers
Device Drivers
Operating System
Various System Tools
Integrated Development Environment (IDE)
Project Managers
Need for Systems Software
• A computer understands only the language of
binary 1s and 0s. To implement even a simple
function, several thousand lines of binary code
may be required, which is not practical for a
computer programmer.
• So, a semantic gap is said to exist between the
application domain (suitable for a programmer)
and execution domain (used by the computer).
This semantic gap is made manageable
by introduction of a new domain called
the Programming Language (PL) Domain.
The software developer bridges the
specification gap by specifying
application programs in terms of
programming language i.e. a software
developer converts the specification of
an application into a computer program.
The system programmer bridges the
execution gap by designing system
software to interface with the machine,
in machine language itself.
Assembler : An Assembler is a translator denoted as follows:
Imagine an 8086 ALP program (the actual assembler) that reads
an input some other 8086 ALP program and generates its
machine code for 8086 machine.
Cross-Assembler: A Cross-Assembler is a translator denoted as follows:
A Cross-Assembler runs on one machine, but assembles ALP of another
machine and generates machine code for that machine
• it converts machine code of a particular
machine back to its assembly language. (Recall:
reverse engineering).
• This idea of reverse engineering is used to
recover some lost source code file using its
object file.
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).
A Cross-Compiler runs on one machine, but generates
machine or assembly code for another machine.
• Similar to Disassembler for Assembly
Language, a Decompiler traces back the
machine or assembly code and converts it into
source HLL program.
• An Interpreter is similar to a compiler, but one
big difference is that it executes each line of
source code as soon as its equivalent machine
code is g.enerated
• A Pre-processor converts one HLL / ALP into
another HLL/ALP .
• A Macro Processor is an example of pre-processor
Macro Processor
• A Macro is defined as a single-line
abbreviation of a small sequence of
• A Macro Processor expands the macro calls
and removes macro definitions from an as
input source code, which contains these
macro definitions and calls.
A Linker (or a Linkage Editor) takes the object file, loads
and compiles the external sub-routines from the library and
resolves their external references in the main-program.
Programmers usually define the program to be placed at some pre-defined location in the
memory. But this loading address given by the programmer may never be used, as it has
not been coordinated with the OS.
A Loader does the job of coordinating with the OS to get the initial loading address for the
program, prepares the program for execution (i.e. generates an .exe file) and loads it at
that address.
Device Drivers
• A Device Driver is a system software that allows
the OS and other applications to communicate
with a specific hardware device.
• Every different hardware device can understand
only its own low-level commands;
• A Device Driver translates high-level commands
by OS or other applications into machine code
instructions that are directly executable on the
hardware device.
Operating System
• An operating system can be viewed as an
integration of system programs that act as an
interface between the user and his computer.
• An OS manages CPU and different hardware
devices connected to the computer; it also
provides system calls for efficient execution of
common services needed by the applications.
System Tools
• System Tools are not complete systems
software; rather they assist in writing system or
application software and perform various
actions on it.
1. Editors
2. Debuggers
3. IDE
4. Profilers
5. Project manager
• System programs are needed because it is impractical for a programmer to write,
debug and manage huge programs in binary 0s and 1s.
• Translators convert code of one language to another.
• Assembler translates assembly language to machine code; Disassembler performs
the reverse function.
• Compiler translates HLL code into machine code; Decompiler uses source HLL
information in machine code to do reverse of compilation process.
• Interpreters compile programs “line-by-line”. So, they are traditionally slow. But a
main advantage is that chain of errors can be avoided.
• Pre-processors are not translators; input and output
languages are the same, only input source is modified to
eliminate elements like whitespaces and comments.
• Linker links object files of various subroutines with that of
main program and generates .exe file. Loader manages
allocation and relocation of this .exe file in main memory.
• Device Drivers convert high-level commands from OS (or
other applications) into machine code instructions for direct
execution on the device.
• Operating System is an integration of various system
programs that act as an interface between a user and his

similar documents