Jump to content
  • Advertisement
Sign in to follow this  
Patroclos

DEV C++ and GCC

This topic is 4757 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hi For a few years I have used watcom for my DOS games but after I have started using C++ for my applications, I thought that the time to change the compiler has come. I decided to use GCC but installing the compiler seemed a little confusing. So I have finally decided to use DEV C++ but I wonder if DEV C++ uses exactly the same format, for instructions both in inline assembly and c++, with gcc? if so I'll use DEV C++ although I heard that it is a little slow compiler.. if anyone can clear the clouds in my mind about DEV C++, I'll be very happy thanks

Share this post


Link to post
Share on other sites
Advertisement
GCC has a port to Windows/Win32 called MinGW. MinGW has an IDE called Dev-C++.

EDIT: Beaten by twenty seconds. Pfah.

Share this post


Link to post
Share on other sites
Yes, Dev-Cpp comes with MinGW which is "GCC for Windows", if you want to stick to DOS programming, you could maybe replace it with DJGPP.

Compilation is slower than GCC on Linux, but its nothing to really put you off.

Share this post


Link to post
Share on other sites
oh I see, thanks! then there is no problem for using it I think..
But I have one last question, I have tried to switch to graphic mode(mode 13) with DEV C++, but I couldn't find how to call interrupts with it. I have searched the internet for hours and found nearly everything about inline assembly in gcc but nothing about calling interrupts. By the way, because DEV C++ uses a port to windows does it restrict me from calling interrupts?

Share this post


Link to post
Share on other sites
There is a way to do that (not sure though)
but thought I should mention that maybe you should look into SDL or something
to do you graphics.

Share this post


Link to post
Share on other sites
Quote:
Original post by Patroclos
By the way, because DEV C++ uses a port to windows does it restrict me from calling interrupts?

The IDE (Dev C++) and the compiler (GCC) don't stop you using interrupts, but Windows might do. The DOS box you get in windows (the command prompt) is only an emulation of DOS, so even though it provides you with a DOS-like programming interface, some things that used to work in true DOS will not work, because Windows is trying to protect the system from you bringing it down. I don't know exactly what you can still do and what not, you might want to just do some tests and see what's possible.

Share this post


Link to post
Share on other sites
Quote:
Original post by Patroclos
oh I see, thanks! then there is no problem for using it I think..
But I have one last question, I have tried to switch to graphic mode(mode 13) with DEV C++, but I couldn't find how to call interrupts with it. I have searched the internet for hours and found nearly everything about inline assembly in gcc but nothing about calling interrupts. By the way, because DEV C++ uses a port to windows does it restrict me from calling interrupts?


If you want to code for DOS, then you will definitelly need to use DJGPP, if I understand correctly Windows will not allow you to directly call interrupts.

I've never done it, but I think you should be able to install Dev-CPP without the compiler and then install DJGPP in the place where MinGW goes.

Then I'd assume, you just call asm("int $0x10\n\t");

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!