0% found this document useful (0 votes)
52 views

System Programming

System programming involves developing system software like compilers, assemblers, linkers, loaders, macro processors and operating systems. These system programs provide services to computer hardware and allow user applications to run. A compiler translates high-level code to machine code. An assembler converts assembly code to machine code. A linker combines object files. A loader loads programs into memory for execution. A macro processor replaces macros with their definitions. Together, these system programs process programs from high-level code to executable machine code that can run on hardware.

Uploaded by

ashish mishra
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
52 views

System Programming

System programming involves developing system software like compilers, assemblers, linkers, loaders, macro processors and operating systems. These system programs provide services to computer hardware and allow user applications to run. A compiler translates high-level code to machine code. An assembler converts assembly code to machine code. A linker combines object files. A loader loads programs into memory for execution. A macro processor replaces macros with their definitions. Together, these system programs process programs from high-level code to executable machine code that can run on hardware.

Uploaded by

ashish mishra
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

System Programming

System Programming

• System programming is the activity of programming system software.


• Difference b/t System Programming & Application Programming :
– Application programming aims to produce software which provides
services to the user (e.g. word processor),
– whereas Systems programming aims to produce software which
provides services to the computer hardware.
System Programming…
Applications Software Systems Software

Deals with abstractions like customers, Deals with concepts extremely close to the
products, orders, balance sheets, employees, hardware level, like registers and memory
and players in a game. locations.

Solves problems of interest to humans, Controls and manages computer systems


usually in application areas like health care,
game playing, finance...
Concerned with anything high-level Concerned with data transfer, reading from
and writing to files, compiling, linking,
loading, starting and stopping programs, and
even fiddling with the individual bits of a
small word of memory
Is almost always device or platform Deals with writing device drivers and
independent; programs concentrate on operating systems, or at least directly using
general-purpose algorithms them; programmers exploit this low-level
knowledge
System Software
• The system software includes
– Compiler
– Assembler
– Linker
– Loader
– Macro processor
– Operating system
– Debugging system
Need Of System Software
The basic need of system software is to achieve the following goals :
• To achieve efficient performance of the system
• To make effective execution of general user program
• To make effective utilization of human resources
• To make available new, better facilities
Language Processing System
• Computer system is made of hardware and software.
• The hardware understands a language, which humans cannot
understand.
• So write programs in high-level language, which is easier to
understand and remember.
• These programs are then fed into a series of tools and OS
components to get the desired code that can be used by the machine.
• This is known as Language Processing System.
Compiler
• A compiler is a software program that transforms high-level source code
that is written by a developer in a high-level programming language into a
low level object code (binary code) in machine language, which can be
understood by the processor.
• The process of converting high-level programming into machine language
is known as compilation.
Compiler…
Cross Compiler
– Runs on a machine ‘A’ and produces a code for another machine
‘B’. It is capable of creating code for a platform other than the
one on which the compiler is running.
Source-to-source Compiler
– Compiler that translates source code written in one programming
language into source code of another programming language.
Assembler
• Assembler is a program for converting instructions written in low-
level assembly code into relocatable machine code and generating
along information for the loader.
Assembler…
• It generates instructions by evaluating the mnemonics (symbols) in
operation field and find the value of symbol and literals to produce
machine code.
• If assembler do all this work in one scan then it is called single pass
assembler, otherwise if it does in multiple scans then called multiple
pass assembler.
• Here assembler divide these tasks in two passes:
– Pass-1:
• Define symbols and literals and remember them in symbol table and literal
table respectively.
• Keep track of location counter
• Process pseudo-operations
– Pass-2:
• Generate object code by converting symbolic op-code into respective numeric
op-code
• Generate data for literals and look for values of symbols
Linking and Linker
• Linking
– The Process of merging many object modules to form a single object program
is called as linking.
• Linker
– The Linker is the software program which binds many object modules to make
a single object program.
Loader
• Once the assembler produces an object program, that program must be
placed into memory and executed.
• It is the purpose of the loader to assure that object programs are placed
in memory in an executable form.
• The assembler could place the object program directly in memory and
transfer control to it, thereby causing the machine language program to
be executed.
• However this would waste memory by leaving the assembler in
memory while the user’s program was being executed.
• Also the programmer would have to retranslate his program with each
execution, thus wasting translation time.
• To overcome the problem of wasted translation time and wasted
memory, system programmers developed another component, called
the Loader.
Loader…
• Loader is a program that places programs into memory and prepares
them for execution.
• In a simple loading scheme, the assembler outputs the machine language
translation of a program on a secondary storage device and a loader is
placed in memory
• The loader places into memory the machine language version of the
user’s program & transfers control to it.
• Since the loader program is much smaller then the assembler, this makes
more memory available to the user’s program.
Macro processor
• A macro processor is a program that reads a file (or files) and scans
them for certain keywords. When a keyword is found, it is replaced
by some text. The keyword/text combination is called a macro.
• A simple example is the C language preprocessor.
• When you write
#define MAX_BANANAS 6
int banana;
for (banana = 0; banana < MAX_BANANAS; banana++){ ...; }
• In a C program, the C preprocessor reads the first line and stores it as
a macro definition.
• When it comes across the later reference to MAX_BANANAS in
the for loop, it replaces it with the macro's definition, 6.
• The output of the C preprocessor is then fed to the C compiler proper.
Formal System

• A formal system is used for inferring theorems from axioms


according to a set of rules.
• These rules, which are used for carrying out the inference of
theorems from axioms, are the logical calculus of the formal
system.
• A formal system is essentially an "axiomatic system“.
Formal System…
• Each formal system uses primitive symbols (which collectively form
an alphabet) to finitely construct a formal language from a set
of axioms through inferential rules of formation.
• The system thus consists of valid formulas built up through finite
combinations of the primitive symbols—combinations that are formed from
the axioms in accordance with the stated rules.
This can be expressed as the following:
• A finite set of symbols, known as the alphabet, which concatenate
formulas, so that a formula is just a finite string of symbols taken from the
alphabet.
• A set of axioms, or axiom schemata, consisting of well-formed formulas.
• A set of inference rules. A well-formed formula that can be inferred from
the axioms is known as a theorem of the formal system.
References
• https://en.wikipedia.org/
• https://www.geeksforgeeks.org/
• https://www.tutorialspoint.com/

You might also like