cd-rom tray open/close in turbo C/C++

This is a discussion on cd-rom tray open/close in turbo C/C++ within the A Brief History of Cprogramming.com forums, part of the Community Boards category; I need to write a program in Turbo C/C++ to make an MS-DOS executable that can open or close the ...

  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    1

    Question cd-rom tray open/close in turbo C/C++

    I need to write a program in Turbo C/C++ to make an MS-DOS executable that can open or close the CD-ROM drive tray. So far I can only detect for it... Also , I do not want to use any other APIs or compilers. My code so far....

    #include <stdio.h>
    #include <conio.h>
    #include <dos.h>
    void main()
    {
    union REGS r;
    clrscr();
    r.x.ax=0x1500;
    r.x.bx=0;
    int86(0x2f,&r,&r);
    if(!r.x.bx) printf("\n MSCDEX NOT INSTALLED OR NO CD-DRIVE");
    else printf("\n MSCDEX INSTALLED OR CD-DRIVE FOUND");
    getch();
    }

    Any help would be much appreciated. Thanks.

  2. #2
    Registered User Vber's Avatar
    Join Date
    Nov 2002
    Posts
    807
    Read this . Your question is OS specific, ask in DOS board, you'll find answer faster.

  3. #3
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,701
    Then read this.

    gg

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. GTK+ Gnome desktop system tray app problem
    By BobS0327 in forum Linux Programming
    Replies: 2
    Last Post: 04-01-2006, 09:54 PM
  2. Nested for loop...search & display a list within a list
    By chadsxe in forum C++ Programming
    Replies: 13
    Last Post: 07-20-2005, 02:34 PM
  3. HUGE fps jump
    By DavidP in forum Game Programming
    Replies: 23
    Last Post: 07-01-2004, 11:36 AM
  4. CD rom troubles...
    By Shadow in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 11-08-2003, 10:56 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21