SlideShare a Scribd company logo
Presentation
(Assembly Language Programming)
Topic:
Disk I/O
Presented To:
Mam. Shaziya Saqib
Presented By:
Section-B
(4rth Semester)
Department of Computer Science
Lahore Garrison University
(Walton Campus)
Introduction to Disk I/O
Types of Storage
I. Hard Disk
II.Floppy Disk
III.There Models (Given on next slides)
IV.Working Area
Models of Floppy and Hard Disks
DD Disk holds 720k of data & HD Disk holds 2.0 MB of data.
Working of Floppy Disk ( 5 ¼ In)
Working of Floppy Disk (3 ¼ In)
Working of Hard Disk (General)
One cylinder: the same track on the top and bottom of a platter.
Disk Access
• The method of accessing information for both
Floppy and Hard Disk is similar.
• This is done with the help of moving heads on
the disk plates.
The File Directory
• DOS creates a 32-bit directory for each file. The format of an entry
is as follows:
• Byte 11 is the attribute file. Each bit specifies a file attribute.
(Fig:19.4 , Given on the next slide)
 Hidden files ( bit 1)  DIR
 Archive bit ( bit 5)  BACKUP
Attribute File
Clusters
• DOS sets aside space for files in clusters.
• Clusters always start with ‘0’ .
• Number of sectors in a cluster in n^2.
(Here ‘n’ is cluster number)
• Byte 26-27 in directory bits (starting positions
of clusters).
• Cluster Size (1024 bytes for 5 ¼ in for DD Disk)
The FAT
(File Allocation Table)
FAT  provides map for file storage.
FAT  entries are 12-bit long.
(for Floppy Disks & 10 MB Hard Disk)
FAT  for higher Hard Disks it is 16-bit size.
File Processing
• The group of INT 21h Functions are called File
Handle Functions.
• This basically involves following functions:
I. Reading
II.Writing
III.Re-writing
What is File Handle ?
• When a file opened or created in a program, DOS
assigns it a unique number called “File Handle”.
• Five Built-In File Handles:
I. Keyboard
II.Screen
III.Error output-screen
IV.Auxiliary device (A Piece of equipment that connect to your
computer)
V.Printer
NOTE: Three additional file handles are also present.
File Errors
• If error is occurs then CF=1, and code no
appear in AX.
Opening a File
Opening a File(Example)
• Write instructions to open a new read_only
file called FILE1.
Open an Existing File
• To open an existing file, there is an another
function:
Closing a File
• After a file has been processed, it should be
closed.
Reading a file
• The following function reads a specified
number of bytes from a file and stores them in
memory.
Reading a file(Example)
• Write some code to read a 512-byte sector
from a file.
Writing a File
• Function 40h writes a specified number of
bytes to a file or device.
Writing a File(Example)
• Use function 40h to display a message on the
screen.
File Pointer
File Pointer(Example)
Summary
• Today we discuss about:
Internal structure & working of both Floppy &
Hard Disk.
The File Directory.
Cluster & FAT
Disk File Functions
1) 3Ch 2) 3Dh 3) 3Eh
4) 3Fh 5) 40h 6) 42h
Any Question ???

More Related Content

What's hot

Examining Mac File Structures
Examining Mac File StructuresExamining Mac File Structures
Examining Mac File Structuresprimeteacher32
 
Ntfs and computer forensics
Ntfs and computer forensicsNtfs and computer forensics
Ntfs and computer forensicsGaurav Ragtah
 
Op Sy 03 Ch 41
Op Sy 03 Ch 41Op Sy 03 Ch 41
Op Sy 03 Ch 41 Google
 
2nd unit part 1
2nd unit  part 12nd unit  part 1
2nd unit part 1Pavan Illa
 
Difference between ntfs and fat32
Difference between ntfs and fat32Difference between ntfs and fat32
Difference between ntfs and fat32proser tech
 
File Handling
File HandlingFile Handling
File HandlingWaqar Ali
 
File Management
File ManagementFile Management
File Managementspickul
 
File protection.59 to 60
File protection.59 to 60File protection.59 to 60
File protection.59 to 60myrajendra
 
file system in operating system
file system in operating systemfile system in operating system
file system in operating systemtittuajay
 
ITFT_File system interface in Operating System
ITFT_File system interface in Operating SystemITFT_File system interface in Operating System
ITFT_File system interface in Operating SystemSneh Prabha
 
File implementation
File implementationFile implementation
File implementationMohd Arif
 

What's hot (20)

