extended ANSI escapes

13 views
Skip to first unread message

muta...@gmail.com

unread,
Feb 17, 2022, 3:53:58 AM2/17/22
to
Today I fixed the remaining important problem that was
stopping me from using a version of micro-emacs that
uses ANSI escape sequences under Windows (and thus
PDOS). I have replaced the micro-emacs executable that
directly wrote to 0xb8000 with this new one. That means
I no longer care if a PC manufacturer doesn't provide a
video card at 0xb8000. So long as their BIOS knows what
to do, even if it is in graphics mode, PDOS and micro-emacs
and other text-mode applications will work fine, which is
all I care about.

However, in the process I have lost ctrl-pagedown which
I use to get to the end of the file. Ideally ctrl-left/right/pgup/pgdwn
would exist.

As luck would have it, the escape sequences have some gaps:

https://en.wikipedia.org/wiki/ANSI_escape_code

e.g. between F5 and F6 there is ESC [ 16 ~

Any reason why I shouldn't use 4 of those unused escape
sequences in both PDOS and micro-emacs?

Or is there a better way of doing it?

I may end up slightly enhancing C90 and slightly enhancing
ANSI X3.64 as part of my PDOS development environment.

BFN. Paul.

wolfgang kern

unread,
Feb 17, 2022, 9:35:51 AM2/17/22
to
Why bother with ESC-codes? isn't 1B 26 xx long-winded boring?

my key-decoder can produce 256 single byte "almost normal ASCII"
within my Set1 (simple lookup translate):
20..7F as defined by ASCII and 80 for the EURO-sign
07,08,09,0F,0A,0D for ASCII-defined controls BELL,BS,TAB,BTAB,LF,CR
other 00..1F as CTRL @,A..Z,[|] (1B fore ESC-key)
81..8c for F1..F12 8d,8e,8f for num-lock caps-lock scroll-lock
90..99 all cursor keys 9a.9b,9c,9d for prtscrn,sysreq,pause,break
A0...Af all from the numblock (easy transform into Numbers by AND)
B1...BC ALT F1..F12
C1...CC CTL F1..F12
D0...D3 windoze keys
SHIFT ALT and CONTROL keys don't produce bytes, they just set flags.
and all not listed above got a special meaning in my OS.

my other LUTs can produce language specific bytes or game patterns.
__
wolfgang

muta...@gmail.com

unread,
Feb 17, 2022, 1:56:00 PM2/17/22
to
Elsewhere, someone suggested trying "cat -v" in Unix,
and now I have:

ctrl-pagedown: ESC [ 6;5~
ctrl-pageup: ESC [ 5:5~

ctrl-left: ESC [ 1;5 D
ctrl-right: ESC [ 1;5 C

BFN. Paul.
Reply all
Reply to author
Forward
0 new messages