SlideShare a Scribd company logo
1 of 106
Introduction to Systems
Programming
By-Prof.Ravishankar C.Bhaganagare
Computer Dept. SKN SITS Lonavala
 SYLLABUS :-
Introduction to Systems Programming, Need of
Systems
Programming, Software Hierarchy, Types of software:
system software and application software, Machine
structure.
Evolution of components of Systems Programming:
Text
Editors, Assembler, Macros, Compiler, Interpreter,
Loader,
Linker, Debugger, Device Drivers, Operating System.
Elements of Assembly Language Programming:
Assembly
Language statements, Benefits of Assembly
Language, A
simple Assembly scheme, Pass Structure of
Assembler.
Design of two pass Assembler: Processing of
declaration
 Computer program :
Data type specifications and instructions for
carrying out operations that are used by a
computer to solve a problem.
Machine language : The language, made up of
binary coded instructions, that is used
directly by the computer.
Assembly language : A low-level programming
language in which a mnemonic is used to
represent each of the machine language
instructions for a particular computer.
 Source code : Program or set of instructions
written in a high-level programming
language.
 Object code : A machine language version of
source code.
 Target code : program output in Machine
code (binary form)
 Preprocessor : a preprocessor is a program
that processes its input data to produce
output that is used as input to another
program.
 Editor : A text editor is a type of computer
program that edits plain text. Such programs
are sometimes known as "notepad" software
 Compiler : A program that translates a
program written in a high level language into
machine code
 Assembler : A program that translates an
assembly language program into machine
code.
 Loader:-
A loader is a program used by an operating
system to load programs from a secondary to
main memory so as to be executed.
 Linker :a linker is a computer program that
takes one or more object files generated by a
compiler and combines them into one,
executable program.
 Debugger : Debugger is program which is
used to test program or execute program in
single step execution.
 What is System?
– System is the collection of various
components
Ex:- College is a system.
College is a system because it consist of
various components like various
departments, classrooms, faculties and
students.
 What is Programming?
– Art of designing and implementing the
programs.
 What is System Programming?
Systems programming involves the development
of
the individual pieces of software that allow the
entire system to function as a single unit.
Systems programming involves many layers such
as
the operating system (OS), firmware, and the
development environment.
 So system programming is an art of
designing and implementing system
Programs.
 System programs provide an environment
where programs can be developed and
executed.
 In the simplest sense, system programs also
provide a bridge between the user interface
and system calls.
 In reality, they are much more complex. For
example, a compiler is a complex system
program.
 The system program serves as a part of the
operating system. It traditionally lies between
the user interface and the system calls.
 The user view of the system is actually
defined by system programs and not system
calls because that is what they interact with
and system programs are closer to the user
interface.
 Compiler is a translator which converts the
high level language into low level language.
 Assembly Language
 Debugging tool helps programmer for testing
and debugging programs.
It provides some facilities:
Setting breakpoints.
Displaying values of variables.
 It is system software which provides interface
between user and hardware(computer
system).
 Assembly language is low level/middle level
language.
 An assembly language is machine dependent.
 It differs from computer to computer.
 Writing programs in assembly language is
very
easy as compared to machine(binary) language.
 Location Counter: (LC) points to the next
instruction.
Literals: constant values
A literal is a character string whose value is
given by the characters themselves
Symbols: name of variables and labels
Procedures: methods/ functions
 Assembly language Statements:
• Imperative Statements:
• Declarative/Declaration Statements:
• Assembler Directive:
 IMPERATIVE STATEMENTS
 These are executable statements
 They instruct the assembler to do certain task
 These generate some actions to instruct the
assembler to perform certain tasks.
 Add x,y
 sub a,b
 read a
 Print y
 Mover, x,Areg
 Imperative means mnemonics
 These are executable statements.
 Each imperative statement indicates an action
 to be taken during execution of the program.
 E.g. MOVER BREG, X
 STOP
 READ X
 ADD AREG, Z
 Declarative Statements
 Declaration statements are for reserving
 memory for variables.
 We can specify the initial value of a
 variable.
 It has two types:
 DS // Declare Storage
 DC // Declare Constant
 DECLRATIVE STATEMENTS
 For reserving memory for the variable.
 One word of memory is reserverd using DS