Examining Mac File Structures
Examining Mac File StructuresExamining Mac File Structures
Examining Mac File Structures
 
Ntfs and computer forensics
Ntfs and computer forensicsNtfs and computer forensics
Ntfs and computer forensics
 
FAT vs NTFS
FAT vs NTFSFAT vs NTFS
FAT vs NTFS
 
Op Sy 03 Ch 41
Op Sy 03 Ch 41Op Sy 03 Ch 41
Op Sy 03 Ch 41
 
Systems Programming - File IO
Systems Programming - File IOSystems Programming - File IO
Systems Programming - File IO
 
C# Drive info class
C# Drive info classC# Drive info class
C# Drive info class
 
File handling
File handlingFile handling
File handling
 
2nd unit part 1
2nd unit  part 12nd unit  part 1
2nd unit part 1
 
Difference between ntfs and fat32
Difference between ntfs and fat32Difference between ntfs and fat32
Difference between ntfs and fat32
 
File Handling
File HandlingFile Handling
File Handling
 
File Management
File ManagementFile Management
File Management
 
NTFS vs FAT
NTFS vs FATNTFS vs FAT
NTFS vs FAT
 
File protection.59 to 60
File protection.59 to 60File protection.59 to 60
File protection.59 to 60
 
File system
File systemFile system
File system
 
File system
File systemFile system
File system
 
file system in operating system
file system in operating systemfile system in operating system
file system in operating system
 
Ntfs forensics
Ntfs forensicsNtfs forensics
Ntfs forensics
 
ITFT_File system interface in Operating System
ITFT_File system interface in Operating SystemITFT_File system interface in Operating System
ITFT_File system interface in Operating System
 
Files
FilesFiles
Files
 
File implementation
File implementationFile implementation
File implementation
 

Similar to Assembly Language Programming Basics

There are 4 part for the project and the question may be long to rea.docx
There are 4 part for the project and the question may be long to rea.docxThere are 4 part for the project and the question may be long to rea.docx
There are 4 part for the project and the question may be long to rea.docxsusannr
 
There are 4 parts for the project. The question may be long to r.docx
There are 4 parts for the project. The question may be long to r.docxThere are 4 parts for the project. The question may be long to r.docx
There are 4 parts for the project. The question may be long to r.docxsusannr
 
There are 4 parts for the project. The question may be long to read .docx
There are 4 parts for the project. The question may be long to read .docxThere are 4 parts for the project. The question may be long to read .docx
There are 4 parts for the project. The question may be long to read .docxsusannr
 
File Management and manipulation in C++ Programming
File Management and manipulation in C++ ProgrammingFile Management and manipulation in C++ Programming
File Management and manipulation in C++ ProgrammingChereLemma2
 
Linux System Programming - File I/O
Linux System Programming - File I/O Linux System Programming - File I/O
Linux System Programming - File I/O YourHelper1
 
Internal representation of file chapter 4 Sowmya Jyothi
Internal representation of file chapter 4 Sowmya JyothiInternal representation of file chapter 4 Sowmya Jyothi
Internal representation of file chapter 4 Sowmya JyothiSowmya Jyothi
 
File handling.pptx
File handling.pptxFile handling.pptx
File handling.pptxVishuSaini22
 
Microsoft power point chapter 5 file edited
Microsoft power point   chapter 5 file editedMicrosoft power point   chapter 5 file edited
Microsoft power point chapter 5 file editedLinga Lgs
 
Computer Software - Lecture D
Computer Software - Lecture DComputer Software - Lecture D
Computer Software - Lecture DCMDLearning
 
Computer Software | Lecture 4D
Computer Software | Lecture 4DComputer Software | Lecture 4D
Computer Software | Lecture 4DCMDLMS
 
20180324 leveraging unix tools
20180324 leveraging unix tools20180324 leveraging unix tools
20180324 leveraging unix toolsDavid Horvath
 
Report blocking ,management of files in secondry memory , static vs dynamic a...
Report blocking ,management of files in secondry memory , static vs dynamic a...Report blocking ,management of files in secondry memory , static vs dynamic a...
Report blocking ,management of files in secondry memory , static vs dynamic a...NoorMustafaSoomro
 
Virtual instrumentation
Virtual instrumentationVirtual instrumentation
Virtual instrumentationMustapha Umar
 

Similar to Assembly Language Programming Basics (20)

There are 4 part for the project and the question may be long to rea.docx
There are 4 part for the project and the question may be long to rea.docxThere are 4 part for the project and the question may be long to rea.docx
There are 4 part for the project and the question may be long to rea.docx
 
