INT BIOS

Bonjour,

J'aimerai savoir si il existe une Interruption BIOS dédiée aux opérations sur CD ROM ?

Merci d'avance.

1 réponse

  1. Modérateur
    L'interruption 21 permet de lire les fichiers, comme pour un disque normal.

    Après, je ne me souviens plus...

    Tu pourra peut-être trouver ça là:
    http://www.gstation.ru/dochard.htm
    0
    1. Bonjour,

      OK,

      Mais je souhaite lire le cd rom secteur par secteur (cf Interrupt 13h) ...
      Exemple :
      #include <dos.h> /* for int86x(), macros FP_SEG() and
      FP_OFF(), segread(), union REGS
      and struct SREGS */
      #include <stdio.h> /* for printf() */
      #include <stdlib.h> /* for _doserrno */

      char buf [1024];

      main()
      {
      char far * bufptr;
      union REGS inregs, outregs;
      struct SREGS segregs;
      segread(&segregs); /* set the segment registers */
      bufptr = (char far *) buf; /* need a far pointer to 'buf' */
      segregs.es = FP_SEG(bufptr); /* ...to set the address of */
      inregs.x.bx = FP_OFF(bufptr);/* ...'buf' for the BIOS */

      inregs.h.ah = 2; /* set the BIOS function number*/
      inregs.h.al = 1; /* set # of sectors to read */
      inregs.h.ch = 0; /* set track # of boot sector */
      inregs.h.cl = 0; /* set sector # of boot sector */
      inregs.h.dh = 0; /* set disk side number */
      inregs.h.dl = 0; /* set drive number to A: */
      int86x(0x13, &inregs, &outregs, &segregs); /* read sector */

      if (outregs.x.cflag)
      printf("Lecture disque -ERROR #%d: status = %d, # sectors read = %d\n",
      _doserrno, outregs.h.ah, outregs.h.al);

      }
      Sur lecteur disquette, ça marche nickel, mais HDD et autres cd rom ....

      @+
      0