Hello: I want to thank all that reply.

I am new to assembly, however I am proficient in VB. Back in the late 70's I studied Assembly for a short time, but not since.

What I am looking for is information or maybe some examples on how to read & Write data to the Hard Disk. I am assuming that with assembly I can have 100% control of where I write and read data to the disk.

I am interested in reading & writing the HEX values from anyplace that I need to from the Hard disk.

Example: I may need to read the HEX value from, CYL-256, HD-0, SECTOR-52.

I don't expect someone to give me the code, but I have searching the Internet for days and have found nothing about accessing Hard disk through assembly.

Thanks again for your help.

David M. Camp
Posted on 2003-05-11 10:05:34 by damica
You might start by looking at the interrupts , I have a feeling that if you want sector by sector control of a hard disk your probably looking at int21/int2f stuff.
Posted on 2003-05-11 10:15:19 by donkey

I am assuming that with assembly I can have 100% control of where I write and read data to the disk.

You are still under OS control - and the OS has quite some limits.

If you're under win32 (I assume you are, since you're posting on the win32asm forum and don't make any explicit notes on OS), there are two things to look at. Under NT, everything is simple, you just use CreateFile with a special name. Nothing could be easier. On 9x, the situation is messy. I never bothered looking into it, as I think 9x is a POS... but other members of this board have been successful. I think it's bit7 who did some 16-bit DLL thunking thingamajig for 9x.

Forget doing this with interrupts or port I/O if you're under win32. First, you'll need ring0 code to do this, and second, it's "dangerous".
Posted on 2003-05-12 08:57:14 by f0dder
Both Windows and DOS have higher- and lower-level disk access features.
In win, system32.dll and kernel.dll have lots of neat stuff.

Unfortunately, I seem to be devoid of the good-old DOS list. (Int21h)

I've been perusing the MSDN docs for information, and even hit up Stefan Fleishman (Author of WinHex... which uses Win NT/9x calls to do some very low-level stuff), but to little avail. (Stefan is worried about people using his source, darnit.)

Beyond FileCreate, I'm finding nothing worth noting. I'm fairly sure there are some low-level stuff directly through windows calls.

Does anyone else have anything on this sordid mess?
Documentation on such fun and games would be great.

(Frankly, it wouldn't annoy me so much if file-parsing were less important to everything I want to write.)
Posted on 2003-06-04 15:30:25 by THENate

as I think 9x is a POS...

Pretty Outstanding System?
<joking> ;)
Posted on 2003-06-05 02:06:48 by TronDoc