Using APL on the PiDP-11 with RSX11M+ and the tek4010 emulator

376 views
Skip to first unread message

Rene Richarz

unread,
May 10, 2019, 3:55:12 AM5/10/19
to [PiDP-11]
The tek4010 emulator can now emulate the Tektronix 4013 and 4015 terminals, which support a second character set with APL symbols and a APL keyboard. For an interesting reading, see


a nice 1970s style brochure about APL and the Tektronix 4013. For me as a Unix and C specialist this is really something like an obscure secret vintage language, but for those having used it in the past it might be nice to try it on the PiDP-11.

This is still an experimental mode, but if you want to try it you need to download the very latest tek4010 copy (version 1.3.2 of today or later; the version is displayed in the console window if you start tek4010 ) from https://github.com/rricharz/Tek4010.

I haven't figured out what the most convenient way to hook up to RSX11M+ is, but if you have a working telnet command, you can hook up as follows:

  tek4010 -APL myworkingtelnetcommand

Once you are in RSX11M+, type

  SET /LOWER=TI:

to switch to lower case letters. This is required to use the Tektronix 4013 or 4015, because shift-letter is now reserved for APL symbols, and the OS needs to differentiate between letter and shift-letter. 

Start apl with

 apl

then

  4013

for the terminal type.

Then type ctrl-n to switch to the APL character set. You see now upper case letters again, but what's actually transferred between tek4010 and RSX11M+ are the lower case letter codes. That's the way the 4013 and 4015 worked. In this test version there is some diagnostic information such as the key codes in decimal displayed on the console.

Now you can start using APL with the APL symbols. You have to get used to the APL keyboard of the 4013/4015. There is a picture of the keyboard in the Tektronix 4015 manual page 2-4. You can find the manual in the manuals folder of the tek4010 repo. On my US keyboard, most keys do exactly what's described there, except the following keys:
  - the diamond / $ key is at the very left of the top row of keys
  - the keys towards the right of P are left_arrow/{ and right_arrow/}
  - the rightmost key to the right of L is the key with just shown above in the P row in the manual.

It probably makes sense to first try and write down all keys and shift-keys before starting to do any serious work with APL. Please let me know if any of the symbols displayed are wrong, or if keys need to be mapped to different codes in the APL mode. Other than that, I leave it now to the RSX11M+ crowd to try this. By the way, you can make screen dumps in tek4010 with ctrl-w. Please show them here, if you have produced an interesting one.

Rene Richarz

unread,
May 10, 2019, 5:01:17 AM5/10/19
to [PiDP-11]
Uups! I completely forgot to add that in order to use the APL mode you need to install the unicode APL font. Instructions are in the README.md of the repo.

Rene Richarz

unread,
May 11, 2019, 8:12:32 AM5/11/19
to [PiDP-11]
APL is actually very nice😊, once you know how to use it.

login into RSX11M+ using

  tek4010 -APL telnet Frodo

or

  tek4010 -APL telnet localhost 10001

then type LOGIN and enter user name and password (USER and USER works).

2019-05-11-140007_1024x780_scrot.png



Many of the APL symbols are available on the Tek4010 APL keyboard, but quite a few were also done using overstriking with the backspace key. This works very well.

What I will do next is put labels on one of my old spare keyboards, and then look into whether plotting on the Tektronix 4013 is possible in this APL version.

Mark Matlock

unread,
May 11, 2019, 9:15:44 AM5/11/19
to [PiDP-11]
On Saturday, May 11, 2019 at 7:12:32 AM UTC-5, Rene Richarz wrote:
APL is actually very nice😊, once you know how to use it.

Many of the APL symbols are available on the Tek4010 APL keyboard, but quite a few were also done using overstriking with the backspace key. This works very well.

What I will do next is put labels on one of my old spare keyboards, and then look into whether plotting on the Tektronix 4013 is possible in this APL version.

Rene,
    Thanks for your efforts on this!! I can now see some old programs I wrote years (1986) ago.

    I've been wanting an APL terminal for a few years now and I have one for "free".
