FDOS / fdisk

Fixed Disk Setup Program - manages partitions using the MBR partitioning scheme
GNU General Public License v2.0
44 stars 13 forks source link

Consolidate text output routines #24

Closed boeckmann closed 1 year ago

boeckmann commented 1 year ago

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.txt

tnyprntf could be used as a base.

boeckmann commented 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.

boeckmann commented 1 year ago

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.

boeckmann commented 1 year ago

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.