Listing and reading files on a floppy disk
Listing and reading files on a floppy disk
How can I list all files on Floppy? And how can I get the text of a file on the floppy with the filename?
Re: [TUTORIAL]: How to read (and supposedly write) floppies.
I think then you need implement a file system.sadisoft wrote:How can I list all files on Floppy? And how can I get the text of a file on the floppy with the filename?
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: Listing and reading files on a floppy disk
Split since the topic was about reading the contents of a floppy, not about interpreting that info.
See FAT12 for starters
See FAT12 for starters
Re: Listing and reading files on a floppy disk
Text files are like bin files they contain no headers and therefore can be read to the buffer and then printed to screen
Gizmic OS
Currently - Busy with FAT12 driver and VFS
Currently - Busy with FAT12 driver and VFS
Re: Listing and reading files on a floppy disk
Is there any short example that prints a text file on screen (from floppy)??
Re: Listing and reading files on a floppy disk
im actually trying to figure this out myself right now. look at http://en.wikipedia.org/wiki/INT_13
you want function 02h. Most is elf explanatory but im not sure how to fill in cx and dh
you want function 02h. Most is elf explanatory but im not sure how to fill in cx and dh
- Troy Martin
- Member
- Posts: 1686
- Joined: Fri Apr 18, 2008 4:40 pm
- Location: Langley, Vancouver, BC, Canada
- Contact:
Re: Listing and reading files on a floppy disk
yemista: You need to have a way to convert a logical sector number (0,1,2,3,4,5,6,7,8,9, etc.) to a Head/Track/Sector format.
-
- Member
- Posts: 524
- Joined: Sun Nov 09, 2008 2:55 am
- Location: Pennsylvania, USA
Re: Listing and reading files on a floppy disk
You could also use int 13h ah=42h and use Logical Block Addressing, which will do that for you and will work with up to 8 exabyte disks.Troy Martin wrote:yemista: You need to have a way to convert a logical sector number (0,1,2,3,4,5,6,7,8,9, etc.) to a Head/Track/Sector format.
- Troy Martin
- Member
- Posts: 1686
- Joined: Fri Apr 18, 2008 4:40 pm
- Location: Langley, Vancouver, BC, Canada
- Contact:
Re: Listing and reading files on a floppy disk
Sure, but the INT 13h Extensions are required and they use a packet, requiring a packet to be customised for each read/write.
-
- Member
- Posts: 524
- Joined: Sun Nov 09, 2008 2:55 am
- Location: Pennsylvania, USA
Re: Listing and reading files on a floppy disk
Idk how common it is to find a BIOS that doesn't support the extension, but AFAIK the extensions were created quite a while ago so most BIOSes should support them. Also, the packet can be reused and the only fields that need to be changed are the buffer, block number, and number of blocks to read (the same stuff that would be put in registers for each int 13h ah=02h call).Troy Martin wrote:Sure, but the INT 13h Extensions are required and they use a packet, requiring a packet to be customised for each read/write.
- Troy Martin
- Member
- Posts: 1686
- Joined: Fri Apr 18, 2008 4:40 pm
- Location: Langley, Vancouver, BC, Canada
- Contact:
Re: Listing and reading files on a floppy disk
Eh, good point. I should consider using them!
[offtopic]I think cotton509 should come back, I have some rage to vent. My trollskin pants have holes and I need to patch them with something...[/offtopic]
[offtopic]I think cotton509 should come back, I have some rage to vent. My trollskin pants have holes and I need to patch them with something...[/offtopic]
Re: Listing and reading files on a floppy disk
I thought you were working in protected mode. If you are I would say its better not to use bios interrupts. Build your own drivers and File system routines.
Gizmic OS
Currently - Busy with FAT12 driver and VFS
Currently - Busy with FAT12 driver and VFS