There are 4 parts for the project. The question may be long to r.docx
There are 4 parts for the project. The question may be long to r.docxThere are 4 parts for the project. The question may be long to r.docx
There are 4 parts for the project. The question may be long to r.docx
 
There are 4 parts for the project. The question may be long to read .docx
There are 4 parts for the project. The question may be long to read .docxThere are 4 parts for the project. The question may be long to read .docx
There are 4 parts for the project. The question may be long to read .docx
 
File Management and manipulation in C++ Programming
File Management and manipulation in C++ ProgrammingFile Management and manipulation in C++ Programming
File Management and manipulation in C++ Programming
 
ch09.ppt
ch09.pptch09.ppt
ch09.ppt
 
Linux System Programming - File I/O
Linux System Programming - File I/O Linux System Programming - File I/O
Linux System Programming - File I/O
 
Internal representation of file chapter 4 Sowmya Jyothi
Internal representation of file chapter 4 Sowmya JyothiInternal representation of file chapter 4 Sowmya Jyothi
Internal representation of file chapter 4 Sowmya Jyothi
 
Python file handling
Python file handlingPython file handling
Python file handling
 
Chapter 04
Chapter 04Chapter 04
Chapter 04
 
File handling.pptx
File handling.pptxFile handling.pptx
File handling.pptx
 
Microsoft power point chapter 5 file edited
Microsoft power point   chapter 5 file editedMicrosoft power point   chapter 5 file edited
Microsoft power point chapter 5 file edited
 
INT 1010 04-5.pdf
INT 1010 04-5.pdfINT 1010 04-5.pdf
INT 1010 04-5.pdf
 
Computer Software - Lecture D
Computer Software - Lecture DComputer Software - Lecture D
Computer Software - Lecture D
 
Computer Software | Lecture 4D
Computer Software | Lecture 4DComputer Software | Lecture 4D
Computer Software | Lecture 4D
 
File and fat
File and fatFile and fat
File and fat
 
File and fat 2
File and fat 2File and fat 2
File and fat 2
 
20180324 leveraging unix tools
20180324 leveraging unix tools20180324 leveraging unix tools
20180324 leveraging unix tools
 
Report blocking ,management of files in secondry memory , static vs dynamic a...
Report blocking ,management of files in secondry memory , static vs dynamic a...Report blocking ,management of files in secondry memory , static vs dynamic a...
Report blocking ,management of files in secondry memory , static vs dynamic a...
 
Virtual instrumentation
Virtual instrumentationVirtual instrumentation
Virtual instrumentation
 
Introduction to UNIX
Introduction to UNIXIntroduction to UNIX
Introduction to UNIX
 

More from Malik Ghulam Murtza

More from Malik Ghulam Murtza (13)

Introduction to Graph in general life
Introduction to Graph in general lifeIntroduction to Graph in general life
Introduction to Graph in general life
 
Computer Graphics Basics
Computer Graphics BasicsComputer Graphics Basics
Computer Graphics Basics
 
Zero is even or odd, Zero is positive or negative ?
Zero is even or odd, Zero is positive or negative ?Zero is even or odd, Zero is positive or negative ?
Zero is even or odd, Zero is positive or negative ?
 
Pendulum clocks
Pendulum clocksPendulum clocks
Pendulum clocks
 
Android orientation
Android orientationAndroid orientation
Android orientation
 
Role model for younger ones
Role model for younger onesRole model for younger ones
Role model for younger ones
 
Leadership vs Manager Report Lies
Leadership vs Manager Report LiesLeadership vs Manager Report Lies
Leadership vs Manager Report Lies
 
Object Oriented Programming Basics
Object Oriented Programming BasicsObject Oriented Programming Basics
Object Oriented Programming Basics
 
Artificial Intelligence Presentation
Artificial Intelligence PresentationArtificial Intelligence Presentation
Artificial Intelligence Presentation
 
Software Engineering
Software EngineeringSoftware Engineering
Software Engineering
 
Tap2 Eat FYP presentation
Tap2 Eat FYP presentationTap2 Eat FYP presentation
Tap2 Eat FYP presentation
 
Leadership (7 leadership lies) presentation
Leadership (7 leadership lies) presentationLeadership (7 leadership lies) presentation
Leadership (7 leadership lies) presentation
 
Database Presentation
Database PresentationDatabase Presentation
Database Presentation
 

Recently uploaded

De mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FMEDe mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FMEJelle | Nordend
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobus
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfAMB-Review
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Globus
 
