0% found this document useful (0 votes)
8 views6 pages

SPCC - 1

SPCC notes for mumbai university

Uploaded by

Ian Thomas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views6 pages

SPCC - 1

SPCC notes for mumbai university

Uploaded by

Ian Thomas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

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

Solution to the semantic gap is to use different methodologies and programming.

Programming languages can be categorized into three main types:


● Machine Level (Low Level): These languages are designed to be easily interpreted by
machines, represented as binary sequences. While they are straightforward for
computers to process, they are challenging for humans to memorize due to their
complex binary representations.
● Assembly Language: In contrast to machine level languages, assembly languages use
symbolic letters or sequences of letters to represent instructions. While more readable
than machine code, assembly language still requires a deep understanding of computer
architecture.
● High-Level Languages: High-level languages are designed to be more user-friendly and
easier to understand and memorize compared to low-level languages. They use
human-readable syntax and often abstract away the complexities of the underlying
hardware, making programming more accessible to a wider audience.
Language Processors:
● Language processors encompass assemblers, compilers, and interpreters. They are
essential tools because they reconcile the disparity between how software is crafted by
programmers, typically in high-level languages, and how computers execute instructions
in low-level languages.
● A language processor serves as software tasked with functions like translation and
interpretation, facilitating communication between the execution domain and the
application domain. This interface is often referred to as the semantic gap, representing
the distinction in understanding between human programmers and machine execution.

● 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).

● Linker and Loader:


○ Linker:
■ Combines multiple object files and resolves external references.
■ Links object files together to create an executable or library.
■ Generates a single executable file by resolving dependencies between
modules.
■ Examples include GNU ld (GNU Linker) and Microsoft Link.

○ 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.

You might also like