In Unix, user code can't "see" I/O locations. Is there an API to access
the blinkenlights? V5 and V6 had the switch() call that read the
switches, but it was dropped in V7, and there's nothing that would
write to the lights.
It appears that Jonathan Harston <jgh@mdfs.net> said:
In Unix, user code can't "see" I/O locations. Is there an API to access
the blinkenlights? V5 and V6 had the switch() call that read the
switches, but it was dropped in V7, and there's nothing that would write
to the lights.
The lights weren't programmable on any PDP-11 I used. They showed the
PC or address register or some other internal thing.
If your emulated PDP-11 has programmable lights, it shouldn't be very
hard to write a device driver that lets you write a word of data and
puts it in the lights.
On older PDP-11s you could write to the switch register bus address and
the value would appear on the DATA lights.
In Unix, user code can't "see" I/O locations. Is there an API to access
the blinkenlights? V5 and V6 had the switch() call that read the
switches, but it was dropped in V7, and there's nothing that would
write to the lights. Is there any way of writing to the lights in Bell
or BSD Unix? I'd love to be able to do something like this on my
PiDP (running BSD2.11):
#include <whatever.h>
main()
{
somethingsomething(42); /* Set lights to 00101010 */
}
It appears that Jonathan Harston <jgh@mdfs.net> said:
In Unix, user code can't "see" I/O locations. Is there an API to access
the blinkenlights? V5 and V6 had the switch() call that read the
switches, but it was dropped in V7, and there's nothing that would
write to the lights.
The lights weren't programmable on any PDP-11 I used. They showed
the PC or address register or some other internal thing.
On Mon, 08 Aug 2022 02:39:06 +0000, John Levine wrote:
It appears that Jonathan Harston <jgh@mdfs.net> said:
In Unix, user code can't "see" I/O locations. Is there an API to access
the blinkenlights? V5 and V6 had the switch() call that read the
switches, but it was dropped in V7, and there's nothing that would write >>> to the lights.
The lights weren't programmable on any PDP-11 I used. They showed the
PC or address register or some other internal thing.
If your emulated PDP-11 has programmable lights, it shouldn't be very
hard to write a device driver that lets you write a word of data and
puts it in the lights.
On older PDP-11s you could write to the switch register bus address and
the value would appear on the DATA lights.
Of course, you'd need a set-user-ID program (or a device driver) to do
that.
According to Bob Eager <news0009@eager.cx>:
On older PDP-11s you could write to the switch register bus address and
the value would appear on the DATA lights.
Really? I programmed 11/20, 11/45, and 11/05 quite extensively and don't recall that on any of them.
Looking at the 11/45 handbook I see the address for the switches is called switch and display register,
so it's possible that worked, but they sure didn't document it very well.
On 2022-08-08 10:21, Bob Eager wrote:
On older PDP-11s you could write to the switch register bus address and
the value would appear on the DATA lights.
If you selected to show the display register on the data lights, yes.
Of course, you'd need a set-user-ID program (or a device driver) to do
that.
If we talk Unix. Under RT-11, it's very straight forward. Under RSX you
need to have your program privileged/mapped to the I/O page. Under
RSTS/E I have no idea...
3. Open /dev/kmem from your program, and read/write to the address where
the CSR for the switch register is.
On Mon, 08 Aug 2022 20:16:28 +0200, Johnny Billquist wrote:
On 2022-08-08 10:21, Bob Eager wrote:
On older PDP-11s you could write to the switch register bus address
and the value would appear on the DATA lights.
If you selected to show the display register on the data lights, yes.
Of course, you'd need a set-user-ID program (or a device driver) to do
that.
If we talk Unix. Under RT-11, it's very straight forward. Under RSX you
need to have your program privileged/mapped to the I/O page. Under
RSTS/E I have no idea...
The original question was about 2.9BSD.
On older PDP-11s you could write to the switch register bus address and
the value would appear on the DATA lights.
Some DEC operating systems had a light pattern they moved around inWhat is displayed on a 11/45 or 11/70 console on the data lights can be controlled via a rotary switch. The display register is one option, and that register can be written by any code with access to the I/O page. The data path is another option. And here the WAIT instruction comes in, as Johnny already mentioned. WAIT loads R0 into the internal machine register which is displayed in this case before it waits for an interrupt. That is used by the idle task on DEC and BSD operating systems and causes the typical look. The code for 2.11BSD is for example in
the lights from the backstop process.
| Sysop: | Amessyroom |
|---|---|
| Location: | Fayetteville, NC |
| Users: | 63 |
| Nodes: | 6 (0 / 6) |
| Uptime: | 492971:12:38 |
| Calls: | 840 |
| Files: | 1,301 |
| D/L today: |
10 files (28,220K bytes) |
| Messages: | 264,285 |