SlideShare a Scribd company logo
Loader
Role of Loader Source Program Translator Object Program Loader Object program ready for execution Memory Translator – Assembler/Compiler
Role of Loader and Linker Source Program Assembler Object Program Linker Executable  Code Loader Object program ready for execution Memory
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Algorithm for absolute loader:- Begin  Read Header record  Verify program name and length  Read first text record While record type is not ‘E’ do begin if object code is in character form { convert into internal representation } read next object program record end Jump to the address specified in End Record end
Role of Absolute Loader Object Program Absolute Loader Object program ready for execution Memory 1000 2000
Object Program H COPY  001000 00107A T 001000 1E 141033 482039 001036 281030 301015 482061 ... T 00101E 15 0C1036 482061 081044 4C0000 454F46 000003 000000 T 002039 1E 041030 001030 E0205D 30203F D8205D 281030  … T 002057 1C 101036 4C0000 F1 001000 041030 E02079 302064  … T 002073 07 382064 4C0000 05 E 001000
 
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Bootstrap Loader
A Simple Bootstrap Loader ,[object Object],[object Object],[object Object]
Example (SIC bootstrap loader) ,[object Object],[object Object],[object Object]
After load the OS, the control is transferred to the instruction at address 80.
Algorithm of bootstrap loader Begin X=0x80 (the address of the next memory location to be loaded) Loop A  GETC ( and convert it from the ASCII character  code to the value of the hexadecimal digit ) save the value in the high-order 4 bits of S A  GETC combine the value to form one byte A   (A+S) store the value (in A) to the address in register X X  X+1 End
GETC reads one character and convert it into hexadecimal digit. For example, the ASCII code for  ‘1’ through ‘9’ are converted to the numeric values 1 through 9. and codes for ‘A’ through ‘F’ ( 41 to 46 Hex) are converted to the values 10 through 15. this is accomplished by subtracting 48 ( 30 in Hex) from the character codes of 0-9 and by subtracting 55 (37 in Hex) from the codes of A-F ASCII value of 0~9 : 0x30~39 A~F : 0x41~46
Machine Dependent Loader Features ,[object Object],[object Object]
Example of Relocation  Line Loc   Source statement Object code 5 0000 COPY  START  0 10 0000 FIRST  STL  RETADR 17202D 12 0003  LDB  #LENGTH 69202D 13  BASE  LENGTH 15 0006 CLOOP +JSUB  RDREC 4B101036 20 000A  LDA  LENGTH 032026 25 000D  COMP #0 290000 30 0010  JEQ  ENDFIL 332007 35 0013 +JSUB  WRREC 4B10105D 40 0017  J  CLOOP 3F2FEC 45 001A ENDFIL  LDA  EOF 032010 50 001D  STA  BUFFER 0F2016 55 0020  LDA #3 010003 60 0023  STA  LENGTH 0F200D 65 0026 +JSUB  WRREC 4B10105D 70 002A  J @RETADR 3E2003 80 002D EOF  BYTE  C’EOF’ 454F46 95 0030 RETADR  RESW  1 100 0033 LENGTH  RESW  1 105 0036 BUFFER  RESB  4096
125 1036 RDREC  CLEAR X B410 130   132   133   135   140   145   150   155   160   165   170   175   180   185   210 105D WRREC  CLEAR X B410 212   215   220   225 230   235 ...(omitted)
Instructions at line no 15,35 & 65 are the only items whose values are affected by relocation. We use modification records for the relocation purpose. Each modification record specifies the starting address and the length of the field whose value to be altered. It then describes the modification to be performed. ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Modification Record H  COPY   000000 001077 T  000000   1D  17202D  69202D  48101036  …  4B105D  3F2FEC  032010 T  00001D  13  0F2016  010003  0F200D  4B10105D  3E2003  454F46 T  001035   1D  B410  B400  B440  75101000  …  332008  57C003  B850 T  001053  1D  3B2FEA  134000  4F0000  F1  ..  53C003  DF2008  B850 T  00070  07  3B2FEF  4F0000  05 M  000007  05+COPY M  000014  05+COPY M  000027  05+COPY E  000000
Begin Get PROGADDR from OS While  not end of input  do {  read next record    while  record type != ‘E’  do { read next input record  while  record type  = ‘ T ’  do     { move object code from record to location  ADDR + specified address   } while record type = ‘ M ’ add PROGADDR at the location PROGADDR +  specified address } } end Relocation Loader Algorithm
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Text record  format ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Relocatable Program for SIC Line Loc   Source statement Object code 5 0000 COPY START 0 10 0000 FIRST STL RETADR 140033 15 0003 CLOOP JSUB RDREC 481039 20 0006 LDA LENGTH 000036 25 0009 COMP ZERO 280030 30 000C JEQ ENDFIL 300015 35 000F JSUB WRREC 481061 40 0012 J CLOOP 3C0003 45 0015 ENDFIL LDA EOF 00002A 50 0018 STA BUFFER 0C0039 55 001B LDA THREE 00002D 60 001E STA LENGTH 0C0036 65 0021 JSUB WRREC 481061 70 0024 LDL RETADR 080033 75 0027 RSUB 4C0000 80 002A EOF BYTE C’EOF’ 454F46 85 002D THREE WORD 3 000003 90 0030 ZERO WORD 0 000000 95 0033 RETADR RESW 1 100 0036 LENGTH RESW 1 105 0039 BUFFER RESB 4096
125 1039 RDREC LDX ZERO 040030 130 103C LDA ZERO 000030 135 103F RLOOP TD INPUT E0105D 140 1042 JEQ RLOOP 30103D 145 1045 RD INPUT  D8105D 150 1048 COMP ZERO 280030 155 104B JEQ EXIT 301057 160 104E STCH BUFFER,X 548039 165 1051 TIX MAXLEN 2C105E 170 1054 JLT RLOOP 38103F 175 1057 EXIT STX LENGTH 100036 180 105A RSUB 4C0000 185 105D INPUT BYTE X’F1’ F1 190 105E MAXLEN WORD 4096 001000 210 1061 WRREC LDX ZERO 040030 215 1064 WLOOP TD OUTPUT E01079 220 1067 JEQ WLOOP 301064   225 106A LDCH BUFFER,X 508039 230 106D WD OUTPUT DC1079 235 1070 TIX LENGTH 2C0036 240 1073 JLT WLOOP 381064   245 1076 RSUB 4C0000   250 1079 OUTPUT BYTE X’05’ 05   255 END FIRST
Relocation by Bit Mask H COPY  000000 00107A T 000000 1E  FFC  140033 481039 000036 280030 300015 481061 ... T 00001E 15  E00  0C0036 481061 080044 4C0000 454F46 000003  … T 001039 1E  FFC  040030 000030 E0105D 30103F D8105D  … T 001057 1C  800  100036 4C0000 F1 001000 T 001061 19  FE0  040030 E01079 301064 508039 DC1079 2C0036  … E 000000 Here the bit mask  FFC  (representing the bit string 111111111100) In the first text record specifies that all 10 words of object code are to be modified during relocation. Similarly bit mask  E00  represents  that the first 3 words are to be modified .
Machine Independent Loader Features ,[object Object],[object Object]
Automatic library search :- This feature allows a programmer to use standard subroutines without explicitly including them in the program to be loaded. So programmer can use any subroutine by just mentioning their names. The subroutines are automatically fetched from the library, linked with the main program and loaded. Loader maintains an External Symbol Table ( ESTAB ) for these external symbols. The loader searches the library specified for routines that contain the definitions of these symbols, and process the subroutines found by this search. In most cases a special file structure is used for libraries. This structure contains a directory that gives the name of each routine and a pointer to its address within the file.  Pointer Name
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Line Loc   Source statement Object code 5 0000 COPY  START  0 10 12 13   15 0006 CLOOP +JSUB  RDREC 4B10 1036 30   35 0013 +JSUB  WRREC 4B10 105D 40   65 0026 +JSUB  WRREC 4B10 105D 70   105 125 1036 RDREC  CLEAR X B410 130   180   185   210 105D WRREC  CLEAR X B410 212   230   235 ...(omitted) Example of Relocation  INCLUDE READ(ULIB) INCLUDE WRITE(ULIB) DELETE RDREC,WRREC CHANGE RDREC, READ CHANGE WRREC, WRITE
These command would direct the loader to include control sections READ & WRITE from the library ULIB, and to delete the control sections RDREC and WRREC from the load. The first CHANGE command would cause all external references to symbol RDREC to be changed to refer to symbol.

More Related Content

What's hot

debugging - system software
debugging - system softwaredebugging - system software
debugging - system software
Vicky Shan
 
Input-Buffering
Input-BufferingInput-Buffering
Input-Buffering
Dattatray Gandhmal
 
Logical and shift micro operations
Logical and shift micro operationsLogical and shift micro operations
Logical and shift micro operations
Sanjeev Patel
 
loaders and linkers
 loaders and linkers loaders and linkers
loaders and linkers
Temesgen Molla
 
Assemblers: Ch03
Assemblers: Ch03Assemblers: Ch03
Assemblers: Ch03
desta_gebre
 
Language for specifying lexical Analyzer
Language for specifying lexical AnalyzerLanguage for specifying lexical Analyzer
Language for specifying lexical Analyzer
Archana Gopinath
 
Instruction set of 8085
Instruction set  of 8085Instruction set  of 8085
Instruction set of 8085
shiji v r
 
Loader
LoaderLoader
Single pass assembler
Single pass assemblerSingle pass assembler
Single pass assembler
Bansari Shah
 
Introduction to Compiler design
Introduction to Compiler design Introduction to Compiler design
Introduction to Compiler design
Dr. C.V. Suresh Babu
 
Compiler Design
Compiler DesignCompiler Design
Compiler Design
Mir Majid
 
