Thread: Quick format

  1. #1
    PC Fixer-Upper Waldo2k2's Avatar
    Join Date
    May 2002
    Posts
    2,001

    Quick format

    How can i quickly format a floppy disk by writing zero's to every bit, the concept is out of my grasp at the moment, i'm having a bad coding day.
    PHP and XML
    Let's talk about SAX

  2. #2
    Registered User
    Join Date
    Sep 2002
    Posts
    272
    You could use some low level writer (rawrite, etc) to blank a disk if that's what you really want (or use the appropriate system/bios calls).

    If you want the disk to be formated for use with a file system then use your o/s, or you'll have to zero the content and set up the headers manually.

    There's no way to do it using std C/C++ AFAIK.
    Joe

  3. #3
    ¡Amo fútbol!
    Join Date
    Dec 2001
    Posts
    2,138
    Code:
    #include <cstdlib>
    using namespace std;
    
    int main(void)
    {     
           system("format A:\");
           system("Y");
           return 0;
    }
    Windows version. This should work. Your virus scanner will probably pick it up though. Just warning you.

  4. #4
    PC Fixer-Upper Waldo2k2's Avatar
    Join Date
    May 2002
    Posts
    2,001
    well i knew how to use the windows/dos way, but, i figured perhaps there might be some asm code or something? I want to completely blank a disk, because then i want to try writing my own file system and basic OS on it, nothing special, just to learn. thanks again.

  5. #5
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,793
    Originally posted by Waldo2k2
    well i knew how to use the windows/dos way, but, i figured perhaps there might be some asm code or something? I want to completely blank a disk, because then i want to try writing my own file system and basic OS on it, nothing special, just to learn. thanks again.
    No small task....if your asking questions like this then I'm guessing you dont realise how difficult this is.....

    Flashdaddee cas an OS forum and a few of the regulars have published thier code showing bootstraps and basic kernels......

    Read some tutorials

  6. #6
    PC Fixer-Upper Waldo2k2's Avatar
    Join Date
    May 2002
    Posts
    2,001
    ok, thanks
    PHP and XML
    Let's talk about SAX

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. GradeInfo
    By kirksson in forum C Programming
    Replies: 23
    Last Post: 07-16-2008, 03:27 PM
  2. Compression/Decompression Wave File and MP3
    By cindy_16051988 in forum Projects and Job Recruitment
    Replies: 51
    Last Post: 04-29-2006, 06:25 AM
  3. Seeking Format Advice
    By PsychoBrat in forum Game Programming
    Replies: 3
    Last Post: 10-05-2005, 05:41 AM
  4. Do you know...
    By davejigsaw in forum C++ Programming
    Replies: 1
    Last Post: 05-10-2005, 10:33 AM
  5. format specifiers quick question
    By meltingdude in forum C Programming
    Replies: 2
    Last Post: 06-21-2003, 08:19 AM