statement.
 DS- declare storage
 DC-declare constant
 A DS 1
 A DC ‘5’
 Or single statement B DC ’5’
 DS(Declare Storage):
 Syntax:
 [Label] DS <Constant specifying size>
 E.g.X DS 1
 DC (Declare Constant):
 Syntax:
 [Label ] DC <constant specifying value>
 E.g Y DC ‘5’
 For variable A is reserved one word of
memory
 Using DC we can initialize the variable with
value 5
 We can do both steps by single statement
using B DC ‘5’
 By default one word of memory is reserved
for the variable B and then it is assigned or
initialized with value 5.
 Assembler directives
 Directs the assembler to do certain action
 START < constant >
 Starts the program and gives the starting
address of the program as a constant.
 END
PROGRAM TERMINATES AFTER THE END STATEMENT
 Assembler Directive
 Assembler directive instruct the assembler
to perform certain actions during assembly
of a program.
 Some assembler directive are:
 START <address constant>
 END
 Modified unique statements to perform some
special functions
 It directs the assembler to perform some
specific action.
 ORIGIN
 LTORG
 EQU
 Start 200
 MOVE BREG=‘5’ 200
 LOOP MOVE AREG N 201
 ADD BREG = ‘2’ 202
 ORIGIN LOOP+5
 NEXT BC ANY, LOOP 206
 LTORG 207
 ORIGIN NEXT+3
 N DC 5 209
 END 210
 First check where is origin statement
 Right hand side of origin is constant and
operand
 ORIGIN statement tells us that what should be
the address of next immediate instruction
 In a given program it will evaluate the this
address using statement loop+5
 Loop label is at the address 201and after
adding 5 to it we get address 206 which is
the address should be assigned to label NEXT
of the next instruction.So the address of
instruction immediate after ORIGIN is given
the address 206.
 In the above program the literal occurs 2
times
 The literals are represented by ‘’ for example
in the program the literals are ‘5’ and ‘2’
 Literals are stored in literal table
 But the address are not assigned to them
 Address are assigned only when LTORG
instruction occurs in the program
 When this instruction runs
Only then the address are assigned to the
literal.
index literal address
0 =‘4’ 207
1 =‘2’ 208
 First check where is origin statement
 Right hand side of origin is constant and
operand
 ORIGIN statement tells us that what should be
the address of next immediate instruction
 In a given program it will evaluate the this
address using statement loop+5
 Loop label is at the address 201and after
adding 5 to it we get address 206 which is
the address should be assigned to label NEXT
of the next instruction.so the address of
instruction immediate after ORIGIN is given
the address 206.
 In the above program the literal occurs 2
times
 The literals are represented by ‘’ for example
in the program the literals are ‘5’ and ‘2’
 Literals are stored in literal table
 But the address are not assigned to them
 Address are assigned only when LTORG
instruction occurs in the program
 When this instruction runs
Only then the address are assigned to the
literal.
index literal address
0 =‘4’ 207
1 =‘2’ 208
 In the above literal table address are not
assigned to ‘2’ and ‘4’
 When the LTORG instruction occurs then only
the literals are assigned the address
 The address of the literal ‘4’ is assigned the
address value which is the address of LTORG
instruction i.e 207
 Next literal ‘4’ is assigned the address 208
which is the next immediate address after
LTORG instruction.
 If the LTORG instruction does not occur in the
program then literals are not assigned any
address till the end of the program.
 After the program ends then only literals are
assigned the addresses which are the next
address where program ends.
 < LABEL> EQU < ADDRESS>
 X EQU Y
 Label X is associated with address Y
 EQU is used to give the label or symbol which
is on left side of EQU assign or associate the
address given on right hand side of Y.
 Assembler
 • An Assembler is a translator which
 translates assembly language code into
 machine language with help of data
 structure.
 • It has two types
 • Pass 1 Assembler.
 • Pass 2 Assembler.
 General design procedure of assembler
 • Statement of Problem
 • Data Structure
 • Format of databases
 • Algorithms
 • Look for modularity.
 Data Structure Used
 • Data Structure used are as follows:
 • Symbol table
 • Literal Table
 • Mnemonic Opcode Table
 • Pool Table
 Pass 1 Assembler
 • Pass 1 assembler separate the labels ,
 mnemonic opcode table, and operand
 fields.
 • Determine storage requirement for every
 assembly language statement and update
 the location counter.
 • Build the symbol table. Symbol table is used
 to store each label and each variable and its
 corresponding address.
 • Pass 2 Assembler: Generate the machine