Agnieszka Andrzejewska - BIM School Course in Kraków
Agnieszka Andrzejewska - BIM School Course in KrakówAgnieszka Andrzejewska - BIM School Course in Kraków
Agnieszka Andrzejewska - BIM School Course in Krakówbim.edu.pl
 
Software Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdfSoftware Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdfMayankTawar1
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...Juraj Vysvader
 
Studiovity film pre-production and screenwriting software
Studiovity film pre-production and screenwriting softwareStudiovity film pre-production and screenwriting software
Studiovity film pre-production and screenwriting softwareinfo611746
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTier1 app
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILNatan Silnitsky
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesGlobus
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownloadvrstrong314
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamtakuyayamamoto1800
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfOrtus Solutions, Corp
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024Ortus Solutions, Corp
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Globus
 
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?XfilesPro
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsGlobus
 

Recently uploaded (20)

De mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FMEDe mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FME
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
 
Agnieszka Andrzejewska - BIM School Course in Kraków
Agnieszka Andrzejewska - BIM School Course in KrakówAgnieszka Andrzejewska - BIM School Course in Kraków
Agnieszka Andrzejewska - BIM School Course in Kraków
 
Software Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdfSoftware Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdf
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 
Studiovity film pre-production and screenwriting software
Studiovity film pre-production and screenwriting softwareStudiovity film pre-production and screenwriting software
Studiovity film pre-production and screenwriting software
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
 

Assembly Language Programming Basics

  • 1. Presentation (Assembly Language Programming) Topic: Disk I/O Presented To: Mam. Shaziya Saqib Presented By: Section-B (4rth Semester) Department of Computer Science Lahore Garrison University (Walton Campus)
  • 3. Types of Storage I. Hard Disk II.Floppy Disk III.There Models (Given on next slides) IV.Working Area
  • 4. Models of Floppy and Hard Disks DD Disk holds 720k of data & HD Disk holds 2.0 MB of data.
  • 5. Working of Floppy Disk ( 5 ¼ In)
  • 6. Working of Floppy Disk (3 ¼ In)
  • 7. Working of Hard Disk (General) One cylinder: the same track on the top and bottom of a platter.
  • 8. Disk Access • The method of accessing information for both Floppy and Hard Disk is similar. • This is done with the help of moving heads on the disk plates.
  • 9. The File Directory • DOS creates a 32-bit directory for each file. The format of an entry is as follows: • Byte 11 is the attribute file. Each bit specifies a file attribute. (Fig:19.4 , Given on the next slide)  Hidden files ( bit 1)  DIR  Archive bit ( bit 5)  BACKUP
  • 11. Clusters • DOS sets aside space for files in clusters. • Clusters always start with ‘0’ . • Number of sectors in a cluster in n^2. (Here ‘n’ is cluster number) • Byte 26-27 in directory bits (starting positions of clusters). • Cluster Size (1024 bytes for 5 ¼ in for DD Disk)
  • 12. The FAT (File Allocation Table) FAT  provides map for file storage. FAT  entries are 12-bit long. (for Floppy Disks & 10 MB Hard Disk) FAT  for higher Hard Disks it is 16-bit size.
  • 13. File Processing • The group of INT 21h Functions are called File Handle Functions. • This basically involves following functions: I. Reading II.Writing III.Re-writing
  • 14. What is File Handle ? • When a file opened or created in a program, DOS assigns it a unique number called “File Handle”. • Five Built-In File Handles: I. Keyboard II.Screen III.Error output-screen IV.Auxiliary device (A Piece of equipment that connect to your computer) V.Printer NOTE: Three additional file handles are also present.
  • 15. File Errors • If error is occurs then CF=1, and code no appear in AX.
  • 17. Opening a File(Example) • Write instructions to open a new read_only file called FILE1.
  • 18. Open an Existing File • To open an existing file, there is an another function:
  • 19. Closing a File • After a file has been processed, it should be closed.
  • 20. Reading a file • The following function reads a specified number of bytes from a file and stores them in memory.
  • 21. Reading a file(Example) • Write some code to read a 512-byte sector from a file.
  • 22. Writing a File • Function 40h writes a specified number of bytes to a file or device.
  • 23. Writing a File(Example) • Use function 40h to display a message on the screen.
  • 26. Summary • Today we discuss about: Internal structure & working of both Floppy & Hard Disk. The File Directory. Cluster & FAT Disk File Functions 1) 3Ch 2) 3Dh 3) 3Eh 4) 3Fh 5) 40h 6) 42h