I'm also looking at labels for a spare keyboard and am thinking of ordering these:



Mark
APL_Program.png

Rene Richarz

unread,
May 11, 2019, 10:29:46 AM5/11/19
to [PiDP-11]
Nice!

Some of the overstrikes don‘t align that well in your screen dump, whereas the same ones look nice in the one I made. For example the circle-backslash or the square/divide. Can you please just do a „pull“ in the Tek4010 directory. I have improved a few glyphs. If the problem does not go away, I‘m worried. That would mean that some screen resolutions don‘t work as well as others. I have read somewhere that the APL font does not always scale very well for small font sizes. You can also compare it with and without the -full option. What is the resolution of your screen?

Mark Matlock

unread,
May 11, 2019, 11:43:34 AM5/11/19
to [PiDP-11]
On Saturday, May 11, 2019 at 9:29:46 AM UTC-5, Rene Richarz wrote:
Nice!

Some of the overstrikes don‘t align that well in your screen dump, whereas the same ones look nice in the one I made. For example the circle-backslash or the square/divide. Can you please just do a „pull“ in the Tek4010 directory. I have improved a few glyphs. If the problem does not go away, I‘m worried. That would mean that some screen resolutions don‘t work as well as others. I have read somewhere that the APL font does not always scale very well for small font sizes. You can also compare it with and without the -full option. What is the resolution of your screen?

Rene,
   I did notice my overstrikes were not as well centered as yours. I did a pull and the APL font looks larger but the overstrikes are still off a bit. Most noticeable is O and \ combo.

At a ./Tek4010 -F it shows:
Screen Dimensions: 1824 x 984
Windows Dimensions: 1024 x 780

I do get an warning message about Error Retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.ally.Bus was not provided by any .service files

The window size is a default that pops up automatically.

Thanks,
Mark

Mark Matlock

unread,
May 12, 2019, 5:49:42 PM5/12/19
to [PiDP-11]
On Saturday, May 11, 2019 at 7:12:32 AM UTC-5, Rene Richarz wrote:
APL is actually very nice😊, once you know how to use it.

login into RSX11M+ using

  tek4010 -APL telnet Frodo

or

  tek4010 -APL telnet localhost 10001

then type LOGIN and enter user name and password (USER and USER works).


Many of the APL symbols are available on the Tek4010 APL keyboard, but quite a few were also done using overstriking with the backspace key. This works very well.

What I will do next is put labels on one of my old spare keyboards, and then look into whether plotting on the Tektronix 4013 is possible in this APL version.

 Rene,
   I bought a pack of Avery 5412 labels (5/16 inch x 1/2 inch) and also a pack of Avery 5418 (1/2 inch x 3/4 inch). The larger 5418 label can be fed to a laser printer and I installed the APL385 fonts on my iMac and could print them on a Brother Laser printer. They looked great but were going to required some effort with scissors to get them to fit on the cheap wireless keyboard I have for the PiDP-11. So I opted to use the smaller stickers and a pen. It doesn't look perfect, that's for certain but it really helps my APL typing skills (or lack there of).

Mark
IMG_1937.jpg
APL_Keyboard.jpg

Shane Bouslough

unread,
May 12, 2019, 6:06:28 PM5/12/19
to [PiDP-11], Mark Matlock
Amazing!  However there’s always something like this…



-Shane

-- 
Shane Bouslough
--
You received this message because you are subscribed to the Google Groups "[PiDP-11]" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pidp-11+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pidp-11/df560089-e545-4836-80dc-ffb3bbc1cb3e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Rene Richarz

unread,
May 13, 2019, 1:57:11 AM5/13/19
to [PiDP-11]
Shane,

Yes, I have seen that keyboard. Nice!

If somebody has one or is purchasing one, please be aware that the dyadic key codes are probably not identical to the historical Tektronix key codes. A small translation table would be required for some keys in tek4010. No problem for anybody with a bit of experience in C. Unfortunately key codes are a real complex mess. Depending on what country and keyboard you have selected in the Raspberry Pi setup, they also change, and all the keyboard configuration files available do not allow to switch between the normal mode and the APL mode. tek4010 could easily do that. If there is sufficient interest, I could even add handling an external keycode translation table using a configuration file, even including assigning overstrike symbols to keys. I am thinking about doing that anyway so that all the symbols printed on a standard US keyboard and even on my Swiss German Mac keyboard would remain where they are.