code
 How pass 1 assembler works?
 • Pass I uses following data structures.
 • 1. Machine opcode table.(MOT)
 • 2. Symbol Table(ST)
 • 3. Literal Table(LT)
 • 4. Pool Table(PT)
 • Contents of MOT are fixed for an
assembler.
 START 200
 MOVER AREG, =‘5’
 MOVEM AREG, X
 L1 MOVER BREG, =‘2’
 ORIGIN L1+3
 LTORG
 NEXT ADD AREG, =‘1’
 SUB BREG, =‘2’
 BC LT, BACK
 LTORG
 BACK EQU L1
 ORIGIN NEXT+5
 MULT CREG, =‘4’
 STOP
 X DS 1
 END
 For constructing intermediate code we need
MOT.
SPOS UNIT1 PPTS (1).pptx
SPOS UNIT1 PPTS (1).pptx
SPOS UNIT1 PPTS (1).pptx
SPOS UNIT1 PPTS (1).pptx
SPOS UNIT1 PPTS (1).pptx
SPOS UNIT1 PPTS (1).pptx
SPOS UNIT1 PPTS (1).pptx
SPOS UNIT1 PPTS (1).pptx
SPOS UNIT1 PPTS (1).pptx
SPOS UNIT1 PPTS (1).pptx
SPOS UNIT1 PPTS (1).pptx
SPOS UNIT1 PPTS (1).pptx
SPOS UNIT1 PPTS (1).pptx
SPOS UNIT1 PPTS (1).pptx
SPOS UNIT1 PPTS (1).pptx
SPOS UNIT1 PPTS (1).pptx
SPOS UNIT1 PPTS (1).pptx
SPOS UNIT1 PPTS (1).pptx
SPOS UNIT1 PPTS (1).pptx
SPOS UNIT1 PPTS (1).pptx
SPOS UNIT1 PPTS (1).pptx
SPOS UNIT1 PPTS (1).pptx

More Related Content

What's hot

Introduction to systems programming
Introduction to systems programmingIntroduction to systems programming
Introduction to systems programmingMukesh Tekwani
 
Python Crash Course
Python Crash CoursePython Crash Course
Python Crash CourseHaim Michael
 
Lecture 01 introduction to compiler
Lecture 01 introduction to compilerLecture 01 introduction to compiler
Lecture 01 introduction to compilerIffat Anjum
 
what is compiler and five phases of compiler
what is compiler and five phases of compilerwhat is compiler and five phases of compiler
what is compiler and five phases of compileradilmehmood93
 
Intermediate code generator
Intermediate code generatorIntermediate code generator
Intermediate code generatorsanchi29
 
Assemblers: Ch03
Assemblers: Ch03Assemblers: Ch03
Assemblers: Ch03desta_gebre
 
Language processing activity
Language processing activityLanguage processing activity
Language processing activityDhruv Sabalpara
 
Compiler construction tools
Compiler construction toolsCompiler construction tools
Compiler construction toolsAkhil Kaushik
 
Fundamentals of Language Processing
Fundamentals of Language ProcessingFundamentals of Language Processing
Fundamentals of Language ProcessingHemant Sharma
 
input/ output in java
input/ output  in javainput/ output  in java
input/ output in javasharma230399
 
Introduction to Python Programming
Introduction to Python ProgrammingIntroduction to Python Programming
Introduction to Python ProgrammingAkhil Kaushik
 
System Programming- Unit I
System Programming- Unit ISystem Programming- Unit I
System Programming- Unit ISaranya1702
 

What's hot (20)

Introduction to systems programming
Introduction to systems programmingIntroduction to systems programming
Introduction to systems programming
 
Java virtual machine
Java virtual machineJava virtual machine
Java virtual machine
 
Spr ch-01
Spr ch-01Spr ch-01
Spr ch-01
 
System Programming Overview
System Programming OverviewSystem Programming Overview
System Programming Overview
 
Python Crash Course
Python Crash CoursePython Crash Course
Python Crash Course
 
Lecture 01 introduction to compiler
Lecture 01 introduction to compilerLecture 01 introduction to compiler
Lecture 01 introduction to compiler
 
