Skip to content

ANSI escape sequences on Windows #156

Open
@catsanddo

Description

@catsanddo

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.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions