On Tuesday 23 October 2012 00:19, in comp.lang.c,
wrote:
> Hello folks.
>
> According to the 1990 C standard (which is what I wish to code to), there
> is no "escape" character. So the only way to produce an escape character
> is to harcode its ASCII or EBCDIC value (x'1b'/x'27' respectively). I
> don't like doing that. I want to be able to write an editor like
> micro-emacs without having to have an #ifdef EBCDIC.
>
> My conclusion is that I need to create a new type of terminal.
Having written code on EBCDIC-based mainframe systems for many years, and
with both hardcopy and video terminals for even more years, I gotta say,
you /are/ ambitious, aren't you.
Some things to think about (none of them C related)
1) EBCDIC is a "family" of related but slightly-differing charactersets.
While I believe that most of the EBCDIC control characters are common to
all of the EBCDIC charactersets, I don't remember the details. You should,
perhaps, specify /which/ EBCDIC you intend to deal with, and/or research to
determine that the control characters you select are common to the EBCDIC
charactersets you intend to work with.
2) EBCDIC terminals don't act like ASCII terminals. IBM defined them as
a "block oriented" device, taking a specific set of (already predefined)
commands, that are /nothing/ like the ANSI escape sequences you already
know. On such a terminal, each printing position is paired with a second,
control, octet, which governs the form and function of that position
(readable, writable, colour, intensity, etc.) Terminals are read and
written screen at a time (up to 4000 characters at a time (80x25x2),
including the non-data "status line", depending on those paired control
bytes). The equivalent to the ANSI "clear screen" escape sequence is a
full screen block (80x25) of non-rereadable blanks.
3) On most ASCII-based terminals, the ASCII "form feed" (FF) character will
clear the screen. It does not guarantee the cursor position. Alternatively,
a series of ASCII "line feed" characters will also clear such a screen,
again without guarantee of cursor position. Neither is acceptable on a
hardcopy terminal.
4) I seriously doubt that you will actually "create a new type of terminal".
Is hardware your specialty? And do you have a market? You probably mean
that you want to write some sort of "terminal emulator". This isn't easy,
but it isn't difficult either. You /do/ need a hardware terminal to target
to; you need something to display on, and you have to build your emulator
to interpret input and write or read on the hardware.
5) This seems all to 1990's for me. You are running at least 30 years behind
the times; this has all been done before, many times over. Perhaps you need
to look into prior art.
HTH
--
Lew Pitcher
"In Skills, We Trust"