John Smith said:
A. I need to learn C and I would like to know where I can get a freeware
compiler.
You haven't indicated your platform; you haven't indicated whether you
need for C99 support or whether C89 will do; you have not defined
what you mean by "freeware" in this context.
For a lot of people, gcc is fairly acceptable, but it isn't ported
to everything, does not have -full- C99 support, and is copyrighted
with license terms that need to be thought about carefully.
C. My need to learn C is to have the tools to work at low level for hard
disk work, any pointers from anyone would be most appreciated.
You are skipping over a number of important assumptions there. The
operating system will make a -big- difference in how you approach
working with devices. If you are using an "embedded system" then
you probably have direct access to I/O registers that are needed
to control the drives, but unless you are careful your code would
also end up being locked in to that one platform.
If you are using a unix-like system, or are using one of the Windows NT
or later operating systems, then you need to build a device driver
rather than talking to the disk directly. The device drivers of
NT/W2K/XP are *quite* different than those used for Unix like systems;
and even within Unix-like systems, there are major schisms in driver
implementation. In order to write device drivers effectively, you
often have to learn a fair bit about the internals of the operating
system you are using: the steps you have to take are quite different
than just going ahead and accessing the hardware.
Then there's the issue that you haven't defined what -kind- of
drives you want to work with at the low level. SCSI? ATA? IDE?
SATA? Fibre Channel? DASD?
You can often find pre-written drivers for the most popular
operating systems. Those might give you enough access to do
whatever kind of operations you want, and might already be
generalized to handle a large number of different kinds of drives.