what is compiler and five phases of compiler
what is compiler and five phases of compilerwhat is compiler and five phases of compiler
what is compiler and five phases of compiler
 
loaders and linkers
 loaders and linkers loaders and linkers
loaders and linkers
 
Intermediate code generator
Intermediate code generatorIntermediate code generator
Intermediate code generator
 
Lexical analysis - Compiler Design
Lexical analysis - Compiler DesignLexical analysis - Compiler Design
Lexical analysis - Compiler Design
 
Assemblers: Ch03
Assemblers: Ch03Assemblers: Ch03
Assemblers: Ch03
 
MACRO PROCESSOR
MACRO PROCESSORMACRO PROCESSOR
MACRO PROCESSOR
 
Language processing activity
Language processing activityLanguage processing activity
Language processing activity
 
Compiler construction tools
Compiler construction toolsCompiler construction tools
Compiler construction tools
 
Fundamentals of Language Processing
Fundamentals of Language ProcessingFundamentals of Language Processing
Fundamentals of Language Processing
 
input/ output in java
input/ output  in javainput/ output  in java
input/ output in java
 
Semaphores
SemaphoresSemaphores
Semaphores
 
Lexical analysis
Lexical analysisLexical analysis
Lexical analysis
 
Introduction to Python Programming
Introduction to Python ProgrammingIntroduction to Python Programming
Introduction to Python Programming
 
System Programming- Unit I
System Programming- Unit ISystem Programming- Unit I
System Programming- Unit I
 

Similar to SPOS UNIT1 PPTS (1).pptx

Chapter1pdf__2021_11_23_10_53_20.pdf
Chapter1pdf__2021_11_23_10_53_20.pdfChapter1pdf__2021_11_23_10_53_20.pdf
Chapter1pdf__2021_11_23_10_53_20.pdfDrIsikoIsaac
 
Phases of Compiler.pptx
Phases of Compiler.pptxPhases of Compiler.pptx
Phases of Compiler.pptxssuser3b4934
 
Insight into progam execution ppt
Insight into progam execution pptInsight into progam execution ppt
Insight into progam execution pptKeerty Smile
 
Chap 1-language processor
Chap 1-language processorChap 1-language processor
Chap 1-language processorshindept123
 
Concept of compiler in details
Concept of compiler in detailsConcept of compiler in details
Concept of compiler in detailskazi_aihtesham
 
unit1pdf__2021_12_14_12_37_34.pdf
unit1pdf__2021_12_14_12_37_34.pdfunit1pdf__2021_12_14_12_37_34.pdf
unit1pdf__2021_12_14_12_37_34.pdfDrIsikoIsaac
 
Compiler an overview
Compiler  an overviewCompiler  an overview
Compiler an overviewamudha arul
 
Compiler Design Introduction
Compiler Design Introduction Compiler Design Introduction
Compiler Design Introduction Thapar Institute
 
design intoduction of_COMPILER_DESIGN.pdf
design intoduction of_COMPILER_DESIGN.pdfdesign intoduction of_COMPILER_DESIGN.pdf
design intoduction of_COMPILER_DESIGN.pdfadvRajatSharma
 
System software module 1 presentation file
System software module 1 presentation fileSystem software module 1 presentation file
System software module 1 presentation filejithujithin657
 
Pros and cons of c as a compiler language
  Pros and cons of c as a compiler language  Pros and cons of c as a compiler language
Pros and cons of c as a compiler languageAshok Raj
 
Software programming and development
Software programming and developmentSoftware programming and development
Software programming and developmentAli Raza
 
Chap 1-dhamdhere system programming
Chap 1-dhamdhere system programmingChap 1-dhamdhere system programming
Chap 1-dhamdhere system programmingTanzoGamerz
 
Unit1 111206003944-phpapp02
Unit1 111206003944-phpapp02Unit1 111206003944-phpapp02
Unit1 111206003944-phpapp02riddhi viradiya
 

Similar to SPOS UNIT1 PPTS (1).pptx (20)

Chapter1pdf__2021_11_23_10_53_20.pdf
Chapter1pdf__2021_11_23_10_53_20.pdfChapter1pdf__2021_11_23_10_53_20.pdf
Chapter1pdf__2021_11_23_10_53_20.pdf
 
Phases of Compiler.pptx
Phases of Compiler.pptxPhases of Compiler.pptx
Phases of Compiler.pptx
 
