Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

DOS Programs Crash When Drawing Images

I use C++, mode 13h, large memory. The DOS .exe

performs an illegal operation everytime I try to

draw or animate images, no matter which drawing function. More so with bigger images, and faster animation.


Comments

  • : I use C++, mode 13h, large memory. The DOS .exe

    : performs an illegal operation everytime I try to

    : draw or animate images, no matter which drawing function. More so with bigger images, and faster animation.


    You probably have some problems with copying memory to wrong locations. Maybe you're mixing your near and far pointers?


    -Xotor-





  • : : I use C++, mode 13h, large memory. The DOS .exe

    : : performs an illegal operation everytime I try to

    : : draw or animate images, no matter which drawing function. More so with bigger images, and faster animation.


    : You probably have some problems with copying memory to wrong locations. Maybe you're mixing your near and far pointers?


    : -Xotor-


    Maybe. I don't use near or far, mainly because none of my books teach what these keywords do. I know they're used to declare near or far pointers, but what's the difference? Are pointers assumed near or far if not specified? The *VGA pointer is not declared far, and many game programmers use far in this case. Is this why?


  • : : : I use C++, mode 13h, large memory. The DOS .exe

    : : : performs an illegal operation everytime I try to

    : : : draw or animate images, no matter which drawing function. More so with bigger images, and faster animation.


    : : You probably have some problems with copying memory to wrong locations. Maybe you're mixing your near and far pointers?


    : : -Xotor-


    : Maybe. I don't use near or far, mainly because none of my books teach what these keywords do. I know they're used to declare near or far pointers, but what's the difference? Are pointers assumed near or far if not specified? The *VGA pointer is not declared far, and many game programmers use far in this case. Is this why?


    Are you using TC++? That's really the only compiler that really uses far pointers much. It's so old that the limit for program memory is 64kb which consequently in this day and age is not much.


    Maybe use a more advanced C/C++ DOS compiler like DJGPP (www.delorie.com/djgpp/) it's 32-bit and also makes use of a swap file and/or DPMI for memory.


    Besides DJGPP can run the Allegro library which is one of the best graphics libraries for learning and doing advanced programming too.


    Allegro is at http://www.talula.demon.co.uk/allegro/


    -Xotor-


Sign In or Register to comment.