Closed boeckmann closed 1 year ago
As a first step I will implement a simple state-machine based putc like function, which handles ansi escape sequences. This can later be integrated in tnyprntf to enable colored text output and cursor positioning. as a last step all output functions used in the source have to be converted to the new function.
This is now imlemented in ANSICON.C. Needs some speed improvement to run good on an 8086, and monochrome support must be implemented. Switch from INT10 routines to direct IO should be sufficient to achive the speed I intend to get.
There are still wrapper functions like Color_Printf etc. left. They all utilize on ANSICON now. Not worth the effort to eliminate these wrapper functions.
Currently there is a zoo of output routines that is a bit confusing. Also there are hardcoded cursor positioning calls, which is bad for localisation.
The idea is to replace output functions with ONE function called
ansi_printf
(yet to be implemented if not found somewhere else) that understands a subset of the ansi sequences described by https://github.com/Microsoft/MS-DOS/blob/master/v2.0/source/ANSI.txttnyprntf
could be used as a base.