Article View: comp.sys.ibm.pc.programmer
Article #823Re: First sector of the file area
From: Steve Resnick
Date: Mon, 02 Jul 1990 01:25
Date: Mon, 02 Jul 1990 01:25
27 lines
1812 bytes
1812 bytes
In article <1990Jun27.141718.18545@contact.uucp> yung@contact.uucp () writes: >Hi, folks! > >I am writing a TSR program and is now in a desparate need to find out >the best way to access hard disk. Since DOS function cannot be used in >TSR program, therefore I will have to use BIOS, which means I have to >do the sector/cluster/file calculation. Anybody know how I can find out >the sectore number of the first sector of the file area of a hard disk >without knowing its storage size in advance? > Wait wait wait! The same reasons for not being able to call DOS is true for the BIOS disk I/O routines: They are non-reentrant. If you can cause your disk writes to wait for DOS to be finished with a DOS call, you can trap int 21 to your own vector and keep track of DOS' reentrancy status. There are some undocumented ways of doing this but they are not the same accross DOS 3 & DOS 4. As always, be carefull when doing any disk I/O for you may kill your disk or a portion thereof... Cheers! Steve -- -------------------------------------------------------------------------------- Steve Resnick -<stever@octopus.COM apple!octopus!stever sun!vsi1!octopus!stever> 408/241-1533 Process Scientific, Inc. "0x2B|~0x2B THAT is the question!"
Technical Details
Message-ID:
<1990Jul2.012523.19315@Octopus.COM>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!brutus.cs.uiuc.edu!apple!voder!pyramid!octopus!steverReferences:
<1990Jun27.141718.18545@contact.uucp>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!brutus.cs.uiuc.edu!apple!voder!pyramid!octopus!stever From: stever@Octopus.COM (Steve Resnick ) Newsgroups: comp.sys.ibm.pc.programmer Subject: Re: First sector of the file area Message-ID: <1990Jul2.012523.19315@Octopus.COM> Date: 2 Jul 90 01:25:23 GMT References: <1990Jun27.141718.18545@contact.uucp> Reply-To: stever@octopus.UUCP (Steve Resnick ) Organization: Octopus Enterprises, Cupertino CA Lines: 27