RSX-11 - Which programming language?

578 views
Skip to first unread message

Jochen Lillich

unread,
Mar 20, 2020, 7:41:14 AM3/20/20
to [PiDP-11]
Hi,

I'm planning to do some programming on the PiDP-11 in RSX-11 on my live coding stream on Twitch. I don't have a specific project in mind yet, just some basic data processing. 

I'm familiar with Pascal, BASIC and C. Since I don't know how each of these is implemented on RSX-11 in terms of capabilities and convenience, I thought I'd ask here. Which language would you choose to do some general purpose programming and why?

...Or should I finally learn FORTRAN? :)

Best regards,  
Jochen

Tom Lake

unread,
Mar 20, 2020, 8:51:12 AM3/20/20
to pid...@googlegroups.com
I like BASIC Plus 2. It has some structured constructs such as while and until and you can write GOTOless programs with relative ease. Virtual arrays are nice. They let you define arrays that are actually disk files so your array sizes are not constrained by RAM limitations. It's a compiler so the result runs fast and you can link its output with other languages such as calling FORTRAN routines from BASIC.

Tom L

your, you're - I know the difference!

Jochen Lillich

unread,
Mar 20, 2020, 3:44:47 PM3/20/20
to [PiDP-11]
Hey Tom,

Thanks for your feedback! I looked at the BASIC Plus 2 reference manual yesterday and was quite impressed by its capabilities such as the file-mapped arrays you mention. Looks like you can build some serious stuff with it, even on a 16-bit machine.

I might just try some BASIC again after 25 years. :)

Cheers,
Jochen

On Friday, March 20, 2020 at 12:51:12 PM UTC, Tom Lake wrote:
I like BASIC Plus 2. It has some structured constructs such as while and until and you can write GOTOless programs with relative ease. Virtual arrays are nice. They let you define arrays that are actually disk files so you're array sizes are not constrained by RAM limitations. It's a compiler so the result runs fast and you can link its output with other languages such as calling FORTRAN routines from BASIC.

Tom L

Bill E

unread,
Mar 20, 2020, 4:06:39 PM3/20/20
to [PiDP-11]

Sorry, I just can't control myself, C is the One and Only True Programming Language. I've written many hundreds of thousands of lines of code in it, same for Java (oh wait, an anachronism), many, many thousands of Basic (under RSTS/E, I think Basic is a horrible scourge that should be stamped out), even more thousands of assembler. Just learn C, works nicely under RSX. OTOH, it doesn't have training wheels, you do have to know what you're doing. To more directly answer your question, if you are a casual programmer and just want to do some simple coding, Basic is probably the best choice, but it is a pathetic language that encourages horrible programming practices. And before everyone jumps all over me, what are your creds? If you use a phone, 90% chance it works because of sw I wrote. (Yes, I'm very modest. :) ) Forget Fortran. It's pretty primitive. And yes, I've written Fortran, but only ~ 50K or so lines of code. I'll just say my Fortran started with MIT dept 2. Just my humble opinion.

Gerry Duprey

unread,
Mar 20, 2020, 4:18:01 PM3/20/20
to Bill E, [PiDP-11]
So while normal Basic is pretty bad, DEC basic always had support for things that eased the worst
and with Basic Plus 2, it is actually a pretty decent language. Basic and Fortran were the more
"native" languages for RSX/RT11/RSTS systems (C was it for the unix systems) - not counting MACRO-11
(which was always there, but a bit low-level for full application development). Most RSTS/E system
programming manuals assume you are using Basic (lots or CHR$() stuff in the reference material).

In addition to being a compiled language, as mentioned earlier, you can write code without GOTOs
easily, in fact, without line numbers. It has some pretty advanced features including virtual
arrays, solid function() support, modifier statements (loved that!), multi-source-file
compilation/building, etc. Because it's linked with TKB, you can easily call MACRO-11 add-on, use
overlays for larger programs and use I&D space on processors that support it.

It is still basic, but it is seriously enhanced compared to any basic you could find on anything
else of the period. We built unbelievably complex programs using it - stuff that was hard to do
with the tech 10 years later. The fact that it was working (with MACRO-11 assists and very careful
overlay tree building) in 16-bit space was (and, knowing what I know now, still is) amazing.

It really is not a bad place to be if you want to immerse yourself into the world of PDP-11 O/Ss of
the period.

Gerry
> --
> 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 <mailto:pidp-11+u...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pidp-11/6e7b9546-a8d5-47eb-a226-9eb6203a2d4c%40googlegroups.com
> <https://groups.google.com/d/msgid/pidp-11/6e7b9546-a8d5-47eb-a226-9eb6203a2d4c%40googlegroups.com?utm_medium=email&utm_source=footer>.

sunnyboy010101

unread,
Mar 20, 2020, 4:23:43 PM3/20/20
to [PiDP-11]
Well, Bill - I do agree with you about C.

However, having worked on hundred-thousand line FORTRAN programs in the 80s (reservoir simulators), it worked. I switched to C in about 1990 and still love it for the power it provides.

I've used FORTRAN, C and Java in 'real world' programming 'for money' (i.e. work or consulting) and have written a lot of code in all 3 languages. I've even used PL/I for a while at an IBM shop, and that was fun too.

There are languages I've learned and won't use except under extreme duress. There are also languages I refused to learn under any circumstances - Visual Basic and Turbo Pascal come to mind. Mostly because I had to clean up messes made with them by people who probably should not have been programming. ;-)

