SlideShare a Scribd company logo
1 of 7
1 | P a g e
COMPUTER ARCHITECTURE ANDASSEMBLYLANGUAGE
COURSE
BOOTABLE
OPERATING SYSTEM
INSTRUCTOR :
SIR AAZAM KHAN
MADE BY :
SHAHZEBPIRZADA
M. FAIZ
2 | P a g e
3 | P a g e
BOOT DISK
A boot disk is actually not a computer disk in the shape of a boot. If it was, most disk drives
would have a difficult time reading it. Instead, a boot disk is a disk that a computer can start up
or "boot" from. The most common type of boot disk is an internal hard drive, which most
computers use to start up from. The operating system installed on the hard drive is loaded
during the boot process.
However, most computers allow you to boot from other disks, including external Firewire hard
drives, CD-ROMs, DVD-ROMs, and floppy disks. In order to function as boot disks, these disks
need to have an operating system installed that is understandable by the computer. This can
either be a full-blown operating system like Windows or Mac OS X, or a small utility operating
system, such as Norton Utilities or Disk Warrior.
CD and DVD boot disks are often used to start up a computer when the operating system on
the internal hard drive won't load. This can happen when bad data blocks or other errors occur
on the disk. By running a disk repair utility from the CD or DVD, you can often fix the hard drive
and restart from it, using the full operating system.
What is Boot Loader
Boot loader is a program situated at the first sector of the hard drive; and it is the sector where
the boot starts from. BIOS automatically read all content of the first sector to the memory just
after the power is turned on, and jump to it. The first sector is also called Master Boot
Record. Actually it is not obligatory for the first sector of the hard drive to boot something. This
name has been formed historically because developers used to boot their operating systems
with such mechanism.
How system boots
In order to solve our task we should recall how the system is booting.
Let’s consider briefly how the system components are interacting when the system is
booting (see Fig.1).
4 | P a g e
After the control has been passed to the address 0000:7C00, Master Boot Record (MBR) starts
its work and triggers the Operating System boot.
Let’s code
In the next sections we will be directly occupied with the low-level programming – we will
develop our own boot loader.
5 | P a g e
Source code of Boot Loader
 [BITS 16] ; 16 bit code generation
 [ORG 0x7C00] ; Origin location

 ; Main program
 Main: ; Label for the start of the main program

 Mov ax, 0x0000 ; Setup the Data Segment register
 ; Location of data is DS: Offset
 Mov ds, ax ; This cannot be loaded directly it has to be in two steps.
 ; 'mov ds, 0x0000' will NOT work due to limitations on the CPU

 Mov si, HelloWorld ; Load the string into position for the procedure.
 Call PutStr ; Call/start the procedure

 Jmp $ ; Never ending loop
 ; Procedures
 PutStr: ; Procedure label/start
 ; Set up the registers for the interrupt call
 Mov ah,0x0E ; The function to display a chacter (teletype)
 Mov bh,0x00 ; Page number
 Mov bl,0x07; Normal text attribute

 .nextchar ; Internal label (needed to loop round for the next character)
 Lodsb ; I think of this as Load String Block
 ; (Not sure if that's the real meaning though)
 ; Loads [SI] into AL and increases SI by one
 ; Check for end of string '0'
 or al,al ; Sets the zero flag if al = 0
 ; (OR outputs 0's where there is a zero bit in the register)
 jz .return ; If the zero flag has been set go to the end of the procedure.
 ; Zero flag gets set when an instruction returns 0 as the answer.
 int 0x10 ; Run the BIOS video interrupt
 jmp .nextchar ; Loop back round tothe top
 .return ; Label at the end to jump to when complete
 Ret ; Return to main program
 ; Data

 HelloWorld db 'C:Windows',13,10,0

 ; End Matter
6 | P a g e
 times 510-($-$$) db 0 ; Fill the rest with zeros
 dw 0xAA55The Boot Loader that we have made Assembly Is totally depend on the
above Piece of code

 nasm -f bin -o floppy.img new.asm
The followingBOOTLOADER we used to create a File:
NASM: The Netwide Assembler (NASM) is an assembler and disassembles for the Intel x86
architecture. It can be used to write 16-bit, 32-bit (IA-32) and 64-bit (x86-64) programs. NASM
is considered to be one of the most popular assemblers for Linux and is the second most
popular assembler overall.
7 | P a g e
Oracle VM VirtualBox

More Related Content

What's hot

What's hot (18)

Raspberry Pi 101
Raspberry Pi 101Raspberry Pi 101
Raspberry Pi 101
 
Fedora Linux
Fedora LinuxFedora Linux
Fedora Linux
 
Comp 129 final exam 100% correct answers
Comp 129 final exam 100% correct answersComp 129 final exam 100% correct answers
Comp 129 final exam 100% correct answers
 
System administration
System administrationSystem administration
System administration
 
Page reclaim
Page reclaimPage reclaim
Page reclaim
 
Run wordcount job (hadoop)
Run wordcount job (hadoop)Run wordcount job (hadoop)
Run wordcount job (hadoop)
 
Logical volume manager xfs
Logical volume manager xfsLogical volume manager xfs
Logical volume manager xfs
 
3 05-2018-install slackwarelinux
3 05-2018-install slackwarelinux3 05-2018-install slackwarelinux
3 05-2018-install slackwarelinux
 
PostgreSQL + ZFS best practices
PostgreSQL + ZFS best practicesPostgreSQL + ZFS best practices
PostgreSQL + ZFS best practices
 
Flourish16
Flourish16Flourish16
Flourish16
 
Dos command for hackers
Dos command for hackersDos command for hackers
Dos command for hackers
 
Windows xp™
Windows xp™Windows xp™
Windows xp™
 
Tlf2014
Tlf2014Tlf2014
Tlf2014
 
Scale2014
Scale2014Scale2014
Scale2014
 
Dos lesson 11
Dos lesson 11Dos lesson 11
Dos lesson 11
 
6 stages of linux boot process
6 stages of linux boot process6 stages of linux boot process
6 stages of linux boot process
 
Lavigne sept11 bsdmag
Lavigne sept11 bsdmagLavigne sept11 bsdmag
Lavigne sept11 bsdmag
 
An example Hadoop Install
An example Hadoop InstallAn example Hadoop Install
An example Hadoop Install
 

Viewers also liked

Ireana del pilar lópez marure 40%
Ireana del pilar lópez marure 40%Ireana del pilar lópez marure 40%
Ireana del pilar lópez marure 40%Jesus Jbjkjjkbjk
 
meos_q117_brochure
meos_q117_brochuremeos_q117_brochure
meos_q117_brochureAnna Argyle
 
Future Cisco + Ericsson Internet of Things (IoT) Networks Insights from Patents
Future Cisco + Ericsson Internet of Things (IoT) Networks Insights from PatentsFuture Cisco + Ericsson Internet of Things (IoT) Networks Insights from Patents
Future Cisco + Ericsson Internet of Things (IoT) Networks Insights from PatentsAlex G. Lee, Ph.D. Esq. CLP
 
User Experience Design [UXD]
User Experience Design [UXD]User Experience Design [UXD]
User Experience Design [UXD]Divya Bhatia
 
Arquitectos famosos
Arquitectos famososArquitectos famosos
Arquitectos famosos21 96
 
Los conquistadores del espacio
Los conquistadores del espacioLos conquistadores del espacio
Los conquistadores del espacioJesus Jbjkjjkbjk
 

Viewers also liked (11)

Ireana del pilar lópez marure 40%
Ireana del pilar lópez marure 40%Ireana del pilar lópez marure 40%
Ireana del pilar lópez marure 40%
 
Ficha de Lume
Ficha de LumeFicha de Lume
Ficha de Lume
 
Unit4
Unit4Unit4
Unit4
 
캐피탈 일문
캐피탈 일문캐피탈 일문
캐피탈 일문
 
meos_q117_brochure
meos_q117_brochuremeos_q117_brochure
meos_q117_brochure
 
Future Cisco + Ericsson Internet of Things (IoT) Networks Insights from Patents
Future Cisco + Ericsson Internet of Things (IoT) Networks Insights from PatentsFuture Cisco + Ericsson Internet of Things (IoT) Networks Insights from Patents
Future Cisco + Ericsson Internet of Things (IoT) Networks Insights from Patents
 
resume2015pt10
resume2015pt10resume2015pt10
resume2015pt10
 
User Experience Design [UXD]
User Experience Design [UXD]User Experience Design [UXD]
User Experience Design [UXD]
 
Arquitectos famosos
Arquitectos famososArquitectos famosos
Arquitectos famosos
 
Los conquistadores del espacio
Los conquistadores del espacioLos conquistadores del espacio
Los conquistadores del espacio
 
Pro bro presentation
Pro bro presentationPro bro presentation
Pro bro presentation
 

Similar to BOOTABLE OPERATING SYSTEM

BOOTABLE OPERATING SYSTEM PPT
BOOTABLE OPERATING SYSTEM PPTBOOTABLE OPERATING SYSTEM PPT
BOOTABLE OPERATING SYSTEM PPTShahzeb Pirzada
 
IRJET- Orchestration of Operating System Start-Up
IRJET- Orchestration of Operating System Start-UpIRJET- Orchestration of Operating System Start-Up
IRJET- Orchestration of Operating System Start-UpIRJET Journal
 
Bootstrap process of u boot (NDS32 RISC CPU)
Bootstrap process of u boot (NDS32 RISC CPU)Bootstrap process of u boot (NDS32 RISC CPU)
Bootstrap process of u boot (NDS32 RISC CPU)Macpaul Lin
 
An Insight into the Linux Booting Process
An Insight into the Linux Booting ProcessAn Insight into the Linux Booting Process
An Insight into the Linux Booting ProcessHardeep Bhurji
 
3996234.ppt
3996234.ppt3996234.ppt
3996234.pptKdpKumar
 
Bootstrap process boot loader
Bootstrap process boot loaderBootstrap process boot loader
Bootstrap process boot loaderidrajeev
 
Welcome to pc hardware
Welcome to pc hardwareWelcome to pc hardware
Welcome to pc hardwarejaydeepdwivedi
 
Linux: the first second
Linux: the first secondLinux: the first second
Linux: the first secondAlison Chaiken
 
Armboot process zeelogic
Armboot process zeelogicArmboot process zeelogic
Armboot process zeelogicAleem Shariff
 
Prepare Installer Week 1.pdf
Prepare Installer Week 1.pdfPrepare Installer Week 1.pdf
Prepare Installer Week 1.pdfemersonrebibis1
 
Bootloaders (U-Boot)
Bootloaders (U-Boot) Bootloaders (U-Boot)
Bootloaders (U-Boot) Omkar Rane
 
Booting how boot to the system and details
Booting how boot to the system and detailsBooting how boot to the system and details
Booting how boot to the system and detailsMadniFareed1
 
Когда предрелизный не только софт
Когда предрелизный не только софтКогда предрелизный не только софт
Когда предрелизный не только софтCEE-SEC(R)
 

Similar to BOOTABLE OPERATING SYSTEM (20)

BOOTABLE OPERATING SYSTEM PPT
BOOTABLE OPERATING SYSTEM PPTBOOTABLE OPERATING SYSTEM PPT
BOOTABLE OPERATING SYSTEM PPT
 
IRJET- Orchestration of Operating System Start-Up
IRJET- Orchestration of Operating System Start-UpIRJET- Orchestration of Operating System Start-Up
IRJET- Orchestration of Operating System Start-Up
 
Bootstrap process of u boot (NDS32 RISC CPU)
Bootstrap process of u boot (NDS32 RISC CPU)Bootstrap process of u boot (NDS32 RISC CPU)
Bootstrap process of u boot (NDS32 RISC CPU)
 
Booting
BootingBooting
Booting
 
An Insight into the Linux Booting Process
An Insight into the Linux Booting ProcessAn Insight into the Linux Booting Process
An Insight into the Linux Booting Process
 
bios.docx
bios.docxbios.docx
bios.docx
 
Booting
BootingBooting
Booting
 
3996234.ppt
3996234.ppt3996234.ppt
3996234.ppt
 
Bootstrap process boot loader
Bootstrap process boot loaderBootstrap process boot loader
Bootstrap process boot loader
 
Welcome to pc hardware
Welcome to pc hardwareWelcome to pc hardware
Welcome to pc hardware
 
Linux: the first second
Linux: the first secondLinux: the first second
Linux: the first second
 
Armboot process zeelogic
Armboot process zeelogicArmboot process zeelogic
Armboot process zeelogic
 
Computer basics
Computer basicsComputer basics
Computer basics
 
Prepare Installer Week 1.pdf
Prepare Installer Week 1.pdfPrepare Installer Week 1.pdf
Prepare Installer Week 1.pdf
 
Bootloaders (U-Boot)
Bootloaders (U-Boot) Bootloaders (U-Boot)
Bootloaders (U-Boot)
 
Linux Booting Process
Linux Booting ProcessLinux Booting Process
Linux Booting Process
 
Booting how boot to the system and details
Booting how boot to the system and detailsBooting how boot to the system and details
Booting how boot to the system and details
 
101 1.2 boot the system
101 1.2 boot the system101 1.2 boot the system
101 1.2 boot the system
 
boot from lan
boot from lanboot from lan
boot from lan
 
Когда предрелизный не только софт
Когда предрелизный не только софтКогда предрелизный не только софт
Когда предрелизный не только софт
 

More from Shahzeb Pirzada

Sigma Society Inauguration
Sigma Society Inauguration Sigma Society Inauguration
Sigma Society Inauguration Shahzeb Pirzada
 
Newton's Ninja - Combat'13
Newton's Ninja - Combat'13Newton's Ninja - Combat'13
Newton's Ninja - Combat'13Shahzeb Pirzada
 
The Open Systems Interconnect (OSI) Model - IS AUDIT
The Open Systems Interconnect (OSI) Model - IS AUDITThe Open Systems Interconnect (OSI) Model - IS AUDIT
The Open Systems Interconnect (OSI) Model - IS AUDITShahzeb Pirzada
 
Process Improvement Techniques - IS AUDIT
Process Improvement Techniques - IS AUDITProcess Improvement Techniques - IS AUDIT
Process Improvement Techniques - IS AUDITShahzeb Pirzada
 
Project Management Certifications - IS AUDIT
Project Management Certifications - IS AUDITProject Management Certifications - IS AUDIT
Project Management Certifications - IS AUDITShahzeb Pirzada
 
Computer Assisted Audit Techniques (CAATS) - IS AUDIT
Computer Assisted Audit Techniques (CAATS) - IS AUDITComputer Assisted Audit Techniques (CAATS) - IS AUDIT
Computer Assisted Audit Techniques (CAATS) - IS AUDITShahzeb Pirzada
 
Certifications on Security - IS AUDIT
Certifications on Security - IS AUDITCertifications on Security - IS AUDIT
Certifications on Security - IS AUDITShahzeb Pirzada
 
Google Advance Searching- Information System Audit & Control Report
Google Advance Searching- Information System Audit & Control ReportGoogle Advance Searching- Information System Audit & Control Report
Google Advance Searching- Information System Audit & Control ReportShahzeb Pirzada
 
Prolog Code [Family Tree] by Shahzeb Pirzada
Prolog Code [Family Tree] by Shahzeb PirzadaProlog Code [Family Tree] by Shahzeb Pirzada
Prolog Code [Family Tree] by Shahzeb PirzadaShahzeb Pirzada
 
Elements of Quality Management System
Elements of Quality Management SystemElements of Quality Management System
Elements of Quality Management SystemShahzeb Pirzada
 
City School Network- Routing & Switching Final Report
City School Network- Routing & Switching Final ReportCity School Network- Routing & Switching Final Report
City School Network- Routing & Switching Final ReportShahzeb Pirzada
 
THE SEVEN HABITS OF HIGHLY EFFECTIVE TEENS
THE SEVEN HABITS OF HIGHLY EFFECTIVE TEENSTHE SEVEN HABITS OF HIGHLY EFFECTIVE TEENS
THE SEVEN HABITS OF HIGHLY EFFECTIVE TEENSShahzeb Pirzada
 
Entrepreneurial Leadership-FINAL REPORT
Entrepreneurial Leadership-FINAL REPORTEntrepreneurial Leadership-FINAL REPORT
Entrepreneurial Leadership-FINAL REPORTShahzeb Pirzada
 
SP STUDENT MANAGEMENT SYSTEM-Human Computer Interaction Final Report
SP STUDENT MANAGEMENT SYSTEM-Human Computer Interaction Final ReportSP STUDENT MANAGEMENT SYSTEM-Human Computer Interaction Final Report
SP STUDENT MANAGEMENT SYSTEM-Human Computer Interaction Final ReportShahzeb Pirzada
 
White collar vs Blue collar
White collar vs Blue collarWhite collar vs Blue collar
White collar vs Blue collarShahzeb Pirzada
 
Story Narration Competition -Script
Story Narration Competition -Script Story Narration Competition -Script
Story Narration Competition -Script Shahzeb Pirzada
 
Declamation Contest Script for Moc
Declamation Contest Script for MocDeclamation Contest Script for Moc
Declamation Contest Script for MocShahzeb Pirzada
 

More from Shahzeb Pirzada (20)

Sigma Society Inauguration
Sigma Society Inauguration Sigma Society Inauguration
Sigma Society Inauguration
 
Newton's Ninja - Combat'13
Newton's Ninja - Combat'13Newton's Ninja - Combat'13
Newton's Ninja - Combat'13
 
The Open Systems Interconnect (OSI) Model - IS AUDIT
The Open Systems Interconnect (OSI) Model - IS AUDITThe Open Systems Interconnect (OSI) Model - IS AUDIT
The Open Systems Interconnect (OSI) Model - IS AUDIT
 
RAID - IS AUDIT
RAID - IS AUDITRAID - IS AUDIT
RAID - IS AUDIT
 
Process Improvement Techniques - IS AUDIT
Process Improvement Techniques - IS AUDITProcess Improvement Techniques - IS AUDIT
Process Improvement Techniques - IS AUDIT
 
Project Management Certifications - IS AUDIT
Project Management Certifications - IS AUDITProject Management Certifications - IS AUDIT
Project Management Certifications - IS AUDIT
 
Computer Assisted Audit Techniques (CAATS) - IS AUDIT
Computer Assisted Audit Techniques (CAATS) - IS AUDITComputer Assisted Audit Techniques (CAATS) - IS AUDIT
Computer Assisted Audit Techniques (CAATS) - IS AUDIT
 
Certifications on Security - IS AUDIT
Certifications on Security - IS AUDITCertifications on Security - IS AUDIT
Certifications on Security - IS AUDIT
 
Google Advance Searching- Information System Audit & Control Report
Google Advance Searching- Information System Audit & Control ReportGoogle Advance Searching- Information System Audit & Control Report
Google Advance Searching- Information System Audit & Control Report
 
Prolog Code [Family Tree] by Shahzeb Pirzada
Prolog Code [Family Tree] by Shahzeb PirzadaProlog Code [Family Tree] by Shahzeb Pirzada
Prolog Code [Family Tree] by Shahzeb Pirzada
 
What is Fuzzy Logic?
What is Fuzzy Logic?What is Fuzzy Logic?
What is Fuzzy Logic?
 
Elements of Quality Management System
Elements of Quality Management SystemElements of Quality Management System
Elements of Quality Management System
 
City School Network- Routing & Switching Final Report
City School Network- Routing & Switching Final ReportCity School Network- Routing & Switching Final Report
City School Network- Routing & Switching Final Report
 
THE SEVEN HABITS OF HIGHLY EFFECTIVE TEENS
THE SEVEN HABITS OF HIGHLY EFFECTIVE TEENSTHE SEVEN HABITS OF HIGHLY EFFECTIVE TEENS
THE SEVEN HABITS OF HIGHLY EFFECTIVE TEENS
 
Entrepreneurial Leadership-FINAL REPORT
Entrepreneurial Leadership-FINAL REPORTEntrepreneurial Leadership-FINAL REPORT
Entrepreneurial Leadership-FINAL REPORT
 
SP STUDENT MANAGEMENT SYSTEM-Human Computer Interaction Final Report
SP STUDENT MANAGEMENT SYSTEM-Human Computer Interaction Final ReportSP STUDENT MANAGEMENT SYSTEM-Human Computer Interaction Final Report
SP STUDENT MANAGEMENT SYSTEM-Human Computer Interaction Final Report
 
White collar vs Blue collar
White collar vs Blue collarWhite collar vs Blue collar
White collar vs Blue collar
 
Story Narration Competition -Script
Story Narration Competition -Script Story Narration Competition -Script
Story Narration Competition -Script
 
Declamation Contest Script for Moc
Declamation Contest Script for MocDeclamation Contest Script for Moc
Declamation Contest Script for Moc
 
Water Supply System
Water Supply SystemWater Supply System
Water Supply System
 

Recently uploaded

Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Natan Silnitsky
 
Best Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdfBest Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdfIdiosysTechnologies1
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....kzayra69
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationBradBedford3
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfStefano Stabellini
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentationvaddepallysandeep122
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 

Recently uploaded (20)

Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
 
Best Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdfBest Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdf
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 
2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion Application
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdf
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentation
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 

BOOTABLE OPERATING SYSTEM

  • 1. 1 | P a g e COMPUTER ARCHITECTURE ANDASSEMBLYLANGUAGE COURSE BOOTABLE OPERATING SYSTEM INSTRUCTOR : SIR AAZAM KHAN MADE BY : SHAHZEBPIRZADA M. FAIZ
  • 2. 2 | P a g e
  • 3. 3 | P a g e BOOT DISK A boot disk is actually not a computer disk in the shape of a boot. If it was, most disk drives would have a difficult time reading it. Instead, a boot disk is a disk that a computer can start up or "boot" from. The most common type of boot disk is an internal hard drive, which most computers use to start up from. The operating system installed on the hard drive is loaded during the boot process. However, most computers allow you to boot from other disks, including external Firewire hard drives, CD-ROMs, DVD-ROMs, and floppy disks. In order to function as boot disks, these disks need to have an operating system installed that is understandable by the computer. This can either be a full-blown operating system like Windows or Mac OS X, or a small utility operating system, such as Norton Utilities or Disk Warrior. CD and DVD boot disks are often used to start up a computer when the operating system on the internal hard drive won't load. This can happen when bad data blocks or other errors occur on the disk. By running a disk repair utility from the CD or DVD, you can often fix the hard drive and restart from it, using the full operating system. What is Boot Loader Boot loader is a program situated at the first sector of the hard drive; and it is the sector where the boot starts from. BIOS automatically read all content of the first sector to the memory just after the power is turned on, and jump to it. The first sector is also called Master Boot Record. Actually it is not obligatory for the first sector of the hard drive to boot something. This name has been formed historically because developers used to boot their operating systems with such mechanism. How system boots In order to solve our task we should recall how the system is booting. Let’s consider briefly how the system components are interacting when the system is booting (see Fig.1).
  • 4. 4 | P a g e After the control has been passed to the address 0000:7C00, Master Boot Record (MBR) starts its work and triggers the Operating System boot. Let’s code In the next sections we will be directly occupied with the low-level programming – we will develop our own boot loader.
  • 5. 5 | P a g e Source code of Boot Loader  [BITS 16] ; 16 bit code generation  [ORG 0x7C00] ; Origin location   ; Main program  Main: ; Label for the start of the main program   Mov ax, 0x0000 ; Setup the Data Segment register  ; Location of data is DS: Offset  Mov ds, ax ; This cannot be loaded directly it has to be in two steps.  ; 'mov ds, 0x0000' will NOT work due to limitations on the CPU   Mov si, HelloWorld ; Load the string into position for the procedure.  Call PutStr ; Call/start the procedure   Jmp $ ; Never ending loop  ; Procedures  PutStr: ; Procedure label/start  ; Set up the registers for the interrupt call  Mov ah,0x0E ; The function to display a chacter (teletype)  Mov bh,0x00 ; Page number  Mov bl,0x07; Normal text attribute   .nextchar ; Internal label (needed to loop round for the next character)  Lodsb ; I think of this as Load String Block  ; (Not sure if that's the real meaning though)  ; Loads [SI] into AL and increases SI by one  ; Check for end of string '0'  or al,al ; Sets the zero flag if al = 0  ; (OR outputs 0's where there is a zero bit in the register)  jz .return ; If the zero flag has been set go to the end of the procedure.  ; Zero flag gets set when an instruction returns 0 as the answer.  int 0x10 ; Run the BIOS video interrupt  jmp .nextchar ; Loop back round tothe top  .return ; Label at the end to jump to when complete  Ret ; Return to main program  ; Data   HelloWorld db 'C:Windows',13,10,0   ; End Matter
  • 6. 6 | P a g e  times 510-($-$$) db 0 ; Fill the rest with zeros  dw 0xAA55The Boot Loader that we have made Assembly Is totally depend on the above Piece of code   nasm -f bin -o floppy.img new.asm The followingBOOTLOADER we used to create a File: NASM: The Netwide Assembler (NASM) is an assembler and disassembles for the Intel x86 architecture. It can be used to write 16-bit, 32-bit (IA-32) and 64-bit (x86-64) programs. NASM is considered to be one of the most popular assemblers for Linux and is the second most popular assembler overall.
  • 7. 7 | P a g e Oracle VM VirtualBox