Insight into progam execution ppt
Insight into progam execution pptInsight into progam execution ppt
Insight into progam execution ppt
 
Chap 1-language processor
Chap 1-language processorChap 1-language processor
Chap 1-language processor
 
Concept of compiler in details
Concept of compiler in detailsConcept of compiler in details
Concept of compiler in details
 
unit1pdf__2021_12_14_12_37_34.pdf
unit1pdf__2021_12_14_12_37_34.pdfunit1pdf__2021_12_14_12_37_34.pdf
unit1pdf__2021_12_14_12_37_34.pdf
 
Compiler an overview
Compiler  an overviewCompiler  an overview
Compiler an overview
 
Chapter#01 cc
Chapter#01 ccChapter#01 cc
Chapter#01 cc
 
Compiler Design Introduction
Compiler Design Introduction Compiler Design Introduction
Compiler Design Introduction
 
design intoduction of_COMPILER_DESIGN.pdf
design intoduction of_COMPILER_DESIGN.pdfdesign intoduction of_COMPILER_DESIGN.pdf
design intoduction of_COMPILER_DESIGN.pdf
 
Chapter1.pdf
Chapter1.pdfChapter1.pdf
Chapter1.pdf
 
Assembler
AssemblerAssembler
Assembler
 
System software module 1 presentation file
System software module 1 presentation fileSystem software module 1 presentation file
System software module 1 presentation file
 
Chapter 1.pptx
Chapter 1.pptxChapter 1.pptx
Chapter 1.pptx
 
Translators(Compiler, Assembler) and interpreter
Translators(Compiler, Assembler) and interpreterTranslators(Compiler, Assembler) and interpreter
Translators(Compiler, Assembler) and interpreter
 
Pros and cons of c as a compiler language
  Pros and cons of c as a compiler language  Pros and cons of c as a compiler language
Pros and cons of c as a compiler language
 
Software programming and development
Software programming and developmentSoftware programming and development
Software programming and development
 
Chap 1-dhamdhere system programming
Chap 1-dhamdhere system programmingChap 1-dhamdhere system programming
Chap 1-dhamdhere system programming
 
Unit1 111206003944-phpapp02
Unit1 111206003944-phpapp02Unit1 111206003944-phpapp02
Unit1 111206003944-phpapp02
 
Compiler
Compiler Compiler
Compiler
 

Recently uploaded

2016EF22_0 solar project report rooftop projects
2016EF22_0 solar project report rooftop projects2016EF22_0 solar project report rooftop projects
2016EF22_0 solar project report rooftop projectssmsksolar
 
Unit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdfUnit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdfRagavanV2
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startQuintin Balsdon
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 
Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086anil_gaur
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Arindam Chakraborty, Ph.D., P.E. (CA, TX)
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapRishantSharmaFr
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptxJIT KUMAR GUPTA
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfKamal Acharya
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...tanu pandey
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Standamitlee9823
 
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoordharasingh5698
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayEpec Engineered Technologies
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VDineshKumar4165
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . pptDineshKumar4165
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.Kamal Acharya
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfJiananWang21
 

Recently uploaded (20)

2016EF22_0 solar project report rooftop projects
2016EF22_0 solar project report rooftop projects2016EF22_0 solar project report rooftop projects
2016EF22_0 solar project report rooftop projects
 
Unit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdfUnit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdf
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
 
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced LoadsFEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 