8085 instruction set
8085 instruction set8085 instruction set
Embedded C workshop
Embedded C workshopEmbedded C workshop
Embedded C workshop
Mostafa El-koumy
 
Logical micro-operations
Logical micro-operationsLogical micro-operations
Logical micro-operations
VATSAL TRIVEDI
 
Types of Parser
Types of ParserTypes of Parser
Types of Parser
SomnathMore3
 
Unit 4 sp macro
Unit 4 sp macroUnit 4 sp macro
Unit 4 sp macro
Deepmala Sharma
 
1.Role lexical Analyzer
1.Role lexical Analyzer1.Role lexical Analyzer
1.Role lexical Analyzer
Radhakrishnan Chinnusamy
 
memory reference instruction
memory reference instructionmemory reference instruction
memory reference instruction
DeepikaT13
 
8237 dma controller
8237 dma controller8237 dma controller
8237 dma controller
Tech_MX
 
Instruction sets of 8086
Instruction sets of 8086Instruction sets of 8086
Instruction sets of 8086
Mahalakshmiv11
 

What's hot (20)

debugging - system software
debugging - system softwaredebugging - system software
debugging - system software
 
Input-Buffering
Input-BufferingInput-Buffering
Input-Buffering
 
Logical and shift micro operations
Logical and shift micro operationsLogical and shift micro operations
Logical and shift micro operations
 
loaders and linkers
 loaders and linkers loaders and linkers
loaders and linkers
 
Assemblers: Ch03
Assemblers: Ch03Assemblers: Ch03
Assemblers: Ch03
 
Language for specifying lexical Analyzer
Language for specifying lexical AnalyzerLanguage for specifying lexical Analyzer
Language for specifying lexical Analyzer
 
