VIO Tutorial (Hello, World)

By Johann Oskarsson

This is a short tutorial on writing text to the console, the basics, and then with some color and cursor positioning. VIO is short for Video Input/Output, and is the console interface to eCS.
 * All examples have been compiled with OpenWatcom.

The following is a hello, world application for the eCS VIO API. This can be compiled with OpenWatcom 1.3, as such: WCL386 vio.cpp, assuming the file name of vio.cpp.

Because of the non-standard style comments (double slash format) the option for the IBM C compiler should be: icc /Ss+ vio.c

Character Attributes

 * Lower Nibble (Character)
 * Bit 0: Blue (0x01)
 * Bit 1: Green (0x02)
 * Bit 2: Red (0x04)
 * Bit 3: Intensity (0x08)
 * Higher Nibble (Background)
 * Bit 4: Blue (0x10)
 * Bit 5: Green (0x20)
 * Bit 6: Red (0x40)
 * Bit 7: Blink/Intensity (0x80) (VioSetState)