Les disquettes...

Le but de ce bout de code est de tester la disponibilité du lecteur de disquette. En effet, avant de tenter de lire ou écrire sur une disquette, il est nécessaire qu'elle soit présente dans le lecteur, et qu'elle soit disponible.

  1. #include <stdio.h>
  2. #include <bios.h>
  4. void main (void)
  5. {
  6. char buffer[8192];//tentative de lecture de la tête 1, piste 1, secteur 1
  7. if (biosdisk(2,0,1,1,1,1,buffer))
  8. {
  9. printf("Lecteur indisponible\n");
  10. }
  11. else
  12. {
  13. printf("Lecteur disponible\n");
  14. }
  15. }

English translation

You have asked to visit this site in English. For now, only the interface is translated, but not all the content yet.

If you want to help me in translations, your contribution is welcome. All you need to do is register on the site, and send me a message asking me to add you to the group of translators, which will give you the opportunity to translate the pages you want. A link at the bottom of each translated page indicates that you are the translator, and has a link to your profile.

Thank you in advance.

Document created the 29/12/2002, last modified the 26/10/2018
Source of the printed document:https://www.gaudry.be/en/c-lire-disquette.html?_escaped_fragment_=

The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.