SPCC - 1
SPCC - 1
Application software is created to perform a particular task for the user. These are application
specific. It uses computers as a tool and enables end users to perform specific tasks according
to user need.
System software is the software which is designed to operate, control and maintain the
computer itself. It logically binds the components of a computer so that they work as a single
unit. Users rarely notice system software as it runs in the background.
Need of language processors: They are needed to close the semantic gap that occurs between
the application domain and execution domain. Semantic gap refers to the difference between
the software development team intended and what the respective result of executing the code
was. Semantic gap can lead to -
● Large development times
● Large development efforts
● Poor quality of software
● Preprocessor:
○ Preprocesses source code before compilation.
○ Performs tasks like macro expansion, file inclusion, and conditional compilation.
○ Modifies the source code to produce a modified version for compilation.
○ Commonly used in languages like C and C++.
● Compiler:
○ Translates high-level source code into machine code or intermediate code.
○ Performs lexical analysis, syntax analysis, semantic analysis, optimization, and
code generation.
○ Generates executable files or intermediate representation for interpretation or
further processing.
○ Examples include GCC for C/C++ and javac for Java.
● Assembler:
○ Translates assembly language code into machine code.
○ Converts mnemonic instructions into binary machine instructions.
○ Produces object files containing machine code and symbols.
○ Examples include NASM (Netwide Assembler) and MASM (Microsoft Macro
Assembler).
○ Loader:
■ Loads executable files into memory for execution.
■ Allocates memory space for the program and its data.
■ Resolves symbolic references and sets up the execution environment.
■ Examples include the Linux loader (ldlinux.so) and Windows loader
(ntdll.dll).
Spectrum of language processors:
● A language translator facilitates the transition from high-level programming languages to
the machine language of a computer system, bridging the execution gap.
● Conversely, a de-translator performs the reverse function, bridging the same execution
gap but in the opposite direction.
● A Preprocessor serves as a language processor that addresses the execution gap but
does not involve direct language translation.
● A language migrator resolves differences in specifications between two programming
languages.
● An interpreter acts as a language processor that bridges the execution gap without
generating a machine language program, effectively eliminating the need for translation.
Language processing activities:
● Program Generation - It is a software which accepts the specification of a program to be
generated and generates a program in the target PL. Program generator introduces a
new domain between the application and PL domain.
● Program Execution -
○ Program Translation - Program translation model bridges the execution gap by
translating a program written in PL i.e Source Program into machine language i.e
Target Program.
○ Program Interpretation -
■ Fetch the statement.
■ Analyze the statement and determine its meaning.
■ Execute the meaning of the statement.
Device Drivers:
● It is a collection of software files that helps one or more hardware devices to
communicate with OS. E.g. Device drivers for mouse, displays, printers, etc.
● It uses a computer bus to communicate with hardware devices.
● It is dependent on Hardware and OS.