Bill E

unread,
Mar 20, 2020, 4:29:49 PM3/20/20
to [PiDP-11]
I do have to admit I was involved in writing a large financial program for a major bank in Basic under RSTS/E, and other than the clunky syntax, it was pretty powerful. The OS was mostly written in Basic, which also made it really easy to hack. Essentially zero security, we hacked in a login back-door that gave full access with no password..OTOH,major bank, no security? I'm embarrassed now.

Bill E

unread,
Mar 20, 2020, 4:39:17 PM3/20/20
to [PiDP-11]


On Friday, March 20, 2020 at 4:23:43 PM UTC-4, sunnyboy010101 wrote:
 I've even used PL/I for a while at an IBM shop, and that was fun too.
Be still my beating heart. I wrote some PL/I under Multics. Great lang, but way too verbose. It was key to the revolution in OS's (Multics->Unix->Linux) and modern programming. But, this is wandering off-topic. For RSX, the programming I did was in assembly, and MACRO-11 was a pretty good assembler, but that's beyond any casual programming. Guess I have to still say, Basic for casual programming under RSX.

Steve Tockey

unread,
Mar 20, 2020, 5:01:18 PM3/20/20
to [PiDP-11]
Please, people, please, before this turns into Total (and Totally Useless) Philosophical Flame Wars, do not forget the simple saying,

"The right tool for the right job"

Each programming language is merely a tool that has certain strengths and weaknesses and is (or, was, in its historical context) therefore more--or less--suited to any specific situation.

My credibility? 45 years of software development experience, 42 of them paid. A ton of various applications domains, many of them safety-critical. Author of dozens of technical papers and two books on Software Engineering.

Bill E

unread,
Mar 20, 2020, 5:20:26 PM3/20/20
to [PiDP-11]


On Friday, March 20, 2020 at 5:01:18 PM UTC-4, Steve Tockey wrote:
Please, people, please, before this turns into Total (and Totally Useless) Philosophical Flame Wars, do not forget the simple saying,

"The right tool for the right job"

Thanks for reminding me. That is my philosophy, They're just tools, not a religion.

Neil Higgins

unread,
Mar 20, 2020, 7:21:53 PM3/20/20
to [PiDP-11]
MACRO, MACRO, MACRO. Huff, huff, huff.

Adam Thornton

unread,
Mar 20, 2020, 7:25:11 PM3/20/20
to Neil Higgins, [PiDP-11]
MACRO, MACRO, MACRO.

