Did terminals (e.g. VT100) require a terminal driver on the host computer?
I'm wondering if terminals (like, e.g. the VT100) required the installation of a driver on the host system in order to work with that host?
I looked at the documentation of the VT102, and there is nothing mentioned about a driver.
I imagine that the setup of a terminal connected to an application on a host computer looks something like this:
The terminal is connected over an RS-232 communication line to the computer (of course, there might also be two modems and a public carrier line between the two RS-232 interfaces, but it shouldn't matter here).
On the host computer is the application that must get its input from the terminal, and send its output to the terminal. To this end, the application must somehow be connected to the RS-232 interface to which the terminal is connected. In the end, the application must read characters from this interface and write characters to it.
Now the question is, what is between the application and the RS-232 interface?
- Is there nothing at all, and the application must be programmed to directly listen on and write to the RS-232 interface (through the kernel)?
- Is there a driver for this specific terminal, and the application communicates with this driver?
- Is there a generic "terminal controller" in the kernel that works with all terminals and provides a common API for applications (like the TTY subsystem in UNIX)?
In other words, if you write a terminal application, what is the mechanism that you get notified about incoming data from the terminal, and how do you write output to the terminal?
In the latter two cases, the driver or controller could do some processing on the input, like line editing, and only send full lines to the application (as it is done by TTY in UNIX). This would offload a lot of complexity from the application.
The protocol that allows applications to control terminals consists usually just of characters (control characters and escape sequences intermixed with display characters). Furthermore, if we assume that all terminals use the ANSI escape sequences (from the VT100 onwards), the same "control language" works with every terminal. So, I'm not sure if each terminal really needs a dedicated driver on the host computer.
terminal rs232 driver vt100
New contributor
add a comment |
I'm wondering if terminals (like, e.g. the VT100) required the installation of a driver on the host system in order to work with that host?
I looked at the documentation of the VT102, and there is nothing mentioned about a driver.
I imagine that the setup of a terminal connected to an application on a host computer looks something like this:
The terminal is connected over an RS-232 communication line to the computer (of course, there might also be two modems and a public carrier line between the two RS-232 interfaces, but it shouldn't matter here).
On the host computer is the application that must get its input from the terminal, and send its output to the terminal. To this end, the application must somehow be connected to the RS-232 interface to which the terminal is connected. In the end, the application must read characters from this interface and write characters to it.
Now the question is, what is between the application and the RS-232 interface?
- Is there nothing at all, and the application must be programmed to directly listen on and write to the RS-232 interface (through the kernel)?
- Is there a driver for this specific terminal, and the application communicates with this driver?
- Is there a generic "terminal controller" in the kernel that works with all terminals and provides a common API for applications (like the TTY subsystem in UNIX)?
In other words, if you write a terminal application, what is the mechanism that you get notified about incoming data from the terminal, and how do you write output to the terminal?
In the latter two cases, the driver or controller could do some processing on the input, like line editing, and only send full lines to the application (as it is done by TTY in UNIX). This would offload a lot of complexity from the application.
The protocol that allows applications to control terminals consists usually just of characters (control characters and escape sequences intermixed with display characters). Furthermore, if we assume that all terminals use the ANSI escape sequences (from the VT100 onwards), the same "control language" works with every terminal. So, I'm not sure if each terminal really needs a dedicated driver on the host computer.
terminal rs232 driver vt100
New contributor
add a comment |
I'm wondering if terminals (like, e.g. the VT100) required the installation of a driver on the host system in order to work with that host?
I looked at the documentation of the VT102, and there is nothing mentioned about a driver.
I imagine that the setup of a terminal connected to an application on a host computer looks something like this:
The terminal is connected over an RS-232 communication line to the computer (of course, there might also be two modems and a public carrier line between the two RS-232 interfaces, but it shouldn't matter here).
On the host computer is the application that must get its input from the terminal, and send its output to the terminal. To this end, the application must somehow be connected to the RS-232 interface to which the terminal is connected. In the end, the application must read characters from this interface and write characters to it.
Now the question is, what is between the application and the RS-232 interface?
- Is there nothing at all, and the application must be programmed to directly listen on and write to the RS-232 interface (through the kernel)?
- Is there a driver for this specific terminal, and the application communicates with this driver?
- Is there a generic "terminal controller" in the kernel that works with all terminals and provides a common API for applications (like the TTY subsystem in UNIX)?
In other words, if you write a terminal application, what is the mechanism that you get notified about incoming data from the terminal, and how do you write output to the terminal?
In the latter two cases, the driver or controller could do some processing on the input, like line editing, and only send full lines to the application (as it is done by TTY in UNIX). This would offload a lot of complexity from the application.
The protocol that allows applications to control terminals consists usually just of characters (control characters and escape sequences intermixed with display characters). Furthermore, if we assume that all terminals use the ANSI escape sequences (from the VT100 onwards), the same "control language" works with every terminal. So, I'm not sure if each terminal really needs a dedicated driver on the host computer.
terminal rs232 driver vt100
New contributor
I'm wondering if terminals (like, e.g. the VT100) required the installation of a driver on the host system in order to work with that host?
I looked at the documentation of the VT102, and there is nothing mentioned about a driver.
I imagine that the setup of a terminal connected to an application on a host computer looks something like this:
The terminal is connected over an RS-232 communication line to the computer (of course, there might also be two modems and a public carrier line between the two RS-232 interfaces, but it shouldn't matter here).
On the host computer is the application that must get its input from the terminal, and send its output to the terminal. To this end, the application must somehow be connected to the RS-232 interface to which the terminal is connected. In the end, the application must read characters from this interface and write characters to it.
Now the question is, what is between the application and the RS-232 interface?
- Is there nothing at all, and the application must be programmed to directly listen on and write to the RS-232 interface (through the kernel)?
- Is there a driver for this specific terminal, and the application communicates with this driver?
- Is there a generic "terminal controller" in the kernel that works with all terminals and provides a common API for applications (like the TTY subsystem in UNIX)?
In other words, if you write a terminal application, what is the mechanism that you get notified about incoming data from the terminal, and how do you write output to the terminal?
In the latter two cases, the driver or controller could do some processing on the input, like line editing, and only send full lines to the application (as it is done by TTY in UNIX). This would offload a lot of complexity from the application.
The protocol that allows applications to control terminals consists usually just of characters (control characters and escape sequences intermixed with display characters). Furthermore, if we assume that all terminals use the ANSI escape sequences (from the VT100 onwards), the same "control language" works with every terminal. So, I'm not sure if each terminal really needs a dedicated driver on the host computer.
terminal rs232 driver vt100
terminal rs232 driver vt100
New contributor
New contributor
New contributor
asked 5 hours ago
weibeldweibeld
1564
1564
New contributor
New contributor
add a comment |
add a comment |
4 Answers
4
active
oldest
votes
Different terminals didn’t (and don’t) use different kernel-level drivers. In Unix-style systems, the kernel does provide some terminal-related features, called line disciplines and the TTY layer which you mention; there is typically at least a raw line discipline (which doesn’t perform any translation), and a cooked line discipline (which provides more-or-less line-level buffering, handling backspace etc. locally). Anything beyond that is handled inside each individual application, and early applications were hard-coded for specific terminals. (It was also common for applications to be terminal-specific, or support a limited number of terminals, on non-Unix-like operating systems such as CP/M.)
However developers quickly realised that it would be useful to share terminal information, such as screen size, escape sequences for various common functions, etc. The first of these is termcap (terminal capability), developed by Bill Joy in 1978 for BSD; terminfo followed in the early eighties.
Another layer of libraries provides more advance screen-handling features for programs which require that; the earliest common library of this type was curses, and the library currently used is ncurses.
See The TTY demystified for more details.
I understand more or less how TTY works on UNIX. So you say that on other computers and OS in the 70's and 80's, it worked in a similar way as today on UNIX?
– weibeld
5 hours ago
Ah no, sorry, I meant that the applications were hard-coded for specific terminals on other systems too, I’ll clarify that.
– Stephen Kitt
4 hours ago
@weibeld, This answer assumes that we're talking about terminals whose lowest common denominator is, "able to function like a teletype." If you're talking about IBM 3270-style terminals or something like, then that's a whole different topic.
– Solomon Slow
4 hours ago
@SolomonSlow How is it different? It seems the IBM 3270 is block-oriented, but the block editing is handled in a control unit external to the host computer. So does it still require special handling on the host computer? An IBM 3270 wouldn't work with a computer that works for VT100-style terminals?
– weibeld
4 hours ago
@weibeld it wouldn’t, the requirements on applications are quite different.
– Stephen Kitt
4 hours ago
|
show 2 more comments
This was not done by a “driver” at the OS level as you are thinking of it.
In Unix, there were drivers that dealt with the RS232 interface and these were surfaced as /dev/tty* devices and dealt with things like speed, echo, etc.
As for escape sequences controlling the display of the terminal, that is not done at the “driver” level as you are thinking of it.
This was done at the application level through a library like curses, and escape sequences were defined in a database like /etc/termcap or later, terminfo.
Some apps used curses, others used termcap/terminfo to get the sequences but used their own code instead of curses. Some even had their own version of a termcap.
(Termcap = Terminal Capabilities or something like that)
Even though there was an ANSI standard for escape sequences, there were still variations and quirks, and some terminals simply used an entirely different scheme (like Wyse 50).
add a comment |
We have to distinguish between different cases, but in most cases the answer seems to be "no":
In "early" systems (like the Altair 680 in home computing or 1960s professional computers) programs simply wrote bytes to the serial port and they read bytes from there.
In fact, such machines often did not even have an operating system.
If you used VT-100 (as an example), your application had to be written in a way that VT-100 compatible output was written to the terminal and that the application could understand VT-100 compatible input.
Using Linux (the same is true for Solaris; I'm not sure about other OSs) on modern computers have an operating system with a driver for the RS-232 hardware; but there is no driver for VT-100 or similar.
Just like on "early" systems the application has to communicate in a VT-100-compatible way.
However there are some libraries (e.g. "ncurses") that can be used by the applications. These libraries provide functions that "translate" "high-level" commands (like: "move the cursor to the upper left corner of the screen") into the correct byte sequences for a lot of different terminal types (e.g. VT-100, xTerm, ...).
Please note that these are libraries, not drivers. At least in Linux such libraries are handled completely on application level; the OS kernel does not know about the existence of libraries at all.
Theoretically it would be possible to provide terminal support on OS level. In this case a driver for a certain terminal type (e.g. a VT-100 driver) would be necessary.
I doubt that such an OS is currently existing.
"These libraries provide functions that "translate" "high-level" commands into the correct byte sequences for a lot of different terminal types." So who do libraries like ncurses talk to, to send these commands to the terminal? Directly to the RS-232 driver?
– weibeld
5 hours ago
Ncurses sends the output to the "standard output". This can be some port (such as a serial port, the screen, a printer ...), some network connection, a file or another application (e.g. a command line console window).
– Martin Rosenau
5 hours ago
Ok. So you could basically "plug in" a terminal to a computer, like you can plug in today a monitor or a keyboard to a desktop computer, no drivers needed?
– weibeld
4 hours ago
@weibeld yes, and you still can ;-).
– Stephen Kitt
4 hours ago
add a comment |
"It depends".
I'm answering this in the context of DEC timesharing systems, since that's the natural habitat of a DEC VT100.
There's a hardware device such as a DZ11 terminal multiplexer (8 lines) that controls terminal lines by some physical protocol, such as RS232 or 20mA current loop. The physical protocol is a matter for the hardware. But the OS needs a driver for the hardware device.
The driver does not know the terminal type, but it will contain a variety of settings that depend on the terminal or settings in the terminal: bits per character, parity use, required number of stop bits, and so on.
Over that, but still in some driver, there's common functionality that all terminals need: character/line erase, special keys to generate signals (like ctrl/c = abort or interrupt, depending on OS), and so on. These could be in the same driver as directly handles the hardware (which means a lot of code replication) or in another driver layered on top of the first. Most such functions are terminal independent, but there's a fuzzy edge where we want (for example) character erase to operate differently on screen-based terminals (output backspace, overwrite with space, backspace) than on hardcopy (output backslash, characters being erased, backslash). That requires some knowledge of the terminal type, but it generally falls short of needing to know the explicit type, merely what it can do.
The unqualified term "terminal driver" generally refers to the above level of interface.
Once you get to details that are (or were at the time) highly terminal-specific, such as how to move the cursor around a screen, those are not in a driver. Early on, in my personal experience around 1980, application code would need to include knowledge of specific terminal types. This wasn't too burdensome if you were writing code for DEC since there were basically only 2 main types to deal with: VT52 and VT100, with minor details such as whether the particular VT1xx model had programmable LEDs or not. However, it was burdensome enough such that eventually common libraries would show up: SMG ("screen management") for VMS being an example.
So: to sum up:
- Kernel driver handles specific hardware device independent of terminal type
- Kernel driver handles common user-interaction functions largely independent of terminal type
- User-mode libraries can implement mapping from generic to type-specific operations
- Application code can use such libraries when available or do it all itself
Great, that comes closest to the answer I was looking for. So, as an application, you don't get every character that the user types, such as Ctrl-C, Ctrl-U, Backspace, Delete, etc, these are handled by the kernel driver (the one in the second layer in your model), but you get entire lines from this driver (probably, when a newline or carriage return is received from the keyboard). Is this correct?
– weibeld
3 hours ago
Except, I think, if you are an application like vi, which really must get every character that the user presses as he/she does it. In this case, you must somehow be able to instruct the driver to not do any processing and pass you through every character right away as it is received, right?
– weibeld
3 hours ago
Generally, the app doesn't want to have to deal with things like line erase (ctrl/u) so it is happy to let the driver deal with it, and generally, the application has a line-oriented interface, so waiting until a complete line is available is appropriate - which happens when the return key ("enter" is a PC-keyboard thing) or any other designated end-of-input character is typed. However, an app may elect to do all of that itself, and if it's really screen-driven, you may want to do some of it yourself to keep the screen pretty.
– another-dave
3 hours ago
It's a mode setting in the terminal driver (i.e., you open a channel to the terminal and tell the driver how you want to use it) whether it's line or character oriented. Also, you get to choose whether you want the driver to echo input or you will do it. The terminal driver is likely the most complex driver in that sort of (non-graphical) OS.
– another-dave
3 hours ago
Ok, that makes it clearer. So, it was in general the same principle as TTY on UNIX?
– weibeld
3 hours ago
|
show 3 more comments
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "648"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
weibeld is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fretrocomputing.stackexchange.com%2fquestions%2f8856%2fdid-terminals-e-g-vt100-require-a-terminal-driver-on-the-host-computer%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
Different terminals didn’t (and don’t) use different kernel-level drivers. In Unix-style systems, the kernel does provide some terminal-related features, called line disciplines and the TTY layer which you mention; there is typically at least a raw line discipline (which doesn’t perform any translation), and a cooked line discipline (which provides more-or-less line-level buffering, handling backspace etc. locally). Anything beyond that is handled inside each individual application, and early applications were hard-coded for specific terminals. (It was also common for applications to be terminal-specific, or support a limited number of terminals, on non-Unix-like operating systems such as CP/M.)
However developers quickly realised that it would be useful to share terminal information, such as screen size, escape sequences for various common functions, etc. The first of these is termcap (terminal capability), developed by Bill Joy in 1978 for BSD; terminfo followed in the early eighties.
Another layer of libraries provides more advance screen-handling features for programs which require that; the earliest common library of this type was curses, and the library currently used is ncurses.
See The TTY demystified for more details.
I understand more or less how TTY works on UNIX. So you say that on other computers and OS in the 70's and 80's, it worked in a similar way as today on UNIX?
– weibeld
5 hours ago
Ah no, sorry, I meant that the applications were hard-coded for specific terminals on other systems too, I’ll clarify that.
– Stephen Kitt
4 hours ago
@weibeld, This answer assumes that we're talking about terminals whose lowest common denominator is, "able to function like a teletype." If you're talking about IBM 3270-style terminals or something like, then that's a whole different topic.
– Solomon Slow
4 hours ago
@SolomonSlow How is it different? It seems the IBM 3270 is block-oriented, but the block editing is handled in a control unit external to the host computer. So does it still require special handling on the host computer? An IBM 3270 wouldn't work with a computer that works for VT100-style terminals?
– weibeld
4 hours ago
@weibeld it wouldn’t, the requirements on applications are quite different.
– Stephen Kitt
4 hours ago
|
show 2 more comments
Different terminals didn’t (and don’t) use different kernel-level drivers. In Unix-style systems, the kernel does provide some terminal-related features, called line disciplines and the TTY layer which you mention; there is typically at least a raw line discipline (which doesn’t perform any translation), and a cooked line discipline (which provides more-or-less line-level buffering, handling backspace etc. locally). Anything beyond that is handled inside each individual application, and early applications were hard-coded for specific terminals. (It was also common for applications to be terminal-specific, or support a limited number of terminals, on non-Unix-like operating systems such as CP/M.)
However developers quickly realised that it would be useful to share terminal information, such as screen size, escape sequences for various common functions, etc. The first of these is termcap (terminal capability), developed by Bill Joy in 1978 for BSD; terminfo followed in the early eighties.
Another layer of libraries provides more advance screen-handling features for programs which require that; the earliest common library of this type was curses, and the library currently used is ncurses.
See The TTY demystified for more details.
I understand more or less how TTY works on UNIX. So you say that on other computers and OS in the 70's and 80's, it worked in a similar way as today on UNIX?
– weibeld
5 hours ago
Ah no, sorry, I meant that the applications were hard-coded for specific terminals on other systems too, I’ll clarify that.
– Stephen Kitt
4 hours ago
@weibeld, This answer assumes that we're talking about terminals whose lowest common denominator is, "able to function like a teletype." If you're talking about IBM 3270-style terminals or something like, then that's a whole different topic.
– Solomon Slow
4 hours ago
@SolomonSlow How is it different? It seems the IBM 3270 is block-oriented, but the block editing is handled in a control unit external to the host computer. So does it still require special handling on the host computer? An IBM 3270 wouldn't work with a computer that works for VT100-style terminals?
– weibeld
4 hours ago
@weibeld it wouldn’t, the requirements on applications are quite different.
– Stephen Kitt
4 hours ago
|
show 2 more comments
Different terminals didn’t (and don’t) use different kernel-level drivers. In Unix-style systems, the kernel does provide some terminal-related features, called line disciplines and the TTY layer which you mention; there is typically at least a raw line discipline (which doesn’t perform any translation), and a cooked line discipline (which provides more-or-less line-level buffering, handling backspace etc. locally). Anything beyond that is handled inside each individual application, and early applications were hard-coded for specific terminals. (It was also common for applications to be terminal-specific, or support a limited number of terminals, on non-Unix-like operating systems such as CP/M.)
However developers quickly realised that it would be useful to share terminal information, such as screen size, escape sequences for various common functions, etc. The first of these is termcap (terminal capability), developed by Bill Joy in 1978 for BSD; terminfo followed in the early eighties.
Another layer of libraries provides more advance screen-handling features for programs which require that; the earliest common library of this type was curses, and the library currently used is ncurses.
See The TTY demystified for more details.
Different terminals didn’t (and don’t) use different kernel-level drivers. In Unix-style systems, the kernel does provide some terminal-related features, called line disciplines and the TTY layer which you mention; there is typically at least a raw line discipline (which doesn’t perform any translation), and a cooked line discipline (which provides more-or-less line-level buffering, handling backspace etc. locally). Anything beyond that is handled inside each individual application, and early applications were hard-coded for specific terminals. (It was also common for applications to be terminal-specific, or support a limited number of terminals, on non-Unix-like operating systems such as CP/M.)
However developers quickly realised that it would be useful to share terminal information, such as screen size, escape sequences for various common functions, etc. The first of these is termcap (terminal capability), developed by Bill Joy in 1978 for BSD; terminfo followed in the early eighties.
Another layer of libraries provides more advance screen-handling features for programs which require that; the earliest common library of this type was curses, and the library currently used is ncurses.
See The TTY demystified for more details.
edited 4 hours ago
answered 5 hours ago
Stephen KittStephen Kitt
35.8k6145158
35.8k6145158
I understand more or less how TTY works on UNIX. So you say that on other computers and OS in the 70's and 80's, it worked in a similar way as today on UNIX?
– weibeld
5 hours ago
Ah no, sorry, I meant that the applications were hard-coded for specific terminals on other systems too, I’ll clarify that.
– Stephen Kitt
4 hours ago
@weibeld, This answer assumes that we're talking about terminals whose lowest common denominator is, "able to function like a teletype." If you're talking about IBM 3270-style terminals or something like, then that's a whole different topic.
– Solomon Slow
4 hours ago
@SolomonSlow How is it different? It seems the IBM 3270 is block-oriented, but the block editing is handled in a control unit external to the host computer. So does it still require special handling on the host computer? An IBM 3270 wouldn't work with a computer that works for VT100-style terminals?
– weibeld
4 hours ago
@weibeld it wouldn’t, the requirements on applications are quite different.
– Stephen Kitt
4 hours ago
|
show 2 more comments
I understand more or less how TTY works on UNIX. So you say that on other computers and OS in the 70's and 80's, it worked in a similar way as today on UNIX?
– weibeld
5 hours ago
Ah no, sorry, I meant that the applications were hard-coded for specific terminals on other systems too, I’ll clarify that.
– Stephen Kitt
4 hours ago
@weibeld, This answer assumes that we're talking about terminals whose lowest common denominator is, "able to function like a teletype." If you're talking about IBM 3270-style terminals or something like, then that's a whole different topic.
– Solomon Slow
4 hours ago
@SolomonSlow How is it different? It seems the IBM 3270 is block-oriented, but the block editing is handled in a control unit external to the host computer. So does it still require special handling on the host computer? An IBM 3270 wouldn't work with a computer that works for VT100-style terminals?
– weibeld
4 hours ago
@weibeld it wouldn’t, the requirements on applications are quite different.
– Stephen Kitt
4 hours ago
I understand more or less how TTY works on UNIX. So you say that on other computers and OS in the 70's and 80's, it worked in a similar way as today on UNIX?
– weibeld
5 hours ago
I understand more or less how TTY works on UNIX. So you say that on other computers and OS in the 70's and 80's, it worked in a similar way as today on UNIX?
– weibeld
5 hours ago
Ah no, sorry, I meant that the applications were hard-coded for specific terminals on other systems too, I’ll clarify that.
– Stephen Kitt
4 hours ago
Ah no, sorry, I meant that the applications were hard-coded for specific terminals on other systems too, I’ll clarify that.
– Stephen Kitt
4 hours ago
@weibeld, This answer assumes that we're talking about terminals whose lowest common denominator is, "able to function like a teletype." If you're talking about IBM 3270-style terminals or something like, then that's a whole different topic.
– Solomon Slow
4 hours ago
@weibeld, This answer assumes that we're talking about terminals whose lowest common denominator is, "able to function like a teletype." If you're talking about IBM 3270-style terminals or something like, then that's a whole different topic.
– Solomon Slow
4 hours ago
@SolomonSlow How is it different? It seems the IBM 3270 is block-oriented, but the block editing is handled in a control unit external to the host computer. So does it still require special handling on the host computer? An IBM 3270 wouldn't work with a computer that works for VT100-style terminals?
– weibeld
4 hours ago
@SolomonSlow How is it different? It seems the IBM 3270 is block-oriented, but the block editing is handled in a control unit external to the host computer. So does it still require special handling on the host computer? An IBM 3270 wouldn't work with a computer that works for VT100-style terminals?
– weibeld
4 hours ago
@weibeld it wouldn’t, the requirements on applications are quite different.
– Stephen Kitt
4 hours ago
@weibeld it wouldn’t, the requirements on applications are quite different.
– Stephen Kitt
4 hours ago
|
show 2 more comments
This was not done by a “driver” at the OS level as you are thinking of it.
In Unix, there were drivers that dealt with the RS232 interface and these were surfaced as /dev/tty* devices and dealt with things like speed, echo, etc.
As for escape sequences controlling the display of the terminal, that is not done at the “driver” level as you are thinking of it.
This was done at the application level through a library like curses, and escape sequences were defined in a database like /etc/termcap or later, terminfo.
Some apps used curses, others used termcap/terminfo to get the sequences but used their own code instead of curses. Some even had their own version of a termcap.
(Termcap = Terminal Capabilities or something like that)
Even though there was an ANSI standard for escape sequences, there were still variations and quirks, and some terminals simply used an entirely different scheme (like Wyse 50).
add a comment |
This was not done by a “driver” at the OS level as you are thinking of it.
In Unix, there were drivers that dealt with the RS232 interface and these were surfaced as /dev/tty* devices and dealt with things like speed, echo, etc.
As for escape sequences controlling the display of the terminal, that is not done at the “driver” level as you are thinking of it.
This was done at the application level through a library like curses, and escape sequences were defined in a database like /etc/termcap or later, terminfo.
Some apps used curses, others used termcap/terminfo to get the sequences but used their own code instead of curses. Some even had their own version of a termcap.
(Termcap = Terminal Capabilities or something like that)
Even though there was an ANSI standard for escape sequences, there were still variations and quirks, and some terminals simply used an entirely different scheme (like Wyse 50).
add a comment |
This was not done by a “driver” at the OS level as you are thinking of it.
In Unix, there were drivers that dealt with the RS232 interface and these were surfaced as /dev/tty* devices and dealt with things like speed, echo, etc.
As for escape sequences controlling the display of the terminal, that is not done at the “driver” level as you are thinking of it.
This was done at the application level through a library like curses, and escape sequences were defined in a database like /etc/termcap or later, terminfo.
Some apps used curses, others used termcap/terminfo to get the sequences but used their own code instead of curses. Some even had their own version of a termcap.
(Termcap = Terminal Capabilities or something like that)
Even though there was an ANSI standard for escape sequences, there were still variations and quirks, and some terminals simply used an entirely different scheme (like Wyse 50).
This was not done by a “driver” at the OS level as you are thinking of it.
In Unix, there were drivers that dealt with the RS232 interface and these were surfaced as /dev/tty* devices and dealt with things like speed, echo, etc.
As for escape sequences controlling the display of the terminal, that is not done at the “driver” level as you are thinking of it.
This was done at the application level through a library like curses, and escape sequences were defined in a database like /etc/termcap or later, terminfo.
Some apps used curses, others used termcap/terminfo to get the sequences but used their own code instead of curses. Some even had their own version of a termcap.
(Termcap = Terminal Capabilities or something like that)
Even though there was an ANSI standard for escape sequences, there were still variations and quirks, and some terminals simply used an entirely different scheme (like Wyse 50).
answered 5 hours ago
mannaggiamannaggia
1,081157
1,081157
add a comment |
add a comment |
We have to distinguish between different cases, but in most cases the answer seems to be "no":
In "early" systems (like the Altair 680 in home computing or 1960s professional computers) programs simply wrote bytes to the serial port and they read bytes from there.
In fact, such machines often did not even have an operating system.
If you used VT-100 (as an example), your application had to be written in a way that VT-100 compatible output was written to the terminal and that the application could understand VT-100 compatible input.
Using Linux (the same is true for Solaris; I'm not sure about other OSs) on modern computers have an operating system with a driver for the RS-232 hardware; but there is no driver for VT-100 or similar.
Just like on "early" systems the application has to communicate in a VT-100-compatible way.
However there are some libraries (e.g. "ncurses") that can be used by the applications. These libraries provide functions that "translate" "high-level" commands (like: "move the cursor to the upper left corner of the screen") into the correct byte sequences for a lot of different terminal types (e.g. VT-100, xTerm, ...).
Please note that these are libraries, not drivers. At least in Linux such libraries are handled completely on application level; the OS kernel does not know about the existence of libraries at all.
Theoretically it would be possible to provide terminal support on OS level. In this case a driver for a certain terminal type (e.g. a VT-100 driver) would be necessary.
I doubt that such an OS is currently existing.
"These libraries provide functions that "translate" "high-level" commands into the correct byte sequences for a lot of different terminal types." So who do libraries like ncurses talk to, to send these commands to the terminal? Directly to the RS-232 driver?
– weibeld
5 hours ago
Ncurses sends the output to the "standard output". This can be some port (such as a serial port, the screen, a printer ...), some network connection, a file or another application (e.g. a command line console window).
– Martin Rosenau
5 hours ago
Ok. So you could basically "plug in" a terminal to a computer, like you can plug in today a monitor or a keyboard to a desktop computer, no drivers needed?
– weibeld
4 hours ago
@weibeld yes, and you still can ;-).
– Stephen Kitt
4 hours ago
add a comment |
We have to distinguish between different cases, but in most cases the answer seems to be "no":
In "early" systems (like the Altair 680 in home computing or 1960s professional computers) programs simply wrote bytes to the serial port and they read bytes from there.
In fact, such machines often did not even have an operating system.
If you used VT-100 (as an example), your application had to be written in a way that VT-100 compatible output was written to the terminal and that the application could understand VT-100 compatible input.
Using Linux (the same is true for Solaris; I'm not sure about other OSs) on modern computers have an operating system with a driver for the RS-232 hardware; but there is no driver for VT-100 or similar.
Just like on "early" systems the application has to communicate in a VT-100-compatible way.
However there are some libraries (e.g. "ncurses") that can be used by the applications. These libraries provide functions that "translate" "high-level" commands (like: "move the cursor to the upper left corner of the screen") into the correct byte sequences for a lot of different terminal types (e.g. VT-100, xTerm, ...).
Please note that these are libraries, not drivers. At least in Linux such libraries are handled completely on application level; the OS kernel does not know about the existence of libraries at all.
Theoretically it would be possible to provide terminal support on OS level. In this case a driver for a certain terminal type (e.g. a VT-100 driver) would be necessary.
I doubt that such an OS is currently existing.
"These libraries provide functions that "translate" "high-level" commands into the correct byte sequences for a lot of different terminal types." So who do libraries like ncurses talk to, to send these commands to the terminal? Directly to the RS-232 driver?
– weibeld
5 hours ago
Ncurses sends the output to the "standard output". This can be some port (such as a serial port, the screen, a printer ...), some network connection, a file or another application (e.g. a command line console window).
– Martin Rosenau
5 hours ago
Ok. So you could basically "plug in" a terminal to a computer, like you can plug in today a monitor or a keyboard to a desktop computer, no drivers needed?
– weibeld
4 hours ago
@weibeld yes, and you still can ;-).
– Stephen Kitt
4 hours ago
add a comment |
We have to distinguish between different cases, but in most cases the answer seems to be "no":
In "early" systems (like the Altair 680 in home computing or 1960s professional computers) programs simply wrote bytes to the serial port and they read bytes from there.
In fact, such machines often did not even have an operating system.
If you used VT-100 (as an example), your application had to be written in a way that VT-100 compatible output was written to the terminal and that the application could understand VT-100 compatible input.
Using Linux (the same is true for Solaris; I'm not sure about other OSs) on modern computers have an operating system with a driver for the RS-232 hardware; but there is no driver for VT-100 or similar.
Just like on "early" systems the application has to communicate in a VT-100-compatible way.
However there are some libraries (e.g. "ncurses") that can be used by the applications. These libraries provide functions that "translate" "high-level" commands (like: "move the cursor to the upper left corner of the screen") into the correct byte sequences for a lot of different terminal types (e.g. VT-100, xTerm, ...).
Please note that these are libraries, not drivers. At least in Linux such libraries are handled completely on application level; the OS kernel does not know about the existence of libraries at all.
Theoretically it would be possible to provide terminal support on OS level. In this case a driver for a certain terminal type (e.g. a VT-100 driver) would be necessary.
I doubt that such an OS is currently existing.
We have to distinguish between different cases, but in most cases the answer seems to be "no":
In "early" systems (like the Altair 680 in home computing or 1960s professional computers) programs simply wrote bytes to the serial port and they read bytes from there.
In fact, such machines often did not even have an operating system.
If you used VT-100 (as an example), your application had to be written in a way that VT-100 compatible output was written to the terminal and that the application could understand VT-100 compatible input.
Using Linux (the same is true for Solaris; I'm not sure about other OSs) on modern computers have an operating system with a driver for the RS-232 hardware; but there is no driver for VT-100 or similar.
Just like on "early" systems the application has to communicate in a VT-100-compatible way.
However there are some libraries (e.g. "ncurses") that can be used by the applications. These libraries provide functions that "translate" "high-level" commands (like: "move the cursor to the upper left corner of the screen") into the correct byte sequences for a lot of different terminal types (e.g. VT-100, xTerm, ...).
Please note that these are libraries, not drivers. At least in Linux such libraries are handled completely on application level; the OS kernel does not know about the existence of libraries at all.
Theoretically it would be possible to provide terminal support on OS level. In this case a driver for a certain terminal type (e.g. a VT-100 driver) would be necessary.
I doubt that such an OS is currently existing.
answered 5 hours ago
Martin RosenauMartin Rosenau
531127
531127
"These libraries provide functions that "translate" "high-level" commands into the correct byte sequences for a lot of different terminal types." So who do libraries like ncurses talk to, to send these commands to the terminal? Directly to the RS-232 driver?
– weibeld
5 hours ago
Ncurses sends the output to the "standard output". This can be some port (such as a serial port, the screen, a printer ...), some network connection, a file or another application (e.g. a command line console window).
– Martin Rosenau
5 hours ago
Ok. So you could basically "plug in" a terminal to a computer, like you can plug in today a monitor or a keyboard to a desktop computer, no drivers needed?
– weibeld
4 hours ago
@weibeld yes, and you still can ;-).
– Stephen Kitt
4 hours ago
add a comment |
"These libraries provide functions that "translate" "high-level" commands into the correct byte sequences for a lot of different terminal types." So who do libraries like ncurses talk to, to send these commands to the terminal? Directly to the RS-232 driver?
– weibeld
5 hours ago
Ncurses sends the output to the "standard output". This can be some port (such as a serial port, the screen, a printer ...), some network connection, a file or another application (e.g. a command line console window).
– Martin Rosenau
5 hours ago
Ok. So you could basically "plug in" a terminal to a computer, like you can plug in today a monitor or a keyboard to a desktop computer, no drivers needed?
– weibeld
4 hours ago
@weibeld yes, and you still can ;-).
– Stephen Kitt
4 hours ago
"These libraries provide functions that "translate" "high-level" commands into the correct byte sequences for a lot of different terminal types." So who do libraries like ncurses talk to, to send these commands to the terminal? Directly to the RS-232 driver?
– weibeld
5 hours ago
"These libraries provide functions that "translate" "high-level" commands into the correct byte sequences for a lot of different terminal types." So who do libraries like ncurses talk to, to send these commands to the terminal? Directly to the RS-232 driver?
– weibeld
5 hours ago
Ncurses sends the output to the "standard output". This can be some port (such as a serial port, the screen, a printer ...), some network connection, a file or another application (e.g. a command line console window).
– Martin Rosenau
5 hours ago
Ncurses sends the output to the "standard output". This can be some port (such as a serial port, the screen, a printer ...), some network connection, a file or another application (e.g. a command line console window).
– Martin Rosenau
5 hours ago
Ok. So you could basically "plug in" a terminal to a computer, like you can plug in today a monitor or a keyboard to a desktop computer, no drivers needed?
– weibeld
4 hours ago
Ok. So you could basically "plug in" a terminal to a computer, like you can plug in today a monitor or a keyboard to a desktop computer, no drivers needed?
– weibeld
4 hours ago
@weibeld yes, and you still can ;-).
– Stephen Kitt
4 hours ago
@weibeld yes, and you still can ;-).
– Stephen Kitt
4 hours ago
add a comment |
"It depends".
I'm answering this in the context of DEC timesharing systems, since that's the natural habitat of a DEC VT100.
There's a hardware device such as a DZ11 terminal multiplexer (8 lines) that controls terminal lines by some physical protocol, such as RS232 or 20mA current loop. The physical protocol is a matter for the hardware. But the OS needs a driver for the hardware device.
The driver does not know the terminal type, but it will contain a variety of settings that depend on the terminal or settings in the terminal: bits per character, parity use, required number of stop bits, and so on.
Over that, but still in some driver, there's common functionality that all terminals need: character/line erase, special keys to generate signals (like ctrl/c = abort or interrupt, depending on OS), and so on. These could be in the same driver as directly handles the hardware (which means a lot of code replication) or in another driver layered on top of the first. Most such functions are terminal independent, but there's a fuzzy edge where we want (for example) character erase to operate differently on screen-based terminals (output backspace, overwrite with space, backspace) than on hardcopy (output backslash, characters being erased, backslash). That requires some knowledge of the terminal type, but it generally falls short of needing to know the explicit type, merely what it can do.
The unqualified term "terminal driver" generally refers to the above level of interface.
Once you get to details that are (or were at the time) highly terminal-specific, such as how to move the cursor around a screen, those are not in a driver. Early on, in my personal experience around 1980, application code would need to include knowledge of specific terminal types. This wasn't too burdensome if you were writing code for DEC since there were basically only 2 main types to deal with: VT52 and VT100, with minor details such as whether the particular VT1xx model had programmable LEDs or not. However, it was burdensome enough such that eventually common libraries would show up: SMG ("screen management") for VMS being an example.
So: to sum up:
- Kernel driver handles specific hardware device independent of terminal type
- Kernel driver handles common user-interaction functions largely independent of terminal type
- User-mode libraries can implement mapping from generic to type-specific operations
- Application code can use such libraries when available or do it all itself
Great, that comes closest to the answer I was looking for. So, as an application, you don't get every character that the user types, such as Ctrl-C, Ctrl-U, Backspace, Delete, etc, these are handled by the kernel driver (the one in the second layer in your model), but you get entire lines from this driver (probably, when a newline or carriage return is received from the keyboard). Is this correct?
– weibeld
3 hours ago
Except, I think, if you are an application like vi, which really must get every character that the user presses as he/she does it. In this case, you must somehow be able to instruct the driver to not do any processing and pass you through every character right away as it is received, right?
– weibeld
3 hours ago
Generally, the app doesn't want to have to deal with things like line erase (ctrl/u) so it is happy to let the driver deal with it, and generally, the application has a line-oriented interface, so waiting until a complete line is available is appropriate - which happens when the return key ("enter" is a PC-keyboard thing) or any other designated end-of-input character is typed. However, an app may elect to do all of that itself, and if it's really screen-driven, you may want to do some of it yourself to keep the screen pretty.
– another-dave
3 hours ago
It's a mode setting in the terminal driver (i.e., you open a channel to the terminal and tell the driver how you want to use it) whether it's line or character oriented. Also, you get to choose whether you want the driver to echo input or you will do it. The terminal driver is likely the most complex driver in that sort of (non-graphical) OS.
– another-dave
3 hours ago
Ok, that makes it clearer. So, it was in general the same principle as TTY on UNIX?
– weibeld
3 hours ago
|
show 3 more comments
"It depends".
I'm answering this in the context of DEC timesharing systems, since that's the natural habitat of a DEC VT100.
There's a hardware device such as a DZ11 terminal multiplexer (8 lines) that controls terminal lines by some physical protocol, such as RS232 or 20mA current loop. The physical protocol is a matter for the hardware. But the OS needs a driver for the hardware device.
The driver does not know the terminal type, but it will contain a variety of settings that depend on the terminal or settings in the terminal: bits per character, parity use, required number of stop bits, and so on.
Over that, but still in some driver, there's common functionality that all terminals need: character/line erase, special keys to generate signals (like ctrl/c = abort or interrupt, depending on OS), and so on. These could be in the same driver as directly handles the hardware (which means a lot of code replication) or in another driver layered on top of the first. Most such functions are terminal independent, but there's a fuzzy edge where we want (for example) character erase to operate differently on screen-based terminals (output backspace, overwrite with space, backspace) than on hardcopy (output backslash, characters being erased, backslash). That requires some knowledge of the terminal type, but it generally falls short of needing to know the explicit type, merely what it can do.
The unqualified term "terminal driver" generally refers to the above level of interface.
Once you get to details that are (or were at the time) highly terminal-specific, such as how to move the cursor around a screen, those are not in a driver. Early on, in my personal experience around 1980, application code would need to include knowledge of specific terminal types. This wasn't too burdensome if you were writing code for DEC since there were basically only 2 main types to deal with: VT52 and VT100, with minor details such as whether the particular VT1xx model had programmable LEDs or not. However, it was burdensome enough such that eventually common libraries would show up: SMG ("screen management") for VMS being an example.
So: to sum up:
- Kernel driver handles specific hardware device independent of terminal type
- Kernel driver handles common user-interaction functions largely independent of terminal type
- User-mode libraries can implement mapping from generic to type-specific operations
- Application code can use such libraries when available or do it all itself
Great, that comes closest to the answer I was looking for. So, as an application, you don't get every character that the user types, such as Ctrl-C, Ctrl-U, Backspace, Delete, etc, these are handled by the kernel driver (the one in the second layer in your model), but you get entire lines from this driver (probably, when a newline or carriage return is received from the keyboard). Is this correct?
– weibeld
3 hours ago
Except, I think, if you are an application like vi, which really must get every character that the user presses as he/she does it. In this case, you must somehow be able to instruct the driver to not do any processing and pass you through every character right away as it is received, right?
– weibeld
3 hours ago
Generally, the app doesn't want to have to deal with things like line erase (ctrl/u) so it is happy to let the driver deal with it, and generally, the application has a line-oriented interface, so waiting until a complete line is available is appropriate - which happens when the return key ("enter" is a PC-keyboard thing) or any other designated end-of-input character is typed. However, an app may elect to do all of that itself, and if it's really screen-driven, you may want to do some of it yourself to keep the screen pretty.
– another-dave
3 hours ago
It's a mode setting in the terminal driver (i.e., you open a channel to the terminal and tell the driver how you want to use it) whether it's line or character oriented. Also, you get to choose whether you want the driver to echo input or you will do it. The terminal driver is likely the most complex driver in that sort of (non-graphical) OS.
– another-dave
3 hours ago
Ok, that makes it clearer. So, it was in general the same principle as TTY on UNIX?
– weibeld
3 hours ago
|
show 3 more comments
"It depends".
I'm answering this in the context of DEC timesharing systems, since that's the natural habitat of a DEC VT100.
There's a hardware device such as a DZ11 terminal multiplexer (8 lines) that controls terminal lines by some physical protocol, such as RS232 or 20mA current loop. The physical protocol is a matter for the hardware. But the OS needs a driver for the hardware device.
The driver does not know the terminal type, but it will contain a variety of settings that depend on the terminal or settings in the terminal: bits per character, parity use, required number of stop bits, and so on.
Over that, but still in some driver, there's common functionality that all terminals need: character/line erase, special keys to generate signals (like ctrl/c = abort or interrupt, depending on OS), and so on. These could be in the same driver as directly handles the hardware (which means a lot of code replication) or in another driver layered on top of the first. Most such functions are terminal independent, but there's a fuzzy edge where we want (for example) character erase to operate differently on screen-based terminals (output backspace, overwrite with space, backspace) than on hardcopy (output backslash, characters being erased, backslash). That requires some knowledge of the terminal type, but it generally falls short of needing to know the explicit type, merely what it can do.
The unqualified term "terminal driver" generally refers to the above level of interface.
Once you get to details that are (or were at the time) highly terminal-specific, such as how to move the cursor around a screen, those are not in a driver. Early on, in my personal experience around 1980, application code would need to include knowledge of specific terminal types. This wasn't too burdensome if you were writing code for DEC since there were basically only 2 main types to deal with: VT52 and VT100, with minor details such as whether the particular VT1xx model had programmable LEDs or not. However, it was burdensome enough such that eventually common libraries would show up: SMG ("screen management") for VMS being an example.
So: to sum up:
- Kernel driver handles specific hardware device independent of terminal type
- Kernel driver handles common user-interaction functions largely independent of terminal type
- User-mode libraries can implement mapping from generic to type-specific operations
- Application code can use such libraries when available or do it all itself
"It depends".
I'm answering this in the context of DEC timesharing systems, since that's the natural habitat of a DEC VT100.
There's a hardware device such as a DZ11 terminal multiplexer (8 lines) that controls terminal lines by some physical protocol, such as RS232 or 20mA current loop. The physical protocol is a matter for the hardware. But the OS needs a driver for the hardware device.
The driver does not know the terminal type, but it will contain a variety of settings that depend on the terminal or settings in the terminal: bits per character, parity use, required number of stop bits, and so on.
Over that, but still in some driver, there's common functionality that all terminals need: character/line erase, special keys to generate signals (like ctrl/c = abort or interrupt, depending on OS), and so on. These could be in the same driver as directly handles the hardware (which means a lot of code replication) or in another driver layered on top of the first. Most such functions are terminal independent, but there's a fuzzy edge where we want (for example) character erase to operate differently on screen-based terminals (output backspace, overwrite with space, backspace) than on hardcopy (output backslash, characters being erased, backslash). That requires some knowledge of the terminal type, but it generally falls short of needing to know the explicit type, merely what it can do.
The unqualified term "terminal driver" generally refers to the above level of interface.
Once you get to details that are (or were at the time) highly terminal-specific, such as how to move the cursor around a screen, those are not in a driver. Early on, in my personal experience around 1980, application code would need to include knowledge of specific terminal types. This wasn't too burdensome if you were writing code for DEC since there were basically only 2 main types to deal with: VT52 and VT100, with minor details such as whether the particular VT1xx model had programmable LEDs or not. However, it was burdensome enough such that eventually common libraries would show up: SMG ("screen management") for VMS being an example.
So: to sum up:
- Kernel driver handles specific hardware device independent of terminal type
- Kernel driver handles common user-interaction functions largely independent of terminal type
- User-mode libraries can implement mapping from generic to type-specific operations
- Application code can use such libraries when available or do it all itself
answered 4 hours ago
another-daveanother-dave
60718
60718
Great, that comes closest to the answer I was looking for. So, as an application, you don't get every character that the user types, such as Ctrl-C, Ctrl-U, Backspace, Delete, etc, these are handled by the kernel driver (the one in the second layer in your model), but you get entire lines from this driver (probably, when a newline or carriage return is received from the keyboard). Is this correct?
– weibeld
3 hours ago
Except, I think, if you are an application like vi, which really must get every character that the user presses as he/she does it. In this case, you must somehow be able to instruct the driver to not do any processing and pass you through every character right away as it is received, right?
– weibeld
3 hours ago
Generally, the app doesn't want to have to deal with things like line erase (ctrl/u) so it is happy to let the driver deal with it, and generally, the application has a line-oriented interface, so waiting until a complete line is available is appropriate - which happens when the return key ("enter" is a PC-keyboard thing) or any other designated end-of-input character is typed. However, an app may elect to do all of that itself, and if it's really screen-driven, you may want to do some of it yourself to keep the screen pretty.
– another-dave
3 hours ago
It's a mode setting in the terminal driver (i.e., you open a channel to the terminal and tell the driver how you want to use it) whether it's line or character oriented. Also, you get to choose whether you want the driver to echo input or you will do it. The terminal driver is likely the most complex driver in that sort of (non-graphical) OS.
– another-dave
3 hours ago
Ok, that makes it clearer. So, it was in general the same principle as TTY on UNIX?
– weibeld
3 hours ago
|
show 3 more comments
Great, that comes closest to the answer I was looking for. So, as an application, you don't get every character that the user types, such as Ctrl-C, Ctrl-U, Backspace, Delete, etc, these are handled by the kernel driver (the one in the second layer in your model), but you get entire lines from this driver (probably, when a newline or carriage return is received from the keyboard). Is this correct?
– weibeld
3 hours ago
Except, I think, if you are an application like vi, which really must get every character that the user presses as he/she does it. In this case, you must somehow be able to instruct the driver to not do any processing and pass you through every character right away as it is received, right?
– weibeld
3 hours ago
Generally, the app doesn't want to have to deal with things like line erase (ctrl/u) so it is happy to let the driver deal with it, and generally, the application has a line-oriented interface, so waiting until a complete line is available is appropriate - which happens when the return key ("enter" is a PC-keyboard thing) or any other designated end-of-input character is typed. However, an app may elect to do all of that itself, and if it's really screen-driven, you may want to do some of it yourself to keep the screen pretty.
– another-dave
3 hours ago
It's a mode setting in the terminal driver (i.e., you open a channel to the terminal and tell the driver how you want to use it) whether it's line or character oriented. Also, you get to choose whether you want the driver to echo input or you will do it. The terminal driver is likely the most complex driver in that sort of (non-graphical) OS.
– another-dave
3 hours ago
Ok, that makes it clearer. So, it was in general the same principle as TTY on UNIX?
– weibeld
3 hours ago
Great, that comes closest to the answer I was looking for. So, as an application, you don't get every character that the user types, such as Ctrl-C, Ctrl-U, Backspace, Delete, etc, these are handled by the kernel driver (the one in the second layer in your model), but you get entire lines from this driver (probably, when a newline or carriage return is received from the keyboard). Is this correct?
– weibeld
3 hours ago
Great, that comes closest to the answer I was looking for. So, as an application, you don't get every character that the user types, such as Ctrl-C, Ctrl-U, Backspace, Delete, etc, these are handled by the kernel driver (the one in the second layer in your model), but you get entire lines from this driver (probably, when a newline or carriage return is received from the keyboard). Is this correct?
– weibeld
3 hours ago
Except, I think, if you are an application like vi, which really must get every character that the user presses as he/she does it. In this case, you must somehow be able to instruct the driver to not do any processing and pass you through every character right away as it is received, right?
– weibeld
3 hours ago
Except, I think, if you are an application like vi, which really must get every character that the user presses as he/she does it. In this case, you must somehow be able to instruct the driver to not do any processing and pass you through every character right away as it is received, right?
– weibeld
3 hours ago
Generally, the app doesn't want to have to deal with things like line erase (ctrl/u) so it is happy to let the driver deal with it, and generally, the application has a line-oriented interface, so waiting until a complete line is available is appropriate - which happens when the return key ("enter" is a PC-keyboard thing) or any other designated end-of-input character is typed. However, an app may elect to do all of that itself, and if it's really screen-driven, you may want to do some of it yourself to keep the screen pretty.
– another-dave
3 hours ago
Generally, the app doesn't want to have to deal with things like line erase (ctrl/u) so it is happy to let the driver deal with it, and generally, the application has a line-oriented interface, so waiting until a complete line is available is appropriate - which happens when the return key ("enter" is a PC-keyboard thing) or any other designated end-of-input character is typed. However, an app may elect to do all of that itself, and if it's really screen-driven, you may want to do some of it yourself to keep the screen pretty.
– another-dave
3 hours ago
It's a mode setting in the terminal driver (i.e., you open a channel to the terminal and tell the driver how you want to use it) whether it's line or character oriented. Also, you get to choose whether you want the driver to echo input or you will do it. The terminal driver is likely the most complex driver in that sort of (non-graphical) OS.
– another-dave
3 hours ago
It's a mode setting in the terminal driver (i.e., you open a channel to the terminal and tell the driver how you want to use it) whether it's line or character oriented. Also, you get to choose whether you want the driver to echo input or you will do it. The terminal driver is likely the most complex driver in that sort of (non-graphical) OS.
– another-dave
3 hours ago
Ok, that makes it clearer. So, it was in general the same principle as TTY on UNIX?
– weibeld
3 hours ago
Ok, that makes it clearer. So, it was in general the same principle as TTY on UNIX?
– weibeld
3 hours ago
|
show 3 more comments
weibeld is a new contributor. Be nice, and check out our Code of Conduct.
weibeld is a new contributor. Be nice, and check out our Code of Conduct.
weibeld is a new contributor. Be nice, and check out our Code of Conduct.
weibeld is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Retrocomputing Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fretrocomputing.stackexchange.com%2fquestions%2f8856%2fdid-terminals-e-g-vt100-require-a-terminal-driver-on-the-host-computer%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown