Thread View: comp.os.msdos.programmer
4 messages
4 total messages
Started by Jim Marco
Sat, 30 Mar 1996 17:54
problems using int 25h
Author: Jim Marco
Date: Sat, 30 Mar 1996 17:54
Date: Sat, 30 Mar 1996 17:54
12 lines
959 bytes
959 bytes
I'm trying to write a program (in Turbo C 2.0) that scans the hard disk looking for certain file signatures. I want this program to scan sector by sector, so I tried using int 25h via the Turbo C absread() command. The problem is, the program works as intended on drive C: which is a 20 meg PC-DOS 5.0 partition, but not on drive D: which is a 300 meg partition (same OS). The call keeps returning a "sector not found" error even for low sector values. Can anyone shed any light on this? Thanks in advance. -- Jim Marco -- doc@uiuc.edu It's not an optical illusion, it just looks like one. -- Phil White
Re: problems using int 25h
Author: Auke Reitsma
Date: Sun, 31 Mar 1996 09:40
Date: Sun, 31 Mar 1996 09:40
18 lines
1299 bytes
1299 bytes
doc@uiuc.edu (Jim Marco) wrote: > I'm trying to write a program (in Turbo C 2.0) that scans the hard disk looking > for certain file signatures. I want this program to scan sector by sector, so > I tried using int 25h via the Turbo C absread() command. The problem is, the > program works as intended on drive C: which is a 20 meg PC-DOS 5.0 partition, > but not on drive D: which is a 300 meg partition (same OS). The call keeps > returning a "sector not found" error even for low sector values. Can anyone > shed any light on this? Thanks in advance. TC2 does not have support for disks larger than 30 MB. I believe SNIPPETS has a replacement absread() ... You should be able to find Snippets at ftp.brokersys.com /pub/snippets Greetings from Delft, The Netherlands. Auke Reitsma
Re: problems using int 25h
Author: Tero Tervala
Date: Tue, 02 Apr 1996 05:59
Date: Tue, 02 Apr 1996 05:59
15 lines
1136 bytes
1136 bytes
doc@uiuc.edu (Jim Marco) writes: : I tried using int 25h via the Turbo C absread() command. The problem is, the : program works as intended on drive C: which is a 20 meg PC-DOS 5.0 partition, : but not on drive D: which is a 300 meg partition (same OS). The call keeps : returning a "sector not found" error even for low sector values. Can anyone I don't know if it helps anything, but try using BIOS sector read functions (INT 13h) I think you'll have to write the calling functions by yourself, I don't remember that Turbo C had those functions by default. -- --------------------------------------------------------------------- Tero "Miracle" Tervala eaytttet@sjoki.uta.fi miracle@kauhajoki.fi
Re: problems using int 25h
Author: Phlash
Date: Tue, 02 Apr 1996 10:34
Date: Tue, 02 Apr 1996 10:34
21 lines
1775 bytes
1775 bytes
Jim Marco wrote: > > I'm trying to write a program (in Turbo C 2.0) that scans the hard disk looking > for certain file signatures. I want this program to scan sector by sector, so > I tried using int 25h via the Turbo C absread() command. The problem is, the > program works as intended on drive C: which is a 20 meg PC-DOS 5.0 partition, > but not on drive D: which is a 300 meg partition (same OS). The call keeps > returning a "sector not found" error even for low sector values. Can anyone > shed any light on this? Thanks in advance. The DOS absolute read/write calls have different parameter sets for big or small disk partitions (remember those?). I suspect either you, or absread() are getting the parameters wrong for 'bigdos' partitions (anything >32MB). Maybe absread() was only intended for manipulating floppy disks :-) I would write your own using int86x(), and see if the problem goes away... -- !---mailto:paa@wimbledon.bt.co.uk ---! Version: 3.1 ! !Phil "Phlash" Ashby!+44-1473-293670 ! GAT d(?) s:-- a C++$ ULHS++++ P+ L+ ! !G10,153 Princes St.,Ipswich,England ! E- W++ N++ w++ Y+ PGP+ tv- t+@ X- b+ ! !http://www.wimbledon.bt.co.uk:64000/! DI++ D++ G+ e+++ h---- r++++ y++++ !
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads