FreeDOS programming - Compiling with GCC

preview_player
Показать описание
Let's look at how to compile C programs using GCC IA-16. This is a DJGPP/MS-DOS-hosted (32-bit x86) port of the GNU C and C++ compiler toolchain to the IA-16 target (16-bit Intel x86), by Rask Ingemann Lambertsen, Andrew Jenner, TKChia, and various contributors.

*I used the -O6 compiler optimization flag. Oops. GCC doesn't have -O6, but anything above level 3 (highest optimization) should be the same as -O3.

Download GCC IA-16 here:

Here's the FreeDOS programming video I mention in the video:

Visit our website:

Join us on Facebook:

Follow us on Twitter:

Consider supporting me on Patreon:
Рекомендации по теме
Комментарии
Автор

I16GCC is really intriguing, although I'm having trouble compiling an INF tool I wrote with only standard libraries; it always complains about an undefined reference to '_link', whatever that means. So far I expect to use it in conjunction with another program I'll write to automate the installation of old versions of DOS and Windows on my retro hardware. Once that's out of the way, I think it could have potential as a highly flexible setup program for FreeDOS - unattended scripts, installation over FTP, user-customized configurations replicated to potentially hundreds of systems out of the box...

I don't know if some of those things are already available in FreeDOS as I haven't used it much, but I'd be very much willing to make FreeDOS my development platform of choice for all these DOS programs I want to write in the future.

Korstre
Автор

I like the videos

not really boring but doesn't gloss over the pertinent details

Decco
Автор

Nicely done, you just earned another subscriber

fontanot
Автор

I'm glad you posted this video. I have a question concerning optimization of freedos vs dos7.1. Of the two, which is more optimized? The core couldn't be that much different. But your investment into the code may whole heartedly different. Also, does freedos boot with the GPT?

KJJHN
Автор

I found this video but I have a question about C++ standards in supported FreeDos development packages.

From what I understand, most C++ compilers support only C++98. Digital Mars C++ compiler as support for 0x.

Is there any that supports C++11 or more? Any way to cross compile to DOS (for i386) with current GCC (or llvm or any other alternative)?

edbrito-swdev
Автор

Is there anyway to install & run Borland Turbo C++ IDE in FreeDOS. I can do this on DOSBox, but the FreeDOS FDIMPLES package manager (even with Bonus CD) doesn't have it. Is there a way to side load the IDE from the downloaded installation files?
I'm running FreeDOS in QEMU VM on Linux..

roshlew
Автор

"stdio.h: No such file or directory"

What?

IndellableHatesHandles
Автор

This is great! Is there an easy way to change text output color using GCC? I thought ANSI escape codes might work (eg. printf("\e[31mTest") ) but no luck.

jasonpnc
Автор

Cool, so will any program you create also need that environment variable to be set?

clasqm
Автор

Hey there, I installed FreeDOS on VirtualBox, and I'm not seeing any i16-gnu, or i16gnu, or anything like that. I've installed everything in the development section from "F-dimples" and it came with a couple different C/C++-related components, but I'm afraid either the package you're telling us to use is not available to/visible on/compatible with VirtualBox, or there's someplace else where I need to go file-fishing, or maybe (I doubt it but potentially) this could be a bit out of date. Any insights on how to get my setup to match yours? Thanks. :)

migueln
Автор

Why was hello.exe a much larger resulting file than cat.exe?

cheesedeath
Автор

Any chance for GUI review in FreeDOS? It will be interesting. Because
people think that DOS it is just black screen + keyboard & letters.

ИгорьЧебаненко-ня
Автор

Do these programs work in ms dos? Or only freedos?

atsz.
Автор

How can I port GCC 10 or GCC 11 to FreeDOS? I need to use that for supporting my fast_io library on DOS.

coshvjicujmlqef