Worst episode of The Brady Bunch EVER!

On Fri, Mar 20, 2020 at 4:21 PM Neil Higgins <1955...@gmail.com> wrote:
MACRO, MACRO, MACRO. Huff, huff, huff.

--
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/e47ae048-e89c-46dc-b9d0-c9967602cc52%40googlegroups.com.

Johnny Billquist

unread,
Mar 20, 2020, 7:49:17 PM3/20/20
to Jochen Lillich, [PiDP-11]
Lots of answers already. And you'll probably get as many opinions as
their are people replying.

I think there is no easy answer to your question. It more boils down to
what you want to do, and what you feel most comfortable with.

I can give a few reflections on capabilities of each language under RSX,
but feel free to come back with more specific questions.

C:

The DEC C compiler is ANSI C89. It is fairly good as C compilers go in
terms of capabilities and functionality. It does not generate
particularly good code, but that might be less of an issue unless you
want to start looking at the generated code. C also have a few issues in
general fitting in under RSX, since RSX have some fundamental different
solutions to things compared to Unix. DEC did provide libraries to
access native RSX functionality, but that quickly becomes a bit complex,
and not something I'd recommend for someone who wants to do some quick
coding. And if you don't access the native functions, you are stuck with
some limitations. I/O cannot access all the power of the asynchronous
nature of RSX, you cannot access the rich functionality of RMS, and you
also don't have the full functionality you would expect in a Unix
system. So it works for simple programs, but if you want to do more
complex things, you're going to have to learn a lot you probably have
not seen before. However, it is possible to do almost anything in C, and
really access pretty much any kind of functionality you'd be interested
in without having to step outside of what C provides.

BASIC:

The BASIC dialect available in RSX is very much a superset of anything
you've probably seen anywhere else. There are constructs and features
that makes it possible to do way more structured programming than people
might think. However, it is still BASIC, and there are certainly some
limitations to what can be done without reaching over into assembler or
some other fancy language. BASIC do allow easy access to almost anything
in RMS, though. But more advanced RSX capabilities are not possible to
easily use from BASIC.

Pascal:

All the Pascal implementations I've seen are pretty close to Pascal
standards as far as they go. Then they are extended in the most obvious
field, which is I/O. But it is still pretty basic functionality. So,
similar to C, it's easy to write simple programs, and you have a nice
environment as far as it goes, but with Pascal you really have to step
over into some other language once you want to do some fancy stuff.
Pascal offers very little in the way of RMS functionality, or advanced
RSX capabilities.

FORTRAN:

In many ways, FORTRAN is maybe the best developed language in RSX. You
can access pretty much all RMS functionality easily. You can also get to
much of the RSX capabilities while keeping with FORTRAN. But there are
some things that are hard to do. So it depends on how tricky programs
you want to write.


And to throw in a few more:

Forth:

The Forth in RSX is a pretty standard FIG Forth. It's nice and easy to
work with, and have lots of functionality. But it does not offer
anything in the way of RMS functionality, or advanced RSX capabilities.

Lisp:

There is XLisp for RSX. It's a pretty nice, object oriented Lisp system
that is very capable. But just like C, it don't really offer any access
to RMS, nor advanced RSX capabilities.

Cobol:

There is a Cobol 81 compiler for RSX. As far as I can tell, it is rather
good, but since I can't really program in Cobol myself, I cannot really
say much about it.

BCPL:

I do have a BCPL compiler, but no experience with the language at all.

Simula-2:

Again, I have the compiler, but am missing a file or two. I think I have
the capability to solve that problem, but then again, I don't really
know Simula, so I can't say much about the compiler.

TECO:

If you want to go really crazy, this is the language for you. But I
really mean it when I say "crazy".



And to make a few other comments.
As a part of my project of making TCP/IP available in RSX, I also want
to provide usable functions and libraries for different languages to
communicate. And to make sure those libraries are usable, I've written
various applications in different languages.
So I have a web server, IRC client and IRC bot written in BASIC. Mail
and NTP written in C. A silly simple daemon written in Lisp. Yet another
simple test daemon written in FORTRAN, and various other tools and
servers written in MACRO-11.

