problem with Turbo C

Discussion in 'Programmer's Corner' started by bousyass, Aug 26, 2008.

  1. bousyass

    Thread Starter New Member

    Aug 26, 2008
    5
    0
    HI every one,
    i have a project with turbo C .i use the the bibli <graphics.h>,i have win xp pack 2.
    my problem is that if i use some graphical functions an error message appears
    ("Ntvdm illegal instruction " and "subsystems dos 16 bit") when executing the program .i have also tried the win 98 ,so it is the same problem
    i hope you can help me
    i need you to succed on my project
     
  2. Mark44

    Well-Known Member

    Nov 26, 2007
    626
    1
    You didn't give many details, such as how old your Turbo C compiler is. I suspect that the graphics routines use inline assembly with DOS and BIOS instructions (i.e., int 21h and int 10h functions). With the advent of 32-bit Windows operating systems such as Windows 95, 98, Me, and XP, these DOS and BIOS functions are no longer supported. They were supported in the 16-bit Windows versions, such as Windows 3.0 and 3.1.

    Mark
     
  3. CVMichael

    Senior Member

    Aug 3, 2007
    416
    17
    I did programming in Turbo C about 5 years ago (or more).

    I did a lot of graphics, but graphics.h was way to slow for me...

    You should learn to use 13h graphics, or VESA, using direct memory access.

    Here is an example I made in 13h with direct memory access:
    [C/C++] Advanced graphics in Mode 13h, Plasma
     
  4. bousyass

    Thread Starter New Member

    Aug 26, 2008
    5
    0
    thanks for your reply ,
    i use turbo c 2.01 and it is true it is supported by 16bit os.
    but if any one knows a solution for this problem
    because i have to do my project with xp or win 98 .
     
  5. RiJoRI

    Well-Known Member

    Aug 15, 2007
    536
    26
    Borland Turbo C++ v.5.5 is available for free. I do not know if it's usable in 32-bit OSs.

    Microsoft also has Visual C++ for free.

    You may be able to port your TC program to one of them, although you will most likely need to learn the graphics commands for the newer versions.

    --Rich
     
  6. bousyass

    Thread Starter New Member

    Aug 26, 2008
    5
    0
    thank you rijori
    but ihave to do my project with turbo c,
    and if i port my program to turbo c++ ,it will be a tc++ program and not a tc program
    but i want to know if there is another graphic's biblio that i can add it to TC,
    and how i can add a biblio in TC
     
  7. Mark44

    Well-Known Member

    Nov 26, 2007
    626
    1
    By and large, C++ is a superset of C, which means you can write programs in C or C++ using Turbo C++ or many other C++ compilers.

    I'm sure that if you search, you will find other graphics libraries, the usual term, some for sale, and some that are open source.
     
  8. CVMichael

    Senior Member

    Aug 3, 2007
    416
    17
    I don't understand why my post is ignored...

    In the zip attached in that thread, you can find code for 13h graphics, and that does not need any external libraries since it's direct memory access.

    I also have (I hope I still have it) code for VESA graphics mode if you need...
     
  9. bousyass

    Thread Starter New Member

    Aug 26, 2008
    5
    0
    sorry Michel,your post isn't ignored,
    but i don't know the 13h graphics mode .
    i will try to do some research about it .
    and i wonder if any body has an URL for downloading turbo c ++ v 5.5
    thanks
     
Loading...