C programming question

On Fri, 19 Dec 2003, Jim Skehill wrote:
If you are programming in C you can go down to the assembler level and issue a BIOS interrupt (sorry I don't recall the number) to write to a particular disk location. DOS interrupt 25H allows you to write to a particular disk sector, but seeing that this is the TLUG Mailing list, I don't imagine that's of much help to you.
Except you can't do that in linux since the bios is not functioning while in linux. There are equivalent functions in the kernel, not available from user space. In theory you can acheieve the same effect by using the raw device (e.g. /dev/hda) and use (f)seek & co. to acceess a physical sector (which you get to compute using the disk geometry). You have to be root to do this and the potential for problems is enormous. Peter -- The Toronto Linux Users Group. Meetings: http://tlug.ss.org TLUG requests: Linux topics, No HTML, wrap text below 80 columns How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml
participants (1)
-
plp-ysDPMY98cNQDDBjDh4tngg@public.gmane.org