Instruction set of 8085
Instruction set  of 8085Instruction set  of 8085
Instruction set of 8085
 
Loader
LoaderLoader
Loader
 
Single pass assembler
Single pass assemblerSingle pass assembler
Single pass assembler
 
Introduction to Compiler design
Introduction to Compiler design Introduction to Compiler design
Introduction to Compiler design
 
Compiler Design
Compiler DesignCompiler Design
Compiler Design
 
8085 instruction set
8085 instruction set8085 instruction set
8085 instruction set
 
Embedded C workshop
Embedded C workshopEmbedded C workshop
Embedded C workshop
 
Logical micro-operations
Logical micro-operationsLogical micro-operations
Logical micro-operations
 
Types of Parser
Types of ParserTypes of Parser
Types of Parser
 
Unit 4 sp macro
Unit 4 sp macroUnit 4 sp macro
Unit 4 sp macro
 
1.Role lexical Analyzer
1.Role lexical Analyzer1.Role lexical Analyzer
1.Role lexical Analyzer
 
memory reference instruction
memory reference instructionmemory reference instruction
memory reference instruction
 
8237 dma controller
8237 dma controller8237 dma controller
8237 dma controller
 
Instruction sets of 8086
Instruction sets of 8086Instruction sets of 8086
Instruction sets of 8086
 

Viewers also liked

Loaders
LoadersLoaders
Loaders
Mohd Arif
 
Loaders
LoadersLoaders
Direct linking loader
Direct linking loaderDirect linking loader
Direct linking loader
babyparul
 
Linkers
LinkersLinkers
Linkers
Tech_MX
 
Linkers And Loaders
Linkers And LoadersLinkers And Loaders
Linkers And Loaders
Satpal Parmar
 
Direct linking loaders
Direct linking loadersDirect linking loaders
Direct linking loaders
Satyamevjayte Haxor
 
Loader and Its types
Loader and Its typesLoader and Its types
Loader and Its types
Parth Dodiya
 
Loaders ( system programming )
Loaders ( system programming ) Loaders ( system programming )
Loaders ( system programming )
Adarsh Patel
 
5. construction equipment Building Construction
5. construction equipment Building Construction5. construction equipment Building Construction
5. construction equipment Building Construction
Hamdija Velagic
 
Assembler
AssemblerAssembler
Assembler
Maha Lakshmi
 
System Programming Unit II
System Programming Unit IISystem Programming Unit II
System Programming Unit II
Manoj Patil
 
Construction equipments
Construction equipmentsConstruction equipments
Construction equipments
Ashish Parihar
 
Bootstrap process boot loader
Bootstrap process boot loaderBootstrap process boot loader
Bootstrap process boot loader
idrajeev
 
The Once And Future Script Loader (v3)
The Once And Future Script Loader (v3)The Once And Future Script Loader (v3)
The Once And Future Script Loader (v3)
Kyle Simpson
 
Systemsoftwarenotes 100929171256-phpapp02 2
Systemsoftwarenotes 100929171256-phpapp02 2Systemsoftwarenotes 100929171256-phpapp02 2
Systemsoftwarenotes 100929171256-phpapp02 2
Khaja Dileef
 
Bootloader and MMU (english)
Bootloader and MMU (english)Bootloader and MMU (english)
Bootloader and MMU (english)
Sneeker Yeh
 
Absolute Loader
Absolute LoaderAbsolute Loader
Absolute Loaderksanthosh
 
Implementation of absolute loader
Implementation of absolute loaderImplementation of absolute loader
Implementation of absolute loader
Jaya Krishnan P
 
Linkers
LinkersLinkers
Linkers
Rahul Dhiman
 

Viewers also liked (20)

Loaders
LoadersLoaders
Loaders
 
Loaders
LoadersLoaders
Loaders
 
Direct linking loader
Direct linking loaderDirect linking loader
Direct linking loader
 
Linkers
LinkersLinkers
Linkers
 
Linkers And Loaders
Linkers And LoadersLinkers And Loaders
Linkers And Loaders
 
Direct linking loaders
Direct linking loadersDirect linking loaders
Direct linking loaders
 
Loader and Its types
Loader and Its typesLoader and Its types
Loader and Its types
 
Loaders ( system programming )
Loaders ( system programming ) Loaders ( system programming )
Loaders ( system programming )
 
5. construction equipment Building Construction
5. construction equipment Building Construction5. construction equipment Building Construction
5. construction equipment Building Construction
 
Assembler
AssemblerAssembler
Assembler
 
System Programming Unit II
System Programming Unit IISystem Programming Unit II
System Programming Unit II
 
Construction equipments
Construction equipmentsConstruction equipments
Construction equipments
 
Bootstrap process boot loader
Bootstrap process boot loaderBootstrap process boot loader
Bootstrap process boot loader
 
Collage
CollageCollage
Collage
 
The Once And Future Script Loader (v3)
The Once And Future Script Loader (v3)The Once And Future Script Loader (v3)
The Once And Future Script Loader (v3)
 
Systemsoftwarenotes 100929171256-phpapp02 2
Systemsoftwarenotes 100929171256-phpapp02 2Systemsoftwarenotes 100929171256-phpapp02 2
Systemsoftwarenotes 100929171256-phpapp02 2
 
Bootloader and MMU (english)
Bootloader and MMU (english)Bootloader and MMU (english)
Bootloader and MMU (english)
 
Absolute Loader
Absolute LoaderAbsolute Loader
Absolute Loader
 
Implementation of absolute loader
Implementation of absolute loaderImplementation of absolute loader
Implementation of absolute loader
 
Linkers
LinkersLinkers
Linkers
 

Similar to Loader

Assembler
AssemblerAssembler
Assembler
Manish Pandey
 
Assembler
AssemblerAssembler
Assembler
Maha Lakshmi
 
loaders-and-linkers.pdfhhhhhccftyghgfggy
loaders-and-linkers.pdfhhhhhccftyghgfggyloaders-and-linkers.pdfhhhhhccftyghgfggy
loaders-and-linkers.pdfhhhhhccftyghgfggy
rahulyadav957181
 
loader.ppt
loader.pptloader.ppt
Assembler
AssemblerAssembler
Assembler
Sonam Sharma
 
Chp6 assembly language programming for pic copy
Chp6 assembly language programming for pic   copyChp6 assembly language programming for pic   copy
Chp6 assembly language programming for pic copy
mkazree
 
EMBEDDED SYSTEMS 4&5
EMBEDDED SYSTEMS 4&5EMBEDDED SYSTEMS 4&5
EMBEDDED SYSTEMS 4&5
PRADEEP
 
Introduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxIntroduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptx
vipinkmenon1
 
12 mt06ped008
12 mt06ped008 12 mt06ped008
12 mt06ped008
vijaydeepakg
 
System Software
System SoftwareSystem Software
System Software
PandurangBiradar2
 
Sp chap2
Sp chap2Sp chap2
assembler_full_slides.ppt
assembler_full_slides.pptassembler_full_slides.ppt
assembler_full_slides.ppt
Ashwini864432
 
Lecture6
Lecture6Lecture6
11 chapter06 slc_int_float_mov_mvm_fa14
11 chapter06 slc_int_float_mov_mvm_fa1411 chapter06 slc_int_float_mov_mvm_fa14
11 chapter06 slc_int_float_mov_mvm_fa14
John Todora
 
Instruction Set Architecture
Instruction Set ArchitectureInstruction Set Architecture
Instruction Set Architecture
Dilum Bandara
 
Assembler - System Programming
Assembler - System ProgrammingAssembler - System Programming
Assembler - System Programming
Radhika Talaviya
 
