Currently sdTerminalOut parses console codes manually and uses win32 API functions such as SetConsoleCursorPosition to perform certain actions. The issue is that a very limited number of codes are actually supported. It is impossible to implement a word such as at-xy from within pForth without supporting more codes.
Fortunately Windows has started supporting virtual terminal sequences natively and now recommends them over using native console API functions. There is some code required to initialize this feature (shown at the bottom of this page), but it could simplify the task of parsing these codes by hand while also allowing for more escape sequences to be used by user code.
I believe that using this new feature over the old API would be preferable.
Currently
sdTerminalOut
parses console codes manually and uses win32 API functions such asSetConsoleCursorPosition
to perform certain actions. The issue is that a very limited number of codes are actually supported. It is impossible to implement a word such asat-xy
from within pForth without supporting more codes.Fortunately Windows has started supporting virtual terminal sequences natively and now recommends them over using native console API functions. There is some code required to initialize this feature (shown at the bottom of this page), but it could simplify the task of parsing these codes by hand while also allowing for more escape sequences to be used by user code.
I believe that using this new feature over the old API would be preferable.