Johnny

--
Johnny Billquist || "I'm on a bus
|| on a psychedelic trip
email: b...@softjar.se || Reading murder books
pdp is alive! || tryin' to stay hip" - B. Idol

emt377

unread,
Mar 20, 2020, 9:16:54 PM3/20/20
to [PiDP-11]
No-one's mentioned BLISS-16?

Though perhaps the compiler only runs on VMS?  I forget. 

Johnny Billquist

unread,
Mar 20, 2020, 9:41:16 PM3/20/20
to emt377, [PiDP-11]
On 2020-03-21 02:16, 'emt377' via [PiDP-11] wrote:
> No-one's mentioned BLISS-16?
>
> Though perhaps the compiler only runs on VMS?  I forget.

Only VMS. Or possibly also TOPS-10. There was also BLISS-11, which I
think was only on TOPS-10.

DEC did an attempt at a native BLISS for RSX, but it never was fully
developed or used, and I have not seen it. I only have some
documentation about it.

Mark Matlock

unread,
Mar 20, 2020, 10:58:15 PM3/20/20
to [PiDP-11]
There have been some great posts on this thread and some really great reviews of not only the “best” programming languages but also some of the more obscure ones.

One layered product from DEC that can also be used for some types of programming projects is Datatrieve. If you have not looked at Datatrieve it is well worth the effort. It’s query language and database capabilities are really great for the time in which it was developed and for many projects I think it is as good as anything out there today (IMHO). It makes full use of RMS and provides one of the better ways to get certain RMS related things done. It can also be called from Basic or Fortran, even remotely from other DECnet nodes (DDM$$$ is the Datatrieve server object #30). It’s report writing language and procedure programs can do certain types of database related things very well and reasonably fast since it utilizes much of what RSX and RMS can offer.

The other obscure language that has not been mentioned is APL-11. If your goal is to invert some matrixes, do some statistics or math it is worth a look. It has an interesting history and was developed originally as a math notation and later converted to a programming language. Normally you need a special terminal to access it (and some others on this board have developed a Tek 4010 emulator that can be used with APL-11 to give the full effect, but DEC also implimented two character ascii codes that map to APL symbols. If you ever used APL in the past (as I did once on a MCM 700 the first portable personal computer that implemented APL on an Intel 8008) you should try APL-11. It only has a 32K workspace and I’ve been trying for years to get a hack done on the RSXSIG F84 tape for M+ V2.1 to work in I/D space to provide a 64K workspace.

Lastly, for any of the languages that have an immediate mode of execution (Basic, Datatrieve, Forth, APL) command line editing is really helpful. That is possible with the ACD that Johnny developed for RSX. You can find it in [CLEACD]. Once activated it allows you to up arrow and edit your previous command like VMS (or RT-11).

The one thing that I would totally agree on is that you do want to choose the right tool for the job, and sometimes on a PDP-11 that is Macro-11.

Mark

Jochen Lillich

unread,
Mar 21, 2020, 9:06:10 AM3/21/20
to [PiDP-11]
Thank you for all your input! You know what? I'm going to try not one but a few of your suggestions. My main goal is to find out how programming a mini computer felt like years before I started my own journey with BASIC in 1984. A journey that led me to code in more than a dozen programming languages, albeit some (such as Ada or Prolog) only for the duration of a single college course.

I'll start with BASIC because B2S looks so much more enterprisy than Commodore/MS BASIC. Later, I'd like to see how it feels to write C on a non-Unix platform. And I'd like to find out how Pascal could be used outside of school projects. To someone like me who used DBase and Clipper, a tool like Datatrieve sounds interesting, too; I don't know how to get my hands on it, though. And maybe I'll even go right down to the metal and try MACRO-11...

On a side note, this forum is a funny experience. I feel like the novice among the greybeards, despite me being very salt-and-pepper myself. :D

Johnny Billquist

unread,
Mar 21, 2020, 10:25:40 AM3/21/20
to Jochen Lillich, [PiDP-11]
One easy way of testing out various languages, including Datatrieve, is
to log in to Mim.Update.UU.SE using telnet.

Most every language and tool is already installed on that system. And
it's free to use.

But of course, it is not the machine you are looking on the front panel
of then...

(And for the truly genuine experience, telnet to Magica.Update.UU.SE,
which is a real PDP-11/70. Also with all software available...)

Johnny
> --
> 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
> <mailto:pidp-11+u...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pidp-11/13f2e370-7818-433e-a956-66f8acbe34f7%40googlegroups.com
> <https://groups.google.com/d/msgid/pidp-11/13f2e370-7818-433e-a956-66f8acbe34f7%40googlegroups.com?utm_medium=email&utm_source=footer>.

Jochen Lillich

unread,
Mar 21, 2020, 4:33:53 PM3/21/20
to [PiDP-11]
Hi Mark,

While the ACDs seem to get installed by default, up arrow doesn't have the desired effect, it only displays "[A" in my VT100 emulation. Is that a key mapping issue?

Best regards,  
Jochen

Johnny Billquist

unread,
Mar 21, 2020, 4:37:03 PM3/21/20
to Jochen Lillich, [PiDP-11]
That the ACD is installed is not the same as it being active on your
terminal.
You need to do that separately.
The command is:

ACD LINK TI: TO <something>

If installed the same as on my system, I have logical names for the two
variants of key bindings:
CLE$EDT
CLE$EMACS

so, then you'd do something like:

ACD LINK TI: TO CLE$EMACS

for example.

Johnny
> --
> 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
> <mailto:pidp-11+u...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pidp-11/7750c3b1-37ec-4d88-89db-638a370ee640%40googlegroups.com
> <https://groups.google.com/d/msgid/pidp-11/7750c3b1-37ec-4d88-89db-638a370ee640%40googlegroups.com?utm_medium=email&utm_source=footer>.

Terry Kennedy

unread,
Mar 21, 2020, 5:14:49 PM3/21/20
to [PiDP-11]
On Friday, March 20, 2020 at 4:06:39 PM UTC-4, Bill E wrote:

Sorry, I just can't control myself, C is the One and Only True Programming Language. I've written many hundreds of thousands of lines of code in it, same for Java (oh wait, an anachronism), many, many thousands of Basic (under RSTS/E, I think Basic is a horrible scourge that should be stamped out), even more thousands of assembler.

Vast quantities of RSTS/E itself are written in BASIC. In fact, up until somewhere in V9.x (I think), you got the sources to all of the CUSPs (Commonly Used System Programs) and got to select whether they got compiled with CSPCOM (a V1.x offshoot of BP2, shipped with the system, not guaranteed to compile anything else) or BP2 (if you had it installed).

If the program is a one-off, the best language is the one that the available programmer can create most rapidly and correctly in whatever language is at hand.
If it will be used more than once, things like security (a relatively recent concern), maintainability, etc. get some say in the choice of language.
If it will be part of a "Programming System" (as defined by Fred Brooks) it gets developed in the language mandated by the organization, down to even the tabs-vs-spaces debate

When I did the MOP server for RSTS/E for Digital Canada, it was done using the coding conventions and choice of language dictated by Digital. That was BP2 with a couple lines of Macro thrown in for things that BP2 just didn't provide (setting up an Ethernet multicast filter, for example). I had to add a delay configuration option because this code was beating the native code on both RSX and VMS. https://www.glaver.org/ftp/tmk-software/mop-server/

Unlike VMS, where each program was written in its programmer's favorite language (allegedly so the RTLs would always be up-to-date and the compiler products would always be sold), generally management (either technical management or otherwise) gets to dictate the choice. And this "grab bag" of languages made the initial VMS port from VAX to Alpha a real pain.

Here's some selected quotes from an internal (but widely available) Cisco manual, regarding style:

Coding Conventions: Something for Everyone to Protest

The Cisco IOS software, despite popular misconceptions to the contrary, has conventions for

designing, writing, and documenting code.

...

Some of the issues addressed in this appendix are magnets for controversy, especially topics such as

pretty printing and white space conventions.

...

For you, the

engineer, this translates into higher stock prices. And if you want to publicly claim to other Cisco

employees that you do not care about making the stock price go up, you might as well smear yourself

in A-1 Steak Sauce and jump into the polar bear exhibit in the Anchorage, Alaska, zoo. You’ll live

longer in the exhibit with the bears.



Mark Matlock

unread,
Mar 21, 2020, 5:15:26 PM3/21/20
to Johnny Billquist, Jochen Lillich, [PiDP-11]
Johnny,
   Exactly right!

> ACD LINK TI: TO NUMBER CLE$EMACS

Jochen,
    There are a few things that the ACD Command Line Editor does not work with for example SET HOST (RMT) but it does work with LAT, and Johnny’s Telnet so I normally don’t put it into a LOGIN.CMD.

Best,
Mark

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/e867b70e-1961-9bc7-51ca-1c5dc06bb995%40softjar.se.

Neil Higgins

unread,
Mar 21, 2020, 8:26:02 PM3/21/20
to [PiDP-11]
Jochen,

To be pedantic, you’re not “on the metal” unless you throw away the operating system. Most people want to “get away from the metal” as far and as fast as possible, in order to finesse around the inevitable limitations of finite hardware. Just try programming a PIC16F84 in assembler, and you’ll rapidly come to understand what I mean (the expression “the maximum abomination for your dollar” comes to mind).

MACRO-11 is/was a remarkable assembler, complimenting the PDP-11’s lovely architecture. If you had to program “on the metal” these together provided a really solid platform.

Cheers, Neil

Neal G.

unread,
Mar 23, 2020, 12:57:08 AM3/23/20
to [PiDP-11]
Jochen,

FORTRAN ... it's a classic, was used widely, and it allows me to run my routines on other systems (Windows, Linux, VAX, CDC 6500) for comparison with only minor modifications. But if you're looking to explore the PDP-11 and RSX-11M-Plus then choice of a high-level language is not so important. You'd instead need to explore how the operating system deals with the wide variety of possible system hardware configurations, how it shares resouces while concurrently running multple user's tasks, and at the same time provides quick response to realtime tasks.  Regarding the PDP-11 instruction set, I agree with Neil H. that it is worth spending some time in assembly on micros (Ateml ATTiny24 was my favorite) and perhaps some classics (1802, 8080, 6800) to better appreciate the design of the PDP-11 instruction set.

- Neal G.

Allan Small

unread,
Jan 30, 2021, 1:02:13 AM1/30/21
to [PiDP-11]
Hi Jochen,

:) I started back in the mid 80's working with PDPs, VAXen and other systems of the day.  Most of the coding I did at that time was either Basic or Assembler.  

BasicPlus2 was a nice, general purpose, structured programming language.  An everyday workhorse.  I liked the statement modifiers as these enabled you to be concise - you now see these appearing in other languages like PERL and Ruby.

Macro-11 wins hands down for anything system programming related - any time you need to manipulate bits not bytes or words.  For example it might take you a page or more of code in a higher level language to setup and call an RMS routine, whereas it could be done in half a page of Macro-11.

I guess it comes down to what you want to show in your Twitch feed.  Some examples:  How thinking around technology from this age shaped modern approaches (eg statement modifiers).  Illustrate challenges with earlier technology that are no longer an issue (position independent code, program overlays, etc).  A good description of the ways the PDP-11 instruction set influenced the design of C might be nice.

All the best

Allan Small

unread,
Jan 30, 2021, 1:19:01 AM1/30/21
to [PiDP-11]
Thank you guys for the description of how to use ACD for command line recall :).  
Reply all
Reply to author
Forward
0 new messages