Intel 8085 mp
Intel 8085 mpIntel 8085 mp
Intel 8085 mp
Shaswata Chowdhury
 
Hardware Description Beyond Register-Transfer Level (RTL) Languages
Hardware Description Beyond Register-Transfer Level (RTL) LanguagesHardware Description Beyond Register-Transfer Level (RTL) Languages
Hardware Description Beyond Register-Transfer Level (RTL) Languages
LEGATO project
 
RISC-V Zce Extension
RISC-V Zce ExtensionRISC-V Zce Extension
RISC-V Zce Extension
RISC-V International
 
Microprocessor File
Microprocessor FileMicroprocessor File
Microprocessor File
Sourabh Bhattacharya
 

Similar to Loader (20)

Assembler
AssemblerAssembler
Assembler
 
Assembler
AssemblerAssembler
Assembler
 
loaders-and-linkers.pdfhhhhhccftyghgfggy
loaders-and-linkers.pdfhhhhhccftyghgfggyloaders-and-linkers.pdfhhhhhccftyghgfggy
loaders-and-linkers.pdfhhhhhccftyghgfggy
 
loader.ppt
loader.pptloader.ppt
loader.ppt
 
Assembler
AssemblerAssembler
Assembler
 
Chp6 assembly language programming for pic copy
Chp6 assembly language programming for pic   copyChp6 assembly language programming for pic   copy
Chp6 assembly language programming for pic copy
 
EMBEDDED SYSTEMS 4&5
EMBEDDED SYSTEMS 4&5EMBEDDED SYSTEMS 4&5
EMBEDDED SYSTEMS 4&5
 
Introduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxIntroduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptx
 
12 mt06ped008
12 mt06ped008 12 mt06ped008
12 mt06ped008
 
System Software
System SoftwareSystem Software
System Software
 
Sp chap2
Sp chap2Sp chap2
Sp chap2
 
assembler_full_slides.ppt
assembler_full_slides.pptassembler_full_slides.ppt
assembler_full_slides.ppt
 
Lecture6
Lecture6Lecture6
Lecture6
 
11 chapter06 slc_int_float_mov_mvm_fa14
11 chapter06 slc_int_float_mov_mvm_fa1411 chapter06 slc_int_float_mov_mvm_fa14
11 chapter06 slc_int_float_mov_mvm_fa14
 
Instruction Set Architecture
Instruction Set ArchitectureInstruction Set Architecture
Instruction Set Architecture
 
Assembler - System Programming
Assembler - System ProgrammingAssembler - System Programming
Assembler - System Programming
 
Intel 8085 mp
Intel 8085 mpIntel 8085 mp
Intel 8085 mp
 
Hardware Description Beyond Register-Transfer Level (RTL) Languages
Hardware Description Beyond Register-Transfer Level (RTL) LanguagesHardware Description Beyond Register-Transfer Level (RTL) Languages
Hardware Description Beyond Register-Transfer Level (RTL) Languages
 
RISC-V Zce Extension
RISC-V Zce ExtensionRISC-V Zce Extension
RISC-V Zce Extension
 
Microprocessor File
Microprocessor FileMicroprocessor File
Microprocessor File
 

Recently uploaded

Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
Daiki Mogmet Ito
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Zilliz
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
Edge AI and Vision Alliance
 
20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website
Pixlogix Infotech
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Zilliz
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Speck&Tech
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 

Recently uploaded (20)

Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
 
20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 

