Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ANSI escape sequences on Windows #156

Open
catsanddo opened this issue Feb 14, 2024 · 0 comments
Open

ANSI escape sequences on Windows #156

catsanddo opened this issue Feb 14, 2024 · 0 comments
Assignees

Comments

@catsanddo
Copy link

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.

@philburk philburk self-assigned this Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants