title: Creating Inline Assembly code(TASM) in Turbo C++ 3.0 from a documentation file
body: <p>I am trying to create a C program in Turbo C++ 3.0 that will work on MS-DOS 6.22 and need to access CD-ROM using MSCDEX and interrupts, to play tracks on it. </p>
  
  <p>Turbo C wasn't a problem for me and I already did it and it worked very well, but now I'm trying to use <a href="http://www.flipcode.com/documents/cdromfaq.txt" rel="nofollow">this</a> documentation to get the name of the CD-ROM device driver.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;dos.h&gt;
  
  void main(){
      clrscr();
      CDname();
  
      printf("\nPress a button to exit the program.");
      getch();
  }
  
  void CDname(){
      char myArray[15];
      int i;
  
      asm{
          mov AX,1501H
          les BX,DWORD PTR[myArray]
          int 2FH
      }
  
      for(i=0; i &lt; 15; i++){
          printf("\nArray = %c", myArray[i]);
      }
  }
  </code></pre>
  
  <p>And here is a little part of a documentation that I'm trying to follow:</p>
  
  <pre><code>How do I get the name of the CD-ROM device driver?
  
        First, you need to know how many CD-ROMs you have (see question
        2.01, How many CD-ROMs are present?). You need a block of memory
        whose size, in bytes, is 5 times the number of CD-ROMs present.
        This code will fill that array:
  
        mov  AX,1501H
        les  BX,DriverArray
        int  2FH
  
        Each 5-byte element in the array consists of the drive's subunit
        number (a CD-ROM device driver may support several drives as
        subunits), followed by the address of the drive's device driver.
        The filename is 10 bytes into the device driver. The filename is
        at most 8 bytes long, and if less than 8 bytes, is terminated by
        a space (20H).
  </code></pre>
  
  <p>The problem is that I need to put CD-ROM name inside myArray but in this way I'm not pretty sure of what I am doing. Someone can help me to do it? </p>
  
  <p>Thanks in advance!</p>