- Format Program for a floppy disk for an OSless envirnorment
- Posted by Shivaprasad on July 7th, 2004
Hi Experts
I would like to write a program for formatting a floppy disk for an
embedded application where there is no Operating system. This is for
an embedded processor from Intel. I am going to use FAT16 file
structure. I would like to know
1)what exactlty is meant by "formatting a disk". what is actually
happenig when u format a disk? what r the minute steps involed.
2)How the format program will vary upon selection of a file system(for
eg:FAT16,NTFS). Basically how formatting and file systems are related.
3)what are the hardware Initalizations required before starting of
format program.
Thanks in Advance.
regards,
Shivaprasad
- Posted by Thomas Matthews on July 7th, 2004
Shivaprasad wrote:
retrieved easily. Many times, this means to place a file system on
it.
[OP: Why can you type "formatting" but use 'u' instead of 'you'?]
[OP: Same thing with 'r' and 'are'.]
The steps involved depend on what kind of file system you want
to place on the floppy.
Embedded systems can place any kind of file system on the
floppy. However, wise designers will use an existing file
system so that the floppy can be inserted into workstation
which often helps with the development process.
onto a disk.
As far as how the program will vary, depends on the variety of
supported file systems like MVFS, FAT32 and FAT64.
You _may_ have to erase the whole disk, track, or sector before
writing to it. Depends on the Floppy drive controller.
Read up on the data sheets for your floppy drive controller.
See also news:comp.arch.embedded
--
Thomas Matthews
C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.raos.demon.uk/acllc-c++/faq.html
Other sites:
http://www.josuttis.com -- C++ STL Library book
- Posted by Jens.Toerring@physik.fu-berlin.de on July 7th, 2004
Thomas Matthews <Thomas_MatthewsSpitsOnSpamBots@sbcglobal.net> wrote:
Am I already that old that I get confused if people talk about
"formatting" but really mean "creating a file system" on a disk?
When I learned about "formatting" it meant putting bit patterns on
a disk that told the disk controller "here starts a sector" or
"here ends a sector". Nowadays everybody seems to take that kind of
"formatted" disks for naturally given and to "format" a disk seems
to mean something high-level as creating a file system... Does
anybody still remembers the fun of being able to get an additional
sector onto each track (or with some clever tricks even two), in-
creasing the capacity of a floppy by about 10% and decreasing disk
access times by carefully chosing offsets between the sector
numbers, so that when the read head finally had moved to the next
track the first sector it would see would be the first one of the
next track, at least under typical circumstances?
Regards, Jens
--
\ Jens Thoms Toerring ___ Jens.Toerring@physik.fu-berlin.de
\__________________________ http://www.toerring.de
- Posted by Malcolm Dew-Jones on July 8th, 2004
Shivaprasad (shivaprasad.rao@sunlux-india.com) wrote:
: Hi Experts
: I would like to write a program for formatting a floppy disk for an
: embedded application where there is no Operating system. This is for
: an embedded processor from Intel. I am going to use FAT16 file
: structure. I would like to know
: 1)what exactlty is meant by "formatting a disk". what is actually
: happenig when u format a disk? what r the minute steps involed.
: 2)How the format program will vary upon selection of a file system(for
: eg:FAT16,NTFS). Basically how formatting and file systems are related.
: 3)what are the hardware Initalizations required before starting of
: format program.
: Thanks in Advance.
I would examine the source code for the linux utility that formats a
floppy disk, and there is also a free dos clone (name forgotten by me, I
am afraid) and I would examine the source code of its format command
as well.
Or require that preformated disks are used, I don't buy many diskettes
these days, but I have a suspicion that many places _only_ sell
preformatted disks (not a good long term solution, but enough to get the
project started).
- Posted by Shivaprasad on July 10th, 2004
yf110@vtn1.victoria.tc.ca (Malcolm Dew-Jones) wrote in message news:<40ec90d7@news.victoria.tc.ca>...
Hi Experts
Thanks for ur advices.
1)what is needed to be put in bootstrap code for formatting if i dont
intend to format the floppy as bootable?.
2)In the case of unix/linux root will be the root directory. wht will
be the root directory in the case of windows?.
3)If i want to write format program for floppy on windows which would
be a better version of windows among 95,98,2000 etc.
Thanks in advance.
regards,
Shivaprasad
- Posted by Dan Tex1 on July 10th, 2004
You want to write a program to format a disk, but you have no concept of what
that means. You also want it to work with no Operating System, yet you then
ask questions about specific operating systems so that you can choose one. You
apparently know nothing about Unix or Windows, yet you then decide you want to
write code to work with those systems.
First... you need to learn what a computer is and how it works. Then... if
you complete that task sufficiently, you can use some language to write your
first "hello world" beginners program. Depending on how smart you are...
you might be capable and ready to write a floppy formatting program between 4
months and several years later.
Dan :-)
- Posted by Shivaprasad on July 12th, 2004
dantex1@aol.com (Dan Tex1) wrote in message news:<20040710121957.10961.00001380@mb-m02.aol.com>...
Hi Dan
Yes my questions were bit haphazordous. But i have crossed "hello
wolrd" stage long back. May be i am new to system programming side.
Anyway.
My requirement is to write a format program for an osless embedded
processor. since i dont have much idea as how format program works i
thought i will do first on windows using windows system calls where i
am more comfartable and then implement the same for an osless embedded
processor.
regards,
Shivaprasad
- Posted by Robert Wessel on July 12th, 2004
Jens.Toerring@physik.fu-berlin.de wrote in message news:<2l3c8qF7pjqeU1@uni-berlin.de>...
Low-level and high-level formatting have been understood as distinct
in most systems roughly forever. Very often, however, when the
"formatting" process is exposed to the user, both things are done at
once, since the disk remains useless for most applications without a
high level format.
Many modern disk drives are not low-level formattable (in a meaningful
way) by the end user any more (just by the factory).
It may be more that your particular background gives you a particular
set of names for the low- and high-level formatting processes. Off
the top of my head, I can think of at least one system that used
"format" to specifically mean high-level format dating back to the
late sixties.
Sure. Mostly I'm glad I don't care any more.