Fromatting floppy

This is a discussion on Fromatting floppy within the C++ Programming forums, part of the General Programming Boards category; Does any one know how to write a program in turbo c++ to format a floppy....

  1. #1
    Its not rocket science vasanth's Avatar
    Join Date
    Jan 2002
    Posts
    1,683

    Question Fromatting floppy

    Does any one know how to write a program in turbo c++ to format a floppy.

  2. #2
    Skunkmeister Stoned_Coder's Avatar
    Join Date
    Aug 2001
    Posts
    2,572
    Well I geuss since you are using Turbo c then you are compiling for DOS. In that case you can use the system function from stdlib.h

    system("format A:");
    Free the weed!! Class B to class C is not good enough!!
    And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi

  3. #3
    Banned frenchfry164's Avatar
    Join Date
    Oct 2001
    Posts
    1,552
    This is off-subject, but how do you format a 2 meg 3 1/2 floppy? All windows lets me do is 1.44 meg. Somehow I found a floppy that can hold 2 meg, but if you can't format that high, there is no use for it.

  4. #4
    Its not rocket science vasanth's Avatar
    Join Date
    Jan 2002
    Posts
    1,683
    Well the floppy you have 2 megs might be a floppy using the linux file system. When you open it in windows it shows that it had more space.. But in reality it just holds 1.44 MB.


    But how do you write the program to format a 1.44 Fdd.. Please help me....


    Well even any help would be preferd..

  5. #5
    Skunkmeister Stoned_Coder's Avatar
    Join Date
    Aug 2001
    Posts
    2,572
    What operating system is this to work on?
    Free the weed!! Class B to class C is not good enough!!
    And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi

  6. #6
    Banned frenchfry164's Avatar
    Join Date
    Oct 2001
    Posts
    1,552
    no, no

    It says 2.0 MB on the little slide thing where it says the brand. The disk was made before Linux was even popular yet.

    The problem is, I can't get all of the 2.0 MB if Windows only lets you format 700K and 1.44 MB.

    PS: This is being formatted for use with Windows 98.

  7. #7
    Hamster without a wheel iain's Avatar
    Join Date
    Aug 2001
    Posts
    1,385
    some of the space may be reserved for filsystem data and FATS, it doesnt neccessarily mean it will hold 2mb of data
    Monday - what a way to spend a seventh of your life

  8. #8
    Unregistered
    Guest
    It's dependent upon the format. You can get diskette's that can be read beyond 1.44MB.
    Do a web search for a DMF format utility, about 1.7MB This is how most modern microsoft diskettes for software distribution are formatted these days. From memory I believe you can use this format for diskettes that are normally 1.44 MB rated with a normal 1.44 MB FDD.

    I'm not aware of any utility to give you 2MB's out of one of these disk's, or using a standard 1.44 MB drive. However, you can get 2.88 MB floppy drives for use with 2.88 MB diskettes (IBM were the only people who used these a lot, mainly in laptops)

  9. #9
    Its not rocket science vasanth's Avatar
    Join Date
    Jan 2002
    Posts
    1,683
    Hey guys forget it.. I just want to know how to write a program in turbo c++ (DOS) to format a normal 1.44 mb floppy...

  10. #10
    Unregistered
    Guest
    well no one seems to have an answer for the above question.. Pitty

  11. #11
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145

    reply

    Originally posted by vasanth
    Hey guys forget it.. I just want to know how to write a program in turbo c++ (DOS) to format a normal 1.44 mb floppy...
    Well, didn't Stoned coders suggestion work? ( system("format A:"); )
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  12. #12
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,789
    What you are looking to do is not really a basic task. I know very little about ultra low-level processes like this, but I imagine you would find more success asking this sort of thing on an Assembler and/or OS developement board.

  13. #13
    Unregistered
    Guest
    I think fordy is right... I thought there was some sort of dos interrupt for this... but I'm not sure; People on an assembly board could know this indeed.

  14. #14
    Its not rocket science vasanth's Avatar
    Join Date
    Jan 2002
    Posts
    1,683

    It is possible

    Well i am not looking for ( system("format A:"); ) because what this merely does is give a command to dos to format a floppy.. I am looking for something that can really format a floppy. I think this is possible is c+ because the header bios.h allows us to directly access the floppy and it's sectors.. May be we need an expert to answer this.. But learning this will be of a great help to us since it is the most basic low level programing..... Hope some one comes up with a solution...

  15. #15
    Skunkmeister Stoned_Coder's Avatar
    Join Date
    Aug 2001
    Posts
    2,572
    You cannot do this without using the operating system as far as I know and I am not aware of a win32 api function to perform a low level disk format. In dos i'm sure it was done with some sort of int 21 call.You might want to check ralf brown's intterupt list.
    Free the weed!! Class B to class C is not good enough!!
    And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi

Page 1 of 2 12 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. floppy eraser error catching!
    By mabufo in forum C++ Programming
    Replies: 7
    Last Post: 01-23-2005, 01:06 PM
  2. formatting a floppy in C
    By McMullet in forum C Programming
    Replies: 2
    Last Post: 10-10-2004, 05:20 AM
  3. making a proper image for floppy
    By EvBladeRunnervE in forum Tech Board
    Replies: 4
    Last Post: 07-31-2004, 11:27 PM
  4. selecting input from a floppy
    By neilman88 in forum C++ Programming
    Replies: 1
    Last Post: 04-17-2003, 02:26 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21