Thread: dos.h

  1. #1
    Registered User
    Join Date
    Apr 2005
    Posts
    6

    dos.h

    I have M.visual C++ 6.0 compiler. I use dos.h in any program, i get some error as REGS unidentified structer.

    How can i use dos.h? Can you help me?

    A part of program :
    union REGS r;

    r.h.ah = 0;
    r.h.al = 0x3;
    int86(0x10, &r, &r);


    Regrads,

  2. #2
    Registered User
    Join Date
    Jan 2005
    Posts
    847
    MSVC 6 is a Win32 compiler and won't let you compile DOS programs.

  3. #3
    ---
    Join Date
    May 2004
    Posts
    1,379
    What's a dos?

  4. #4
    Registered User
    Join Date
    Jan 2005
    Posts
    847
    Quote Originally Posted by sand_man
    What's a dos?
    MS-DOS

  5. #5
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    > How can i use dos.h? Can you help me?
    Either get an old compiler (not recommended), or learn a new API, one which is more appropriate to the OS and compiler you're actually using.
    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. #6
    Registered User
    Join Date
    Apr 2005
    Posts
    6
    Hi,

    In fact, i want to know drawing a line, putting pixel etc. on monitor. how can i do this?

    Regrads,

  7. #7
    ---
    Join Date
    May 2004
    Posts
    1,379
    *Slaps Quantum1024

    Sorry if that wasn't sarcastic enough for you

  8. #8
    Registered User
    Join Date
    Jan 2005
    Posts
    847
    haha Quantum1024 slaps himself

  9. #9
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    I think you could use RHIDE, which is a freeware compiler and has DOS.H.

  10. #10
    Registered User
    Join Date
    Jan 2005
    Posts
    847
    Quote Originally Posted by dwks
    I think you could use RHIDE, which is a freeware compiler and has DOS.H.
    RHIDE is an IDE, you are thinking of DJGPP wich includes RHIDE

  11. #11
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    Sorry, yes, I meant DJGPP. I just call it RHIDE.

  12. #12
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    > In fact, i want to know drawing a line, putting pixel etc. on monitor. how can i do this?
    You use a graphics library.

    Which graphics library you use is up to you, but things are considerably more complicated than the old DOS days of the likes of BGI from Borland say.

    Perhaps the simplest is http://www.libsdl.org/index.php
    Be sure to read the FAQ on how to compile with VC++
    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.

  13. #13
    Registered User
    Join Date
    May 2005
    Posts
    50
    What you should do is download Dev-C and copy ming32 (looks like ming32), out of the dev-c/include, and then put that into your msc6/include, and the dos.h will work.

  14. #14
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    I think you need a .lib file too, and not just a .h file. The .h file just contains prototypes, and not code.

    Does Dev-C++ have dos.h? I didn't know that.

  15. #15
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    Since each compiler has different header files, library files, object file formats blah blah blah, even if that happens to work for you, it's far from being good advice.

    Just let go of your old DOS OS and move with the times to something more modern.
    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.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. dos.h in VC++
    By fnoyan in forum Windows Programming
    Replies: 2
    Last Post: 09-29-2005, 02:02 PM
  2. Problems with dos.h
    By Kaelin in forum C++ Programming
    Replies: 7
    Last Post: 02-04-2005, 01:41 PM
  3. dos.h
    By hick.hack in forum C Programming
    Replies: 2
    Last Post: 02-24-2003, 03:30 PM
  4. dos.h files
    By loopers in forum C Programming
    Replies: 3
    Last Post: 08-24-2002, 10:45 AM
  5. where do i get dos.h???
    By Quin in forum C Programming
    Replies: 1
    Last Post: 01-13-2002, 05:05 PM