A salutary tale:
Many years ago I wrote a full-screen TUI program, with pretty colours, arrows, and line/box drawing, for a business client to run on MS-DOS.
Having done this sort of thing in the Unix world, I made it draw its TUI using character output via the ANSI.SYS CON device, the high-level console API. This was slow. One could watch it visibly drawing the entire screen at startup.
I did a version that used the underlying PC firmware API for writing to the display adapter, the low-level console API. This was significantly faster, although it still flickered a little.
I did a version that accessed the video memory directly. This was blazingly fast compared to both of the others, but I had to worry about MDA versus CGA/VGA (and VGA's mono mode).
#ComputerProgramming #TUIs #SoftwarePortability #ConsoleAPI
[Continued…]