Loader

  • 2. Role of Loader Source Program Translator Object Program Loader Object program ready for execution Memory Translator – Assembler/Compiler
  • 3. Role of Loader and Linker Source Program Assembler Object Program Linker Executable Code Loader Object program ready for execution Memory
  • 4.
  • 5.
  • 6. Algorithm for absolute loader:- Begin Read Header record Verify program name and length Read first text record While record type is not ‘E’ do begin if object code is in character form { convert into internal representation } read next object program record end Jump to the address specified in End Record end
  • 7. Role of Absolute Loader Object Program Absolute Loader Object program ready for execution Memory 1000 2000
  • 8. Object Program H COPY 001000 00107A T 001000 1E 141033 482039 001036 281030 301015 482061 ... T 00101E 15 0C1036 482061 081044 4C0000 454F46 000003 000000 T 002039 1E 041030 001030 E0205D 30203F D8205D 281030 … T 002057 1C 101036 4C0000 F1 001000 041030 E02079 302064 … T 002073 07 382064 4C0000 05 E 001000
  • 9.  
  • 10.
  • 12.
  • 13.
  • 14. After load the OS, the control is transferred to the instruction at address 80.
  • 15. Algorithm of bootstrap loader Begin X=0x80 (the address of the next memory location to be loaded) Loop A  GETC ( and convert it from the ASCII character code to the value of the hexadecimal digit ) save the value in the high-order 4 bits of S A  GETC combine the value to form one byte A  (A+S) store the value (in A) to the address in register X X  X+1 End
  • 16. GETC reads one character and convert it into hexadecimal digit. For example, the ASCII code for ‘1’ through ‘9’ are converted to the numeric values 1 through 9. and codes for ‘A’ through ‘F’ ( 41 to 46 Hex) are converted to the values 10 through 15. this is accomplished by subtracting 48 ( 30 in Hex) from the character codes of 0-9 and by subtracting 55 (37 in Hex) from the codes of A-F ASCII value of 0~9 : 0x30~39 A~F : 0x41~46
  • 17.
  • 18. Example of Relocation Line Loc Source statement Object code 5 0000 COPY START 0 10 0000 FIRST STL RETADR 17202D 12 0003 LDB #LENGTH 69202D 13 BASE LENGTH 15 0006 CLOOP +JSUB RDREC 4B101036 20 000A LDA LENGTH 032026 25 000D COMP #0 290000 30 0010 JEQ ENDFIL 332007 35 0013 +JSUB WRREC 4B10105D 40 0017 J CLOOP 3F2FEC 45 001A ENDFIL LDA EOF 032010 50 001D STA BUFFER 0F2016 55 0020 LDA #3 010003 60 0023 STA LENGTH 0F200D 65 0026 +JSUB WRREC 4B10105D 70 002A J @RETADR 3E2003 80 002D EOF BYTE C’EOF’ 454F46 95 0030 RETADR RESW 1 100 0033 LENGTH RESW 1 105 0036 BUFFER RESB 4096
  • 19. 125 1036 RDREC CLEAR X B410 130 132 133 135 140 145 150 155 160 165 170 175 180 185 210 105D WRREC CLEAR X B410 212 215 220 225 230 235 ...(omitted)
  • 20.
  • 21. Modification Record H  COPY  000000 001077 T  000000  1D  17202D  69202D  48101036  …  4B105D  3F2FEC  032010 T  00001D  13  0F2016  010003  0F200D  4B10105D  3E2003  454F46 T  001035  1D  B410  B400  B440  75101000  …  332008  57C003  B850 T  001053  1D  3B2FEA  134000  4F0000  F1  ..  53C003  DF2008  B850 T  00070  07  3B2FEF  4F0000  05 M  000007  05+COPY M  000014  05+COPY M  000027  05+COPY E  000000
  • 22. Begin Get PROGADDR from OS While not end of input do { read next record while record type != ‘E’ do { read next input record while record type = ‘ T ’ do { move object code from record to location ADDR + specified address } while record type = ‘ M ’ add PROGADDR at the location PROGADDR + specified address } } end Relocation Loader Algorithm
  • 23.
  • 24.
  • 25. Relocatable Program for SIC Line Loc Source statement Object code 5 0000 COPY START 0 10 0000 FIRST STL RETADR 140033 15 0003 CLOOP JSUB RDREC 481039 20 0006 LDA LENGTH 000036 25 0009 COMP ZERO 280030 30 000C JEQ ENDFIL 300015 35 000F JSUB WRREC 481061 40 0012 J CLOOP 3C0003 45 0015 ENDFIL LDA EOF 00002A 50 0018 STA BUFFER 0C0039 55 001B LDA THREE 00002D 60 001E STA LENGTH 0C0036 65 0021 JSUB WRREC 481061 70 0024 LDL RETADR 080033 75 0027 RSUB 4C0000 80 002A EOF BYTE C’EOF’ 454F46 85 002D THREE WORD 3 000003 90 0030 ZERO WORD 0 000000 95 0033 RETADR RESW 1 100 0036 LENGTH RESW 1 105 0039 BUFFER RESB 4096
  • 26. 125 1039 RDREC LDX ZERO 040030 130 103C LDA ZERO 000030 135 103F RLOOP TD INPUT E0105D 140 1042 JEQ RLOOP 30103D 145 1045 RD INPUT D8105D 150 1048 COMP ZERO 280030 155 104B JEQ EXIT 301057 160 104E STCH BUFFER,X 548039 165 1051 TIX MAXLEN 2C105E 170 1054 JLT RLOOP 38103F 175 1057 EXIT STX LENGTH 100036 180 105A RSUB 4C0000 185 105D INPUT BYTE X’F1’ F1 190 105E MAXLEN WORD 4096 001000 210 1061 WRREC LDX ZERO 040030 215 1064 WLOOP TD OUTPUT E01079 220 1067 JEQ WLOOP 301064 225 106A LDCH BUFFER,X 508039 230 106D WD OUTPUT DC1079 235 1070 TIX LENGTH 2C0036 240 1073 JLT WLOOP 381064 245 1076 RSUB 4C0000 250 1079 OUTPUT BYTE X’05’ 05 255 END FIRST
  • 27. Relocation by Bit Mask H COPY 000000 00107A T 000000 1E FFC 140033 481039 000036 280030 300015 481061 ... T 00001E 15 E00 0C0036 481061 080044 4C0000 454F46 000003 … T 001039 1E FFC 040030 000030 E0105D 30103F D8105D … T 001057 1C 800 100036 4C0000 F1 001000 T 001061 19 FE0 040030 E01079 301064 508039 DC1079 2C0036 … E 000000 Here the bit mask FFC (representing the bit string 111111111100) In the first text record specifies that all 10 words of object code are to be modified during relocation. Similarly bit mask E00 represents that the first 3 words are to be modified .
  • 28.
  • 29. Automatic library search :- This feature allows a programmer to use standard subroutines without explicitly including them in the program to be loaded. So programmer can use any subroutine by just mentioning their names. The subroutines are automatically fetched from the library, linked with the main program and loaded. Loader maintains an External Symbol Table ( ESTAB ) for these external symbols. The loader searches the library specified for routines that contain the definitions of these symbols, and process the subroutines found by this search. In most cases a special file structure is used for libraries. This structure contains a directory that gives the name of each routine and a pointer to its address within the file. Pointer Name
  • 30.
  • 31.
  • 32. Line Loc Source statement Object code 5 0000 COPY START 0 10 12 13 15 0006 CLOOP +JSUB RDREC 4B10 1036 30 35 0013 +JSUB WRREC 4B10 105D 40 65 0026 +JSUB WRREC 4B10 105D 70 105 125 1036 RDREC CLEAR X B410 130 180 185 210 105D WRREC CLEAR X B410 212 230 235 ...(omitted) Example of Relocation INCLUDE READ(ULIB) INCLUDE WRITE(ULIB) DELETE RDREC,WRREC CHANGE RDREC, READ CHANGE WRREC, WRITE
  • 33. These command would direct the loader to include control sections READ & WRITE from the library ULIB, and to delete the control sections RDREC and WRREC from the load. The first CHANGE command would cause all external references to symbol RDREC to be changed to refer to symbol.