Thread: How to get floppy disk information ?!!

  1. #16
    بابلی ریکا Masterx's Avatar
    Join Date
    Nov 2007
    Location
    Somewhere nearby,Who Cares?
    Posts
    497
    well the reason i switched to Tc was that my Pelles C compiler went wrong ... it couldnt compile anything ...it kept saying "empty declaration" ...so i was tried of this damn message and though to give it a try under TC and lets see of my compiler (here Pelles C )is not working probably and lets assume my codes should at least be compiled !>
    so , i just used that damn ancient compiler and ... everything crashed !!!
    ...
    from this time and then .i will only use Pelles C compiler .. thats it ...

    by the way the code i ran is :

    (as you see there are bunch of codes that i disabled them (step by step ..i used diffrent procedures) ... and some how this piece of codes is what i got ...)

    Code:
    #include <stdio.h>
    #include <process.h>
    #include <string.h>
    //#include <windows.h>
    #include <dos.h>
    /*struct  Flopy_Drive_Sectors
    {
      char jumpCode[3];//0 - 2     Assembly Instruction for jump code.
       char oemName[8];//3 - 10     OEM Name.
       char bytes_Sector[2];//*11 - 12     Bytes per sector.
       char sec_Cluster;//13     Sector per cluster.
       char size_Sector_Reserved[2];//14 - 15     Number of reserved sector(Boot Sector)
       char fatCount;//16     Number of File Allocation Table
       char Max_Root_Entry[2];//17 - 18     Maximum entries possible under root directory.
       char Total_Sector_FS[2];//19 - 20     Total number of sectors in file system.
       char Media_Type;//21     Media Type(According to Microsoft 0xf8 for fixed disk and 0xf0 for removable disk.
       char sectors_per_fat[2];//22 - 23     Sectors allocated for each File allocation table.
       char sectors_per_track[2];//24 - 25     Sectors per track.
       char total_Head_Count[2];//26 - 27     Number of head in storage device.
       char no_Sectors_Before_Part[4];//28 - 31     Number of sectors before start of partition(Not applicable for floppy).
       char no_Sector_FS32[4];//32 - 35     Number of sectors in file system(32-bit value, not applicable for floppy).
       char BIOS_13h_Drive_No;//36     BIOS INT13h drive number.
       char reserved;//37     Not Used.
       char ext_Boot_Part_Signature;//38     Extended boot signature.
       char vol_Serial_Number[4];//39 - 42     Volume Serial Number.
       char vol_Lebel_Name[11];//43 - 53     Volume label in ASCII.
       char FS_Type[8];//54 - 61     File System Type.
       char boot_Code[448];//62 - 509     Boot Code, otherwise contains information to replace disk.
       char signature[2];//510 - 511     Signature for File System.
    } fds;
    FILE *fptr;*/
    
    
     int main(void)
    {
        int j,i,k,start,sector;
        char buf[512],ch;
        clrscr();
        gotoxy(27,5);
        printf("In the name of God\n");
       gotoxy(22,7);
        printf("A S.Hossein hasan pour Project\n\n");
        printf ("         This program will show you the information stored on sector 0  of your hard Drive.\n              if you are ready press any key to continue ");
        for (k=0;k<=4;k++){
        //delay(50);
        printf(".");       }
        getch();
        sector =0;
        if (absread (0, 1, sector, &buf)!=0)
        {
        printf ("Error");
        exit(1);
           }
    
    
       printf("Read Successful!\n");
     // fptr=fopen("D:\temp.fds","w");
      for (i=0;i<=12;i++)
        {
            for(j=0;j<=2;j++)
                printf("Assembly Jump COde is: %02x\n",&buf[j]);
            for(j=3;j<=10;j++)
                printf("OEM IS: %s\n",&buf[j]);
            for(j=11;j<=12;j++){
                   printf("Bytes per sector: %0\n",&buf[j]);}
               for(j=13;j<14;j++){
                   printf("sector per cluster is: %d\n",&buf[j]);}
            }
    
    
    
    
    
    
    
    
        //    PrintFlopyInformation(Bpb_bpb);
        getch();
        return 0;
    }
    Last edited by Masterx; 11-10-2007 at 06:31 AM.

  2. #17
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Code:
    printf("Assembly Jump COde is: %02x\n",&buf[j]);
    That prints the ADDRESS of buf[j] which is probably not really what you want [and yes, your stack is probably around 0xFFFE or so, so your printout value is corresponding to this].

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  3. #18
    بابلی ریکا Masterx's Avatar
    Join Date
    Nov 2007
    Location
    Somewhere nearby,Who Cares?
    Posts
    497
    yep , maybe , but i change that two, but still no luck
    hey guys since i switched to Pelles C Compiler and Dev C++ Compiler ... ive changed the whole codes so that it can run under these compilers ,,, so far so good ... but ive faced a terrible problem and that is ..I can NOt Find any Equivalent function to "absread() function" i need to get the infos ,,, so how can i do that without using "absread() function ? again i tried to use creat() function .. but still no luck ...
    i have really gone crazy ... i am so confused !!! ...
    each time i get close to what i want ..sth bizarre happens ...

  4. #19
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Ok, whilst changing to another compiler is probably a generally good idea, for this particular project, where a lot of the code is "hardware dependent", I would suggest that you get the code WORKING first. [1]

    Changing more than one thing at a time is always a poor way to try to solve a problem. Changing the code AND compiler "at the same time" (or as a consequence of one another) is bound to introduce new problems unless you KNOW that the code is actually working. If you have working code, then fine, change the compiler - at least you know what's wrong if it doesn't work right. But if you have code that doesn't work [and you don't understand WHY it's not working] then you're just going to make things more complex by changing the compiler.

    [1] I have posted earlier how to do this in Windows API - since both Dev C++ and Pelles C are based on 32-bit compilers, you will not be able to produce an old-fashioned DOS executable, and your call to "absread" is almost certainly translating into a DOS system call. So to use just about anything other than Turbo C, you won't be able to use the "absread" function.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  5. #20
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    Using the win32 API, which Pelles and Dev-C++ should be able to compile.
    Code:
    #include <windows.h>
    #include <stdio.h>
    #include <assert.h>
    
    struct  Flopy_Drive_Sectors
    {
       char jumpCode[3];                //00 - 02   Assembly Instruction for jump code.
       char oemName[8];                 //03 - 10   OEM Name.
       char bytes_Sector[2];            //11 - 12   Bytes per sector.
       char sec_Cluster;                //13        Sector per cluster.
       char size_Sector_Reserved[2];    //14 - 15   Number of reserved sector(Boot Sector)
       char fatCount;                   //16        Number of File Allocation Table
       char Max_Root_Entry[2];          //17 - 18   Maximum entries possible under root directory.
       char Total_Sector_FS[2];         //19 - 20   Total number of sectors in file system.
       char Media_Type;                 //21        Media Type(According to Microsoft 0xf8 for fixed disk and 0xf0 for removable disk.
       char sectors_per_fat[2];         //22 - 23   Sectors allocated for each File allocation table.
       char sectors_per_track[2];       //24 - 25   Sectors per track.
       char total_Head_Count[2];        //26 - 27   Number of head in storage device.
       char no_Sectors_Before_Part[4];  //28 - 31   Number of sectors before start of partition(Not applicable for floppy).
       char no_Sector_FS32[4];          //32 - 35   Number of sectors in file system(32-bit value, not applicable for floppy).
       char BIOS_13h_Drive_No;          //36        BIOS INT13h drive number.
       char reserved;                   //37        Not Used.
       char ext_Boot_Part_Signature;    //38        Extended boot signature.
       char vol_Serial_Number[4];       //39 - 42   Volume Serial Number.
       char vol_Lebel_Name[11];         //43 - 53   Volume label in ASCII.
       char FS_Type[8];                 //54 - 61   File System Type.
       char boot_Code[448];             //62 - 509  Boot Code, otherwise contains information to replace disk.
       char signature[2];               //510 - 511 Signature for File System.
    } fds;
    
    int f2 ( void ) {
        assert( sizeof fds == 512 );
        CHAR szVolumeHandleName[] = { "\\\\.\\A:"};
    
        HANDLE volumeHandle = CreateFile(
            szVolumeHandleName,
            GENERIC_READ | GENERIC_WRITE,
            FILE_SHARE_READ|FILE_SHARE_WRITE,
            NULL,
            OPEN_EXISTING,
            FILE_ATTRIBUTE_NORMAL,
            NULL);
    
        if (volumeHandle == INVALID_HANDLE_VALUE)
            return -1;
    
        DWORD bytesRead;
        BOOL result = ReadFile( volumeHandle, &fds, sizeof fds, &bytesRead, NULL );  
    
        if ( result && bytesRead == sizeof fds ) {
            printf( "JMP code = %02x %02x %02x\n", 
                (unsigned char)fds.jumpCode[0],
                (unsigned char)fds.jumpCode[1],
                (unsigned char)fds.jumpCode[2] );
            printf( "OEM      = %.8s\n", fds.oemName );
            printf( "Signature= %02x %02x\n",
                (unsigned char)fds.signature[0],
                (unsigned char)fds.signature[1] );
        }
    
        CloseHandle(volumeHandle);
        return 0;
    }
    
    int main ( ) {
        return f2();
    }
    
    
    
    // My example output.
    JMP code = eb 3c 90
    OEM      = MSDOS5.0
    Signature= 55 aa
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  6. #21
    بابلی ریکا Masterx's Avatar
    Join Date
    Nov 2007
    Location
    Somewhere nearby,Who Cares?
    Posts
    497
    Quote Originally Posted by matsp View Post
    Ok, whilst changing to another compiler is probably a generally good idea, for this particular project, where a lot of the code is "hardware dependent", I would suggest that you get the code WORKING first. [1]

    Changing more than one thing at a time is always a poor way to try to solve a problem. Changing the code AND compiler "at the same time" (or as a consequence of one another) is bound to introduce new problems unless you KNOW that the code is actually working. If you have working code, then fine, change the compiler - at least you know what's wrong if it doesn't work right. But if you have code that doesn't work [and you don't understand WHY it's not working] then you're just going to make things more complex by changing the compiler.

    [1] I have posted earlier how to do this in Windows API - since both Dev C++ and Pelles C are based on 32-bit compilers, you will not be able to produce an old-fashioned DOS executable, and your call to "absread" is almost certainly translating into a DOS system call. So to use just about anything other than Turbo C, you won't be able to use the "absread" function.

    --
    Mats
    yep tanx mats ..great lesson ... thanks for your gr8 piece of advice ...
    i wont forget This Vital reminder ,never ... many tanx
    (to tell teh truth , i didnt know that those 32 bit based compiler doesnt support such a comands and functions . ive always thought that these new and up-to date compilers must support all of the previous commands and functions of the older compilers ...( i assumed it as it was like a office collection that supports its early formats ...)
    any way , now that you ve directly mentioned that , and also i myself experienced it , i can say , there wont be any problems of this kind ...
    again many tanx

  7. #22
    بابلی ریکا Masterx's Avatar
    Join Date
    Nov 2007
    Location
    Somewhere nearby,Who Cares?
    Posts
    497
    Quote Originally Posted by Salem View Post
    Using the win32 API, which Pelles and Dev-C++ should be able to compile.
    Code:
    #include <windows.h>
    #include <stdio.h>
    #include <assert.h>
    
    struct  Flopy_Drive_Sectors
    {
       char jumpCode[3];                //00 - 02   Assembly Instruction for jump code.
       char oemName[8];                 //03 - 10   OEM Name.
       char bytes_Sector[2];            //11 - 12   Bytes per sector.
       char sec_Cluster;                //13        Sector per cluster.
       char size_Sector_Reserved[2];    //14 - 15   Number of reserved sector(Boot Sector)
       char fatCount;                   //16        Number of File Allocation Table
       char Max_Root_Entry[2];          //17 - 18   Maximum entries possible under root directory.
       char Total_Sector_FS[2];         //19 - 20   Total number of sectors in file system.
       char Media_Type;                 //21        Media Type(According to Microsoft 0xf8 for fixed disk and 0xf0 for removable disk.
       char sectors_per_fat[2];         //22 - 23   Sectors allocated for each File allocation table.
       char sectors_per_track[2];       //24 - 25   Sectors per track.
       char total_Head_Count[2];        //26 - 27   Number of head in storage device.
       char no_Sectors_Before_Part[4];  //28 - 31   Number of sectors before start of partition(Not applicable for floppy).
       char no_Sector_FS32[4];          //32 - 35   Number of sectors in file system(32-bit value, not applicable for floppy).
       char BIOS_13h_Drive_No;          //36        BIOS INT13h drive number.
       char reserved;                   //37        Not Used.
       char ext_Boot_Part_Signature;    //38        Extended boot signature.
       char vol_Serial_Number[4];       //39 - 42   Volume Serial Number.
       char vol_Lebel_Name[11];         //43 - 53   Volume label in ASCII.
       char FS_Type[8];                 //54 - 61   File System Type.
       char boot_Code[448];             //62 - 509  Boot Code, otherwise contains information to replace disk.
       char signature[2];               //510 - 511 Signature for File System.
    } fds;
    
    int f2 ( void ) {
        assert( sizeof fds == 512 );
        CHAR szVolumeHandleName[] = { "\\\\.\\A:"};
    
        HANDLE volumeHandle = CreateFile(
            szVolumeHandleName,
            GENERIC_READ | GENERIC_WRITE,
            FILE_SHARE_READ|FILE_SHARE_WRITE,
            NULL,
            OPEN_EXISTING,
            FILE_ATTRIBUTE_NORMAL,
            NULL);
    
        if (volumeHandle == INVALID_HANDLE_VALUE)
            return -1;
    
        DWORD bytesRead;
        BOOL result = ReadFile( volumeHandle, &fds, sizeof fds, &bytesRead, NULL );  
    
        if ( result && bytesRead == sizeof fds ) {
            printf( "JMP code = &#37;02x %02x %02x\n", 
                (unsigned char)fds.jumpCode[0],
                (unsigned char)fds.jumpCode[1],
                (unsigned char)fds.jumpCode[2] );
            printf( "OEM      = %.8s\n", fds.oemName );
            printf( "Signature= %02x %02x\n",
                (unsigned char)fds.signature[0],
                (unsigned char)fds.signature[1] );
        }
    
        CloseHandle(volumeHandle);
        return 0;
    }
    
    int main ( ) {
        return f2();
    }
    
    
    
    // My example output.
    JMP code = eb 3c 90
    OEM      = MSDOS5.0
    Signature= 55 aa

    by the way when i want to compile it in pelles C it says :
    f you are compiling a Windows program: make sure you use the /Ze option!
    what is that ? !!
    many tanx , you have solved my problems ... i really dont know how to thank you all ... you taught me a great lesson ..believe me ...i really appreciate your kindness and time you ve spent to help me ...
    God bless you all

  8. #23
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by Masterx View Post
    yep tanx mats ..great lesson ... thanks for your gr8 piece of advice ...
    i wont forget This Vital reminder ,never ... many tanx
    (to tell teh truth , i didnt know that those 32 bit based compiler doesnt support such a comands and functions . ive always thought that these new and up-to date compilers must support all of the previous commands and functions of the older compilers ...( i assumed it as it was like a office collection that supports its early formats ...)
    any way , now that you ve directly mentioned that , and also i myself experienced it , i can say , there wont be any problems of this kind ...
    again many tanx
    Just a slight point here: DOS runs in 16-bit mode. 32-bit compilers generate 32-bit code. It is not possible to [trivially] call 16-bit code from 32-bit code. When you are running a DOS program under Windows, it runs in an emulated 16-bit environment, where if a call to DOS itself (or the BIOS) is made, it is "intercepted" and translated into a corresponding Win32 system call [for most things]. So, to make DOS system calls, you need to run a 16-bit application. A 32-bit application can perform the same task (as Salem proved), but it needs to use the 32-bit API, not the 16-bit API.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  9. #24
    بابلی ریکا Masterx's Avatar
    Join Date
    Nov 2007
    Location
    Somewhere nearby,Who Cares?
    Posts
    497
    tanx mats .. many tanx ... again i have a question .. i think there is sth wrong with me pelles c compiler " it just gave me 100 errors ... :



    F:\Program Files\PellesC\Include\Win\basetsd.h(13): error #2001: Syntax error: found 'INT64' - expecting ';'.
    F:\Program Files\PellesC\Include\Win\basetsd.h(13): warning #2099: Missing type specifier.
    << snip infeasibly large list>>
    F:\Program Files\PellesC\Include\Win\dde.h(32): error #2186: 'unsigned short int' is an illegal bit-field type.
    F:\Program Files\PellesC\Include\Win\dde.h(32): error #2186: 'unsigned short int' is an illegal bit-field type.
    F:\Program Files\PellesC\Include\Win\dde.h(32): error #2186: 'unsigned short int' is an illegal bit-field type.
    why is it happening to me ? whats wrong with my compiler ? is there any specific configuration for these compiler ? !! i also have the same problems with Dev C++ while compiling .. ?!!!

    again many many tanx
    Last edited by Salem; 11-26-2007 at 05:06 AM. Reason: Removed the excessive number of posted error messages, we've moved on

  10. #25
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    I've never used that compiler. Is this from the code that Salem posted, or something else?

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  11. #26
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    I've just tried it with Dev-C++, created a new console project and it worked right out of the box.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  12. #27
    بابلی ریکا Masterx's Avatar
    Join Date
    Nov 2007
    Location
    Somewhere nearby,Who Cares?
    Posts
    497
    Quote Originally Posted by Salem View Post
    I've just tried it with Dev-C++, created a new console project and it worked right out of the box.
    yeah ..i ve just created a new console project and ..some how it worked!!! ...it compiled without even a warning !!! but how is it possible ? why ? !!!i really wana know why ? !!! is there any problem with pelles? or no thtas just my fault ( i did use the exact code that dear salem gave me )
    ( hey by the way why is it just splashing? i mean i can see a cmd screen and in an twinkling an eye it just closes ... i tried using getch() (int_cdecl getch(void);
    before return 0 ... but it said it is wrong !!! .. why?!!!( i even tried int _getch(void); again no luck ...)
    Last edited by Masterx; 11-10-2007 at 01:02 PM.

  13. #28
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Try using "getchar()" instead. It's standard, works with just about every compiler in the world.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  14. #29
    بابلی ریکا Masterx's Avatar
    Join Date
    Nov 2007
    Location
    Somewhere nearby,Who Cares?
    Posts
    497
    tanx ..now its working like a charm :d ..thanks alot ... many many tanx ...

  15. #30
    بابلی ریکا Masterx's Avatar
    Join Date
    Nov 2007
    Location
    Somewhere nearby,Who Cares?
    Posts
    497
    hi guys ... its me again .. you know i finally did it .. i did it under dos ... using that damn TC ...
    you know after solving the problem under 32 bit systems .. i decided to have such a challenge with dos based compilers such as TC ... and i did it (i think so ..)

    before i gave you the code ,,, i have an request to you .. would you do me a favor and test it and tell me if it works well?!!!

    A quintillion of thanks:d
    The code is as :
    Code:
    //in the name of god
    #include <stdio.h>
    #include <process.h>
    #include <string.h>
    #include <conio.h>
    #include <dos.h>
    
     int main(void)
    {
        int j,i,k,start,sector;
        char buf[512],ch;
        clrscr();
        gotoxy(27,5);
        printf("In the name of God\n");
       gotoxy(22,7);
        printf("A S.Hossein hasan pour Project\n\n");
        printf ("         This program will show you the information stored on sector 0  of your hard Drive.\n              if you are ready press any key to continue ");
        for (k=0;k<=4;k++){
        //delay(50);
        printf(".");       }
        getch();
        sector =0;
        if (absread (0, 1, sector, buf)!=0)
    	{
        printf ("Error");
        exit(1);
           }
    
    
       printf("Read Successful!\n");
     // fptr=fopen("D:\temp.fds","w");
     // for (i=0;i<=1;i++)
       //	{
         printf("\n\n      Begining Of the readind Infos from floppy disk\n\n\n");
         printf("\a                  Phase One is now being started\n\n\n");
    		for(j=0;j<=2;j++)
    			printf("Assembly Jump COde is: &#37;#02x \n\n",buf[j]);
    
    			printf("OEM IS:  %7s\n\n",&buf[j]);
    	      for(j=11;j<12;j++);
    		       printf("Bytes per sector:  %d\n\n",buf[j]);
    
    		for(j=13;j<14;j++);
    		       printf("sector per cluster is    :   %d\n\n",buf[j]);
    
    		for(j=14;j<15;j++)
    		      printf("number of reserved sectors :   %d\n\n",buf[j]);
    
    		for(j=16;j<17;j++)
    		 printf("fat count :   %d\n\n",buf[j]);
    		printf("\a\aPhase 2:get ready for the next infos, when readly press enter\n\n\n\n\n");
    		getch();
    		delay(1000);
    
    		for(j=17;j<18;j++)
    		 printf("Max root entry is:   %d\n\n",buf[j]);
    
    
    	    for(j=19;j<=20;j++)
    		    printf("Total number of sectors in file system is:  %d\n\n\n ",  buf[j]);
    
    	    for(j=21;j<22;j++)
    		printf("Media Typeis:%#x\n\n",buf[j]);
    		printf("According to Microsoft 0xf8 for fixed disk and 0xf0 for removable disk\n\n\n");
    
    	    for(j=22;j<23;j++)
    		printf("Sectors allocated for each File allocation table is:   %d\n\n ",buf[j]);
    
    	   for(j=24;j<25;j++)
    		printf("Sectors per track is:  %d\n\n",buf[j]);
    
    	    for(j=26;j<27;j++)
    		printf("Number of head in storage device is:      %d\n\n",buf[j]);
    
    		printf("Phase 3: this is going to be the third part, get ready and press Enter\a\a\a\n\n\n");
    		getch();
    		delay(1000);
    
    	      // for(j=28;j<=31;j++)
    	       //printf("Number of sectors before start of partition(Not applicable for floppy)%d\n ",buf[j]);
    
    	      // for(j=32;j<=35;j++)
    	      // printf(" Number of sectors in file system(32-bit value, not applicable for floppy).%d\n",buf[j]);
    
    	       for(j=36;j<37;j++)
    	       printf("BIOS INT13h drive numberis:        %d\n\n",buf[j]);
    
    	       for(j=38;j<39;j++)
    	       printf("Extended boot signature is:       %#x\n\n",buf[j]);
    
    	       for(j=39;j<=42;j++)
    	       printf("Volume Serial Numberis  %d\n",buf[j]);
    
    	       for(j=43;j<=53;j++)
    	       printf("Volume label in ASCII %11s\n\n",buf[j]);
    
    
    	      for(j=54;j<=61;j++);
    	      printf("File System Type %c\n\n",buf[j]);
    	     printf("\a\a\a\aPhase 4:Now get ready for the boot sector infos \n\n\n");
    	     getch();
    
    	      printf(" Boot Code, otherwise contains information to replace disk( in Assembly codes)\n\n");
    	      for(j=65;j<=509;j++)
    		printf("%#x",buf[j]);
    
    		for(j=510;j<511;j++)
    		printf("\n\nSignature for File System is:     %#x\n\n\n",buf[j]);
    	     printf("       Programed By S. H Hasan Pour\n");
    	     printf("     Date: November 12th 2007 equals to 20 Aban 1386");
        getch();
        return 0;
    }

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. floppy disk filesystems
    By Leeman_s in forum Tech Board
    Replies: 5
    Last Post: 12-10-2003, 04:54 PM
  2. Going out of scope
    By nickname_changed in forum C++ Programming
    Replies: 9
    Last Post: 10-12-2003, 06:27 PM
  3. Formatting Output
    By Aakash Datt in forum C++ Programming
    Replies: 2
    Last Post: 05-16-2003, 08:20 PM
  4. Special Allegro Information
    By TechWins in forum Game Programming
    Replies: 12
    Last Post: 08-20-2002, 11:35 PM
  5. Information about disk
    By GaPe in forum C Programming
    Replies: 18
    Last Post: 08-05-2002, 06:48 AM