Rene

Paul Birkel

unread,
May 13, 2019, 2:35:19 AM5/13/19
to Rene Richarz, [PiDP-11]
There's also the IBM model M with APL keys (PS/2 connector) that comes up from time-to-time on eBay. I managed to snag one in very good condition in 2016 in the expectation of marrying it up with a good APL implementation someday. Definitely cheaper than the dyadic keyboard (currently ~$156 plus shipping to US). And it has the nice vintage clicky feel that folks love.

It's worth keeping an eye out for. It may be the closest you'll ever get to a "real" IBM APL; I'm pretty sure that it'll be the closest for me :->.

I have no clue how IBM mapped the key codes other than presumably it's 1:1 with the code for the "base" key.

I am *definitely* interested in eventually marrying up the IBM model M APL keyboard with your tek4010 emulation.

This thread is pretty exciting; please keep up the great work!

References:
https://clickykeyboards.com/product/1989-ibm-model-m-1391401-made-by-ibm-with-apl-keys/
https://deskthority.net/viewtopic.php?t=17075
https://www.pckeyboard.com/page/product/USAPLSET if you'd like to mod an existing keyboard
--
You received this message because you are subscribed to the Google Groups "[PiDP-11]" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pidp-11+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pidp-11/6d403d91-de52-4f21-9b3f-d7c1d07f3857%40googlegroups.com.

oscarv

unread,
May 13, 2019, 6:39:05 AM5/13/19
to [PiDP-11]
Paul,

Hooking up a PS/2 keyboard to the Pi is simple with an Arduino Leonardo. That Arduino takes the PS/2 input on its pins, and can pretend to be a USB keyboard to the Pi. Just google on Arduino Leonardo USB keyboard and you'll see a lot of projects.

Kind regards,

Oscar.

Rene Richarz

unread,
May 13, 2019, 7:16:15 AM5/13/19
to [PiDP-11]
I have just uploaded the support for an optional keyboard translation table for the APL character set to tek4010 (version 1.3.4).  There are instructions on how to install it in the APL section of the README.md, and an example of a translation table in the apl directory. The example table translates all the labelled keys of my US keyboard to the corresponding Tektronix APL codes, while leaving the unlabeled keys as much as possible like on the Tektronix 4015 keyboard. If you want to make your own table, you need to put the ASCII codes of your keys (and shift keys) into the first row of the table, and the Tektronix codes (see Tektronix 4015 manual in the manual folder, page B-1) in the second row. It is even possible to produce overstrike glyphs by adding the second overstrike code * 256 to the value in the second row, but you will run out of usable keys for the necessary codes. I hope that this allows to use a commercial APL keyboard together with tek4010, as long as the keys on that keyboard produce ASCII codes in the range between 32 and 127.

A way to find out what code a specific key or shift key on your keyboard produces is to open a shell on the Raspbian desktop and run "xev". Look at keysym 0x41 for example for A. The code there is in hex, whereas in the table you have to put decimal values.

If you hook up a PS/2 keyboard with an Arduino Leonardo, you can of course also put a conversion table in the Arduino code. Sounds like an interesting project.

Rene Richarz

unread,
May 13, 2019, 9:17:02 AM5/13/19
to [PiDP-11]
This is the standard normal ASCII and the Tektronix APL character set implemented in tek4010:

characterset.png


With a keyboard translation table and the use of the "left alt" key you can actually produce up to 128 overstrike APL glyphs with a single keystroke. The only problem remaining is to put all these labels on the keyboard 😊.



Shane Bouslough

unread,
May 13, 2019, 9:20:42 AM5/13/19
to Rene Richarz, 'emt377' via [PiDP-11]
--
You received this message because you are subscribed to the Google Groups "[PiDP-11]" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pidp-11+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages