Tested with GCC 1.30 Tool#2 patchlevel 5 and GCC 2.6.3 Lv.3 Exp.20.

Build with either:

gcc hello.c -ldos -o hello.x
gcc2 hello.c -ldos -o hello.x

Code:

#include <doslib.h>

void main(int argc, char *argv[])
{
        _PRINT("Hello world!\n");
}