SPOS UNIT1 PPTS (1).pptx

  • 1. Introduction to Systems Programming By-Prof.Ravishankar C.Bhaganagare Computer Dept. SKN SITS Lonavala
  • 2.  SYLLABUS :- Introduction to Systems Programming, Need of Systems Programming, Software Hierarchy, Types of software: system software and application software, Machine structure. Evolution of components of Systems Programming: Text Editors, Assembler, Macros, Compiler, Interpreter, Loader, Linker, Debugger, Device Drivers, Operating System. Elements of Assembly Language Programming: Assembly Language statements, Benefits of Assembly Language, A simple Assembly scheme, Pass Structure of Assembler. Design of two pass Assembler: Processing of declaration
  • 3.  Computer program : Data type specifications and instructions for carrying out operations that are used by a computer to solve a problem. Machine language : The language, made up of binary coded instructions, that is used directly by the computer. Assembly language : A low-level programming language in which a mnemonic is used to represent each of the machine language instructions for a particular computer.
  • 4.  Source code : Program or set of instructions written in a high-level programming language.  Object code : A machine language version of source code.  Target code : program output in Machine code (binary form)
  • 5.  Preprocessor : a preprocessor is a program that processes its input data to produce output that is used as input to another program.  Editor : A text editor is a type of computer program that edits plain text. Such programs are sometimes known as "notepad" software  Compiler : A program that translates a program written in a high level language into machine code  Assembler : A program that translates an assembly language program into machine code.
  • 6.  Loader:- A loader is a program used by an operating system to load programs from a secondary to main memory so as to be executed.  Linker :a linker is a computer program that takes one or more object files generated by a compiler and combines them into one, executable program.  Debugger : Debugger is program which is used to test program or execute program in single step execution.
  • 7.  What is System? – System is the collection of various components Ex:- College is a system. College is a system because it consist of various components like various departments, classrooms, faculties and students.  What is Programming? – Art of designing and implementing the programs.
  • 8.  What is System Programming? Systems programming involves the development of the individual pieces of software that allow the entire system to function as a single unit. Systems programming involves many layers such as the operating system (OS), firmware, and the development environment.  So system programming is an art of designing and implementing system Programs.
  • 9.  System programs provide an environment where programs can be developed and executed.  In the simplest sense, system programs also provide a bridge between the user interface and system calls.  In reality, they are much more complex. For example, a compiler is a complex system program.
  • 10.  The system program serves as a part of the operating system. It traditionally lies between the user interface and the system calls.  The user view of the system is actually defined by system programs and not system calls because that is what they interact with and system programs are closer to the user interface.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.  Compiler is a translator which converts the high level language into low level language.
  • 34.
  • 36.
  • 37.
  • 38.
  • 39.  Debugging tool helps programmer for testing and debugging programs. It provides some facilities: Setting breakpoints. Displaying values of variables.
  • 40.  It is system software which provides interface between user and hardware(computer system).
  • 41.  Assembly language is low level/middle level language.  An assembly language is machine dependent.  It differs from computer to computer.  Writing programs in assembly language is very easy as compared to machine(binary) language.
  • 42.  Location Counter: (LC) points to the next instruction. Literals: constant values A literal is a character string whose value is given by the characters themselves Symbols: name of variables and labels Procedures: methods/ functions
  • 43.  Assembly language Statements: • Imperative Statements: • Declarative/Declaration Statements: • Assembler Directive:
  • 44.  IMPERATIVE STATEMENTS  These are executable statements  They instruct the assembler to do certain task  These generate some actions to instruct the assembler to perform certain tasks.  Add x,y  sub a,b  read a  Print y  Mover, x,Areg
  • 45.  Imperative means mnemonics  These are executable statements.  Each imperative statement indicates an action  to be taken during execution of the program.  E.g. MOVER BREG, X  STOP  READ X  ADD AREG, Z
  • 46.  Declarative Statements  Declaration statements are for reserving  memory for variables.  We can specify the initial value of a  variable.  It has two types:  DS // Declare Storage  DC // Declare Constant
  • 47.  DECLRATIVE STATEMENTS  For reserving memory for the variable.  One word of memory is reserverd using DS statement.  DS- declare storage  DC-declare constant  A DS 1  A DC ‘5’  Or single statement B DC ’5’
  • 48.  DS(Declare Storage):  Syntax:  [Label] DS <Constant specifying size>  E.g.X DS 1  DC (Declare Constant):  Syntax:  [Label ] DC <constant specifying value>  E.g Y DC ‘5’
  • 49.  For variable A is reserved one word of memory  Using DC we can initialize the variable with value 5  We can do both steps by single statement using B DC ‘5’  By default one word of memory is reserved for the variable B and then it is assigned or initialized with value 5.
  • 50.  Assembler directives  Directs the assembler to do certain action  START < constant >  Starts the program and gives the starting address of the program as a constant.  END PROGRAM TERMINATES AFTER THE END STATEMENT
  • 51.  Assembler Directive  Assembler directive instruct the assembler to perform certain actions during assembly of a program.  Some assembler directive are:  START <address constant>  END
  • 52.
  • 53.
  • 54.  Modified unique statements to perform some special functions  It directs the assembler to perform some specific action.  ORIGIN  LTORG  EQU
  • 55.  Start 200  MOVE BREG=‘5’ 200  LOOP MOVE AREG N 201  ADD BREG = ‘2’ 202  ORIGIN LOOP+5  NEXT BC ANY, LOOP 206  LTORG 207  ORIGIN NEXT+3  N DC 5 209  END 210
  • 56.  First check where is origin statement  Right hand side of origin is constant and operand  ORIGIN statement tells us that what should be the address of next immediate instruction  In a given program it will evaluate the this address using statement loop+5  Loop label is at the address 201and after adding 5 to it we get address 206 which is the address should be assigned to label NEXT of the next instruction.So the address of instruction immediate after ORIGIN is given the address 206.
  • 57.  In the above program the literal occurs 2 times  The literals are represented by ‘’ for example in the program the literals are ‘5’ and ‘2’  Literals are stored in literal table  But the address are not assigned to them  Address are assigned only when LTORG instruction occurs in the program  When this instruction runs Only then the address are assigned to the literal.
  • 58. index literal address 0 =‘4’ 207 1 =‘2’ 208
  • 59.
  • 60.
  • 61.
  • 62.  First check where is origin statement  Right hand side of origin is constant and operand  ORIGIN statement tells us that what should be the address of next immediate instruction  In a given program it will evaluate the this address using statement loop+5  Loop label is at the address 201and after adding 5 to it we get address 206 which is the address should be assigned to label NEXT of the next instruction.so the address of instruction immediate after ORIGIN is given the address 206.
  • 63.  In the above program the literal occurs 2 times  The literals are represented by ‘’ for example in the program the literals are ‘5’ and ‘2’  Literals are stored in literal table  But the address are not assigned to them  Address are assigned only when LTORG instruction occurs in the program  When this instruction runs Only then the address are assigned to the literal.
  • 64. index literal address 0 =‘4’ 207 1 =‘2’ 208
  • 65.  In the above literal table address are not assigned to ‘2’ and ‘4’  When the LTORG instruction occurs then only the literals are assigned the address  The address of the literal ‘4’ is assigned the address value which is the address of LTORG instruction i.e 207  Next literal ‘4’ is assigned the address 208 which is the next immediate address after LTORG instruction.
  • 66.  If the LTORG instruction does not occur in the program then literals are not assigned any address till the end of the program.  After the program ends then only literals are assigned the addresses which are the next address where program ends.
  • 67.  < LABEL> EQU < ADDRESS>  X EQU Y  Label X is associated with address Y  EQU is used to give the label or symbol which is on left side of EQU assign or associate the address given on right hand side of Y.
  • 68.
  • 69.
  • 70.
  • 71.  Assembler  • An Assembler is a translator which  translates assembly language code into  machine language with help of data  structure.  • It has two types  • Pass 1 Assembler.  • Pass 2 Assembler.
  • 72.  General design procedure of assembler  • Statement of Problem  • Data Structure  • Format of databases  • Algorithms  • Look for modularity.
  • 73.  Data Structure Used  • Data Structure used are as follows:  • Symbol table  • Literal Table  • Mnemonic Opcode Table  • Pool Table
  • 74.
  • 75.
  • 76.  Pass 1 Assembler  • Pass 1 assembler separate the labels ,  mnemonic opcode table, and operand  fields.  • Determine storage requirement for every  assembly language statement and update  the location counter.  • Build the symbol table. Symbol table is used  to store each label and each variable and its  corresponding address.
  • 77.  • Pass 2 Assembler: Generate the machine code
  • 78.  How pass 1 assembler works?  • Pass I uses following data structures.  • 1. Machine opcode table.(MOT)  • 2. Symbol Table(ST)  • 3. Literal Table(LT)  • 4. Pool Table(PT)  • Contents of MOT are fixed for an assembler.
  • 79.  START 200  MOVER AREG, =‘5’  MOVEM AREG, X  L1 MOVER BREG, =‘2’  ORIGIN L1+3  LTORG  NEXT ADD AREG, =‘1’  SUB BREG, =‘2’  BC LT, BACK  LTORG  BACK EQU L1  ORIGIN NEXT+5  MULT CREG, =‘4’  STOP  X DS 1  END
  • 80.
  • 81.
  • 82.
  • 83.
  • 84.  For constructing intermediate code we need MOT.