3

I am using a PDP-11 emulator with UNIX V7 installed on it.

The stty command returns the baud rate:

enter image description here

To which serial card does this returned baud rate belongs to, is it the terminal serial card, or the PDP-11 serial card?

  • Have you tried man stty? My guess is it's whichever serial line you typed stty into. – Wilson Nov 2 '17 at 8:33
5

If you are able to see that message, the displayed baud rate kind of belongs to both.

It's supposed to belong to the serial port in the PDP-11 that your terminal is connected to -- this is the serial port that Unix is able to access and control.

Your terminal also has a serial port but Unix is not able to control it. But note that if your terminal is running at a different speed from the PDP-11 serial port, then you won't be able to type commands or see results, because the speed one side sends at needs to match the speed the other side receives at (and vice-versa). If the two sides are running at different speeds you'll just get garbage.

So if you can type the "stty" command and see its output, that means your terminal must be running at the same speed as the PDP-11 serial port, and therefore the displayed baud rate can be applied to both.

All of the above applies to a real terminal attached to a real PDP-11. If you are using an emulated PDP-11 then the displayed baud rate may mean nothing and the emulated PDP-11 serial ports may actually run at a very high speed (possibly much higher than any real serial port could ever do). In that case the displayed baud rate should be taken only to mean "if this were a real PDP-11 rather than a simulation, this would be the baud rate".

4

The man page for stty on my computer says:

The stty utility sets or reports on terminal characteristics for the device that is its standard input.

So it will be the device on which your terminal session is running.

If you type who at the shell prompt, you should get a listing of who is logged in (just you, hopefully) including their terminal device.

This is in macOS but I do not think these commands have changed since v7 days.

  • 3
    The use of standard input allows things like stty < /dev/tty15 to enquire on (or set) the speed/settings of other serial ports that may be present (provide you have the right permissions). – TripeHound Nov 3 '17 at 15:16
2

Logic suggests it is only the "local" (host) side affected.

Any method to change the baudrate of a real physical terminal via something sent down the serial line itself would be highly vendor specific - and in most cases, a bad idea. While this could theoretically be supported on a case-by-case basis by a termcap-like driver system, documentation for termcap shows no such capability, neither does the documentation for a VT100 - a typical terminal of that era - yield such control codes.

However, stty would have to use an in-band mechanism like that to modify any settings in the emulator. It is unlikely for an emulator to implement such control codes as an extension to the emulated device - they would make the emulation marginally incompatible since some faulty control codes that would be harmlessly ignored by a physical device could practically crash the emulator, especially if it is actually used on a serial line (which you can do).

An emulator not connected to some kind of pty (or machine-emulator interface) instead of an actual serial line has no use for the concept of emulating a serial line baudrate...

BTW, mismatched baudrates or other line parameters on a real serial line will result in .. garbage, sometimes very low baudrate garbage if the parity mechanism catches most of it. Setting these parameters was in practice done either via in-terminal setup menus or ... physical configuration switches.

  • When you say "in-terminal setup menus", do you mean something like on-screen display menus? That seems to me to have been a much later invention, at least by the time it came into widespread use. – a CVn Nov 7 '17 at 12:01
  • If early 1980s is much later to you, then yeah :) – rackandboneman Nov 7 '17 at 17:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.