How to read random sector... 
Author Message
 How to read random sector...

Hello!

How do I read a random sector on harddisk with TP 7.0?

I'm trying with interrupt $25 but i'm crashing all the time :-)!!

Some source would be helpful...



Wed, 18 Jun 1902 08:00:00 GMT  
 How to read random sector...


Quote:

>Hello!

>How do I read a random sector on harddisk with TP 7.0?

>I'm trying with interrupt $25 but i'm crashing all the time :-)!!

>Some source would be helpful...

Remember that $25 & $26, unlike other interrupts, leave something on the
stack, and this should be removed.  Also, ISTR, that large discs are
handled differently.

--

  Web <URL: http://www.merlyn.demon.co.uk/> - TP/BP/&c. FAQqish topics & links.
  Timo's TurboPascal <A HREF="ftp://garbo.uwasa.fi/pc/link/tsfaqp.zip">FAQ</A>.
  <A HREF="http://www.merlyn.demon.co.uk/clpb-faq.txt">Mini-FAQ</A> of c.l.p.b.



Wed, 18 Jun 1902 08:00:00 GMT  
 How to read random sector...

Quote:




> >Hello!

> >How do I read a random sector on harddisk with TP 7.0?

> >I'm trying with interrupt $25 but i'm crashing all the time :-)!!

> >Some source would be helpful...

> Remember that $25 & $26, unlike other interrupts, leave something on the
> stack, and this should be removed.

The original FLAGS register is left on the stack, and should be removed with a
POPF assembly instruction.  Of course, this means if you want to use int 25h
or int 26, it's virtually impossible to do successfully with a call to
intr().  Assembly or inline is required.

Quote:
>  Also, ISTR, that large discs are handled differently.

FAT12 and FAT16 are both handled through int 25h/26h, but both use different
interrupt calling conventions (the FAT12 version uses registers, and the FAT16
version uses a record passed via a pointer).  The FAT12 version will work on a
FAT16 drive up to the 32MB mark, and the FAT16 call should work on either a
FAT12 or FAT16 volume (backward compatible).

For FAT32, absolute sectors are read using int 12h, ax=7305h.  This call is
also backward compatible to FAT12 and FAT16.

A reference like Ralf Brown's Interrupt List will contain all the details you
need to know about what goes in which register.  For specific implementation,
it's not my personal policy to give any more information that what I just
have; if you really *really* want to understand it and make it work, further
progress is yours to make.

Quote:
> --

>   Web <URL: http://www.merlyn.demon.co.uk/> - TP/BP/&c. FAQqish topics & links.
>   Timo's TurboPascal <A HREF="ftp://garbo.uwasa.fi/pc/link/tsfaqp.zip">FAQ</A>.
>   <A HREF="http://www.merlyn.demon.co.uk/clpb-faq.txt">Mini-FAQ</A> of c.l.p.b.

--
Scott Earnest            | SPAM protection in effect. Remove  |





Wed, 18 Jun 1902 08:00:00 GMT  
 How to read random sector...
I recommend Ralph Brown's Interrupt List (just search for it) where all
three* ABSOLUTE DISK READ functions are described with the bug that one has
to POP a word after the int.

*
1. Floppies and HDD's < 32 MB
2. HDD's < 2 GB
3. HDD's >= 2 GB

if you want:

4. CD-ROM by MSCDEX



Quote:
> Hello!

> How do I read a random sector on harddisk with TP 7.0?

> I'm trying with interrupt $25 but i'm crashing all the time :-)!!

> Some source would be helpful...



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. how to read a sector from A: in TP

2. WANT to read a sector/cluster from FAT32 HD

3. WANT to read a sector/cluster from FAT32 HD

4. how to read a sector from A: in TP

5. boot sector reading

6. How to read a sector...

7. Reading the physical sector of hard drive

8. How read/write Sectors by BIOS or DOS ???????!!!

9. Reading QBASIC Random access files

10. Reading a random file

11. Reading a random file in Pascal???

12. Random isn't random?

 

 
Powered by phpBB® Forum Software