Well, it doesn't matter if it is running in a DOS box on 98 or in true DOS mode, DJGPP creates true DOS programs. That's why I mentioned that allegro_message() does work in Windows (mingw32). For DOS, allegro_message() is just wrapping up a standard C function, so you might try something like flush(). Really that function was to make outputting quick and dirty text in Windows apps easy (not that it is hard anyway).
Anyway, that really isn't what Allegro is for. You should really put it into a graphic mode and use any of these:
(See docs for more.)
Here is a better test program:
// Initialize Allegro.
// Set the resolution to 640 by 480 with SAFE autodetection.
set_gfx_mode(GFX_SAFE, 640, 480, 0, 0);
// Installing the keyboard handler.
// Printing text to the screen.
textout(screen, font, "Hello World!", 1, 1, 10);
textout(screen, font, "Press ESCape to quit.", 1, 12, 11);
// Looping until the ESCape key is pressed.
poll_keyboard(); /* This may not be necessary, there is a flag to check. */
// Exit program.
// Some Allegro magic for platform compatibility and timing.