Question about mode 13h

This is a discussion on Question about mode 13h within the C++ Programming forums, part of the General Programming Boards category; i'm using microsoft visual c++ as a compiler in xp and i'm wondering about the dos.h include file with it. ...

  1. #1
    Registered User
    Join Date
    Dec 2005
    Posts
    13

    Question about mode 13h

    i'm using microsoft visual c++ as a compiler in xp
    and i'm wondering about the dos.h include file with it.
    plenty of graphics tutorials require the use of the

    far

    keyword

    but my compiler gives an error. is there any way arround this?

    please help

  2. #2
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,074
    There might be if you perhaps told us how you're using it and the error you're getting.

    Do you think that they created the far keyword to do nothing but give you a compiler error? You have to tell people more than "I found a keyword and I'm using it in a program and getting an error. Anyone know why?"
    Sent from my iPadŽ

  3. #3
    Registered User
    Join Date
    Aug 2005
    Posts
    1,267
    Quote Originally Posted by myk_raniu
    i'm using microsoft visual c++ as a compiler in xp
    and i'm wondering about the dos.h include file with it.
    plenty of graphics tutorials require the use of the

    far

    keyword

    but my compiler gives an error. is there any way arround this?

    please help
    forget it. that file is for 16-bit MS-DOS compilers such as Turbo C and MSVC 1.62C. It is not implemented by any 32-bit compiler because the os will not all normal programs direct access to hardware and io ports. The graphic tutorials you mentioned require (probably) Turbo C or Turbo C++.

    If you want to do graphics in MS-Windows world then you need to use win32 api functions. Good luck.
    Last edited by Ancient Dragon; 12-09-2005 at 01:29 PM.

  4. #4
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,742
    > plenty of graphics tutorials require the use of the
    Ah, you mean the fossil remnants from 20 years ago.

    > but my compiler gives an error. is there any way arround this?
    Yes, join this century.

    There's plenty to read on the graphics forum, including links to many graphics libraries which you can download to generate graphics for the modern era.

    LibSDL and Allegro are popular choices around these parts.
    Later on, most people go with either DirectX or OpenGL.

  5. #5
    Supermassive black hole cboard_member's Avatar
    Join Date
    Jul 2005
    Posts
    1,709
    Haafs Game Engine is pretty good. It provides another layer of abstraction (between you and DirectX) and makes programming games (etc) much simpler:

    http://hge.relishgames.com/

    Failing that, Open Watcom is a good choice as it can compile to multiple platforms including 16bit DOS, and comes with some pretty neat tools (& IDE).
    Good class architecture is not like a Swiss Army Knife; it should be more like a well balanced throwing knife.

    - Mike McShaffry

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. console mode and service mode
    By George2 in forum C# Programming
    Replies: 0
    Last Post: 06-01-2008, 02:42 AM
  2. Pong is completed!!!
    By Shamino in forum Game Programming
    Replies: 11
    Last Post: 05-26-2005, 11:50 AM
  3. Grayscale and mode 13h
    By SMurf in forum A Brief History of Cprogramming.com
    Replies: 18
    Last Post: 05-08-2002, 01:36 PM
  4. free() usage
    By pdstatha in forum C Programming
    Replies: 5
    Last Post: 03-13-2002, 09:28 AM
  5. problem going into mode 13h
    By ArseMan in forum C++ Programming
    Replies: 5
    Last Post: 08-31-2001, 05:53 PM

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