View Full Version : Basic for RT-11 operating system

March 2nd, 2011, 09:43 AM
How quickly it gets old now that my 11/23 boots and runs RT-11 beyond copying, formatting and reading help files I have discovered that I now need a higher level language , compiler or interpreter I always get confused between the difference. Several questions present themselves, first: will any version of Basic fit on a RX-02 floppy? will it have to live on the RL-01 drive? Is there any difference between the versions for RT-11 and RSX? Second: can I talk anyone out of a copy of Basic on RX-02 or RL-01 media? Yea, I know RL media is worth like a million dollars per disk but you know what they say about a fool and his money. Third: can it be downloaded? Dose the code exist somewhere out there in a text or compressed file I can download? And on the subject has anyone perfected a way of pumping a file out of a modern PC into the paper tape port on a PDP? In theory it sounds simple to take and send a file out the serial port on a modern system but do not know what the protocol for appearing to be a paper tape reader looks like and just cannot believe it's just a serial transfer like the old cassette days but never have using a paper tape transport have no idea myself.
Ray F.

Lou - N2MIY
March 2nd, 2011, 04:12 PM

Everything you want can be done. I have Basic-11 V2 for RT11.

Pump the file out of a modern PC with an emulated TU58 (he typed again.) No paper tape required, just the unused port on the far left of your DLV11-J (or the non dec one you have.)


March 2nd, 2011, 05:00 PM

Ok, I'm over it now.

Bored already? or was it all too easy??

I can take a few of these... Most of the software you're asking for is available on the internet to be downloaded. Both RSX and RT languages [and other "layered products"] are out there.

Don't bother trying to run RT stuff on RSX or visa versa... it can be done but it's too much hassle. Stick with one or the other until you're tired of it. [at this rate it ought to take you at least a month or so to burn out on RT]

As you've already surmised, getting it into your real PDP-11 environment will involve some gymnastics involving PC based emulation of Tape Devices [TU58 seems to be most popular] Lots of examples of this exist and people here to help you with them. Although you might have some special difficulties because your console device isn't a real DLV11J or J1.

It would really help us, help you, if you could give an idea of your main area of interest?

Do you want to learn about the machines themselves?
Programming in MACRO-11 assembly?
You mentioned BASIC [which is compiled on PDP BTW]

Take myself for example...

I am basically a [I]librarian at heart. I hate the idea of "Lost Information". [I cry every time I think of the Ancient Library at Alexandria] What I want to do is be able to run old software I've written on OSs I've used. Lots of compiled programs for RSX. The ultimate goal is to run these on a PC under a simulated PDP environment like E11 or SIMH, and maybe even pass them on to others who are interested.

To do this, I have to be able to read them off of my old disks and tapes and transfer these to PC. To accomplish all that, I have to collect substantial documentation and other supporting items.

Starting with RT is probably "easier" in that you won't need to involve yourself in OS details as much as if you started in RSX.

There are other things to consider...

RSX is a "Disk Operating System"... and requires a disk to run from to contain checkpointed tasks, whereas RT can run from pretty much anything, as it's "memory resident". The media it starts from is only a detail.

MEMORY - it takes more memory than 64KW to run a decent RSX system. I'm not sure how much you'll need for RT to really do anything.

It's not a one way decision... You can always change your mind.

What else did you bring up... Oh yeah... media... a way to use current hardware disk drives in your real system would be a huge advantage for you, even if you keep the original ones around for nostalgic purposes. Keep the old drives working, but save em for when it counts?

You seem to be very hardware oriented, so it wouldn't surprise me if you told me you ultimately wanted an older machine than an 11/23 to play with.

Anyway... does any of that help?

March 3rd, 2011, 05:58 AM
I am a hardware person, my programming skills suck. Thatís why I want the Basic compiler so I can write little programs and have them run on the PDP. The 11/23 project is the next step after spending time building up many old 8080/8086 type system. Wanted something pre DOS, originally looked at 11/05 systems but way too expensive and now knowing the limitations of the 05 happy I went with the newer Qbus system but if I can come across a Unibus system would jump on it. The object is to build up systems and get them working, beyond that after they are complete they get pushed to the side for the next project. It appears to me now that the "Holy Grail" of the Dec world would be protocol and procedures that allows us to upload and down load programming from the old Dec system to a modern networked system. In my little mind the TU58 port appears to be the key to doing this and that will be the next direction for this project, developing procedures and hardware to allow programming to be pushed or pulled via an intermediate system to a web page or ftp site. Being that I have never had an original idea I would assume someone has already done this so if the interface and site already exist can you point me their?
As far as the RT-11 stuff am working on learning how to do things in the RT world, lot like DOS only more primitive, lots of switches and extensions on commands and not having a line printer is a problem because when I print help topics they tend to scroll off the display and I only have the bottom of the file. Can format a disk using .FORMAT DY0:\SIGNALEDENSITY but no clue on how to make a bootable disk yet. There is some weird switch in the .COPY command labeled "BOOT" but I do not yet understand the meaning of it. Isn't their a RT-11 for idiots out their somewhere?

March 3rd, 2011, 08:59 AM
It appears to me now that the "Holy Grail" of the Dec world would be protocol and procedures that allows us to upload and down load programming from the old Dec system to a modern networked system.

Hey, you have just invented DECnet. At one point I had one of my PDP-11/73 running RSTS/E 10.1 with DECnet installed on a DELQA, and then I was able to copy files back and forth to a VMS system also running DECnet. The VMS system was also running TCP/IP so I could copy files back and forth from there to everything else. You can run DECnet on PCs, but I don't have the software on hand to try that.


Lou - N2MIY
March 3rd, 2011, 03:50 PM
There is also the TCP/IP package for RT-11 here: http://shop-pdp.kent.edu/rthtml/tcpip.htm

I run the small version on the 11/04 (maxed out at 32kW of core) with a DEUNA and have no problem transferring files by FTP. I also run this on the qbus machines with DELQAs. It works quite nicely.


To stop the stuff from scrolling by so quickly off your screen, hit CRTL S and the computer will stop sending. When you're ready for more, type CTRL Q. By doing this, you are manually sending XOFF and XON.

COPY /BOOT is like the SYS command in MS-DOS. It will make a disk bootable by writing the appropriate secondary loader and system head to the first few tracks of the floppy.

You should download yourself a copy of the RT-11 manuals off of bitsavers.

You can learn about TU58 emulation here: http://www.fpns.net/willy/pdp11/tu58-emu.htm . It works good.


March 3rd, 2011, 05:41 PM
There is also the TCP/IP package for RT-11 here: http://shop-pdp.kent.edu/rthtml/tcpip.htm

I run the small version on the 11/04 (maxed out at 32kW of core) with a DEUNA and have no problem transferring files by FTP. I also run this on the qbus machines with DELQAs. It works quite nicely.

Thanks for that link. That is new to me. I'll have to experiment with that when I have some time.

There is also Kermit-11 for file transfer if you don't have any interfaces on your PDP-11 other than async interfaces.


I haven't actually tried that out myself yet. It's also on my growing to-do list. I usually use Kermit-95 as my terminal emulator on my PC.


March 3rd, 2011, 07:54 PM
I am a hardware person, my programming skills suck. Thatís why I want the Basic compiler so I can write little programs and have them run on the PDP.

I know you said more than this, and thank you, but based on this beginning I'm going to suggest something a little unorthodox.

You are getting mired down in OS minutia to begin the most fundamental of lessons... programming skills. You are a capable hardware guy, [photographic evidence shows it] with above average skills and tenacity.

Perhaps you might be better off learning a little assembly programming skills, and about the PDP-11 cpu architecture before going for all that other stuff. Now I'm not saying that other stuff isn't fun and all, but I'm a nutz-and-bolts guy myself, and taking this approach will be more useful to you, and faster for you to pick up.

Then you can layer on all that higher level stuff, because you'll have a foundation of knowing the underpinnings as few do.

Perhaps your first assembly project should be to first use, then understand what we used to call the "toggle in" RL boot? Pull the BDV from your system and boot an RL drive this way. Get out the processor manual and understand each instruction, and what it's doing. [be sure to keep the media write protected though, eh?]

When that works, the next thing I'd suggest is writing a small diagnostic program to troubleshoot your bad memory boards. Heck, you might even fix one.

You can use a PC to take notes on, so you won't need to get involved yet with all those PDP RT details.

In the process you'll learn ODT throughly, which will serve you well if you continue in PDP land. The fundamental programming skills, of registers, loops, tests and program control will apply to every language you encounter from then on.

Anyway, that would be my suggestion. It's a bottom up approach, but should give you satisfaction and you'll be playing with your PDP at the same time.

If you really want to learn BASIC, load an old PC with DOS and GWBASIC, or get a copy of microsoft's compiled basic [BC7]. But frankly, most of the mechanics of using these are so different on the PDP, that it will be mostly a detour for you to learn one or the other and I don't think it will much help your fundamentals of programming.

March 17th, 2011, 01:05 PM
Hey, you have just invented DECnet.
And there is HECnet (http://www.update.uu.se/~bqt/hecnet.html).

March 30th, 2011, 09:44 AM
I'm fairly new as a contributing member so I want to be careful about disagreeing with a senior member like RSX11M, but I'm going to do so anyway! He said you are getting 'mired down in OS minutia' but I'm not sure starting with macro and bootstrap minutia is better :-)

One of Qbus's first posts mentioned the compiler vs interrupter issue. I know Lou, who replied above, is a Basic fan. That's normally an interupter, you type in the code and run it. You do not have to compile and link, but it runs a little slower cause the interupter has to be resident to handle things for you. Macro and Fortran are compiled languages which are readily available for RT11 and RSX. You first compile (over and over again to fix your mistakes), then link to produce an executable file, but after this the executable will run stand alone by itself. Macro is at the nuts and bolts level, Fortran is a higher level language with syntax that isn't so different from Basic. I personally think its easier to learn a 'high level language' and get something done quickly than it is to learn Macro. On the other hand I used to maintain a page about how to toggle in bootstraps in ODT and its a valuable skill, just not where I'd start if I were you. That's my two cents, and I wanted fortran mentioned as a lot of RT11 programming was done in this language.

March 30th, 2011, 10:48 AM
Understand that I am not a programmer or never attempted to be one. Iím a mechanic! I have already built and have much experience in DOS base systems and have written and worked in Basic before so I am not building up the PDP-11 system for working in basic but want basic so I can write cute little programs so when I demo the system it looks like its doing something useful. If it was just a matter of working in basic I have everything from the IBM 5150 in ROM basic, GW, QBasic and everything up to Visual. I have been attempting to learn the secrets of ODT and have some small progress in that direction and have been reading a book on assembly programming but beyond addressing memory locations or registers have never gotten very far in assembler. I have FORTRAN on my RL drive and maybe its time to start looking at that. Donít know why, perhaps because of my limited abilities I have felt that working with assembler is a drag and working in higher level languages is easier for me to deal with but perhaps thatís the difference between a programmer and a mechanic. I am concerned that the further I devolve into systems that everything will have to be assembler for that platform; maybe I should try stamp collecting.

March 30th, 2011, 02:04 PM
I see now that this has all been too easy for you. LOL

Well, then BASIC is a pretty convenient tool, considering where you're coming from. [Sorry, I didn't realize you had so much background] The problem is - it's not directaccess to the hardware. [FORTRAN is even worse] Being a hardware oriented troubleshooting kind of guy, I didn't want you to go through a big detour [to learn RT and PDP BASIC] only to discover it wasn't "low level" enough - and had too many limits.

I'm wondering what kind of thing those "cute little programs" might do?

I had the idea that you might write some aids to find the problem on your MSV boards, for example. That won't be possible in BASIC, because the presence of the board makes your system unbootable. It's the kind of thing you can best do from ODT.

I suppose I've colored your needs with my own past. Until you are in the position of using tools like oscilloscopes and little programs, to debug and exercise hardware, - tracing address decoders through a PCB, watching read-write lines, data bits and addresses propagate through a board, and actually seeing the problem.... well, you're just not having fun!
I believe the term willyk is using is "Interpreter"?

Perhaps I was too hasty at dismissing the idea of learning RT as a path to fulfillment. If you take this road, just remember you're learning syntax and skills that probably won't much apply to anything else. Then again, reading ancient Egyptian hieroglyphics is fascinating to me, even though I can't use it anywhere.

Running UNIX on the system, might serve you better.

Anyway, it's all just an opinion and I could be entirely wrong if I misunderstand what turns you on.

Best of luck on that stamp collection, but it's not my cup of tea.

Lou - N2MIY
March 30th, 2011, 03:50 PM

As a fellow mechanical guy (my day job is as a mechanical engineer) allow me to continue to encourage you to play with RT-11 and Basic-11. Not only will you be able to make cute programs, but do useful things too. Basic-11 can be patched to work with hardware (I have patched basic to add routines to work with an HPIB card and talk to fun HP data acquisition and control units). There was also a DECUS patch that allows PEEK and POKE type interaction (haven't tried it yet, but it's on the list.) I intend to use the peek and poke with some qbus A/D D/A cards I have.

I can mail you Basic-11 on RX01 or 2 and a CD of the manuals if you like.

You can skip the stamp collecting. My wife does that and it doesn't look as fun as Basic-11.


March 31st, 2011, 05:07 AM
Lou: if you have a link for that DECUS patch to Basic I'd be interested, email it or post it if you come across it.

But the ipoke() and ipeek() integer functions are a standard part of the Fortran IV language. Years ago I wrote some xmodem routines for my systems using Fortran IV to access the iopage and talk to the SLU. A cute project that talked to real hardware....

March 31st, 2011, 06:23 AM
QBUS... it seems you've fallen in with maniacs. I hope you can forgive us.

Got any good books on stamp collecting?

Lou - N2MIY
March 31st, 2011, 04:39 PM

I found DECUS 110294. I also found two similar files here: http://www.ibiblio.org/pub/academic/computer-science/history/pdp-11/rt/misc/basic/ basext.src and basic.ext. I have not tried any of these, but they all look like they should work.


April 11th, 2011, 07:39 AM
Thought I would take just a second to announce that I now have a copy of BASIC.SAV on the system and am capable of writing and running basic programs on the system and life is good.
Still have to repair floppy drive 1 on the RX-02, address some issues with the memory cards and learn how to be more proficient in RT-11, ASSSIGN DL DK, VOL COPY: VOL *.SYS Arrrgh!!! But there is a light at the end of the tunnel. Thanks again to everyone who helped.
Ray F.

Lou - N2MIY
April 11th, 2011, 05:49 PM

Congratulations. Now I am no longer the only one here that uses Basic-11! On the two floppies I sent you, you now also have all the original source code in Macro-11 for Basic-11 V2.0. If it was ever necessary, you could recompile the executable from the sources. I did that once (when I first got the sources.)

What is wrong with drive 1 in your RX02? Is the head alignment messed up?


April 12th, 2011, 07:45 AM
When I bought the system it had been stored in a basement for many years. Both of the AC motors on the RX02 were frozen and had to be disassembled cleaned and oiled to start working again. The entire system was full of something that looked like concrete dust so everything had to be broken down to individual sections and cleaned this involved taking the drives apart and reassembling them. First time I have worked on 8" drives so not 100% about alignment. Will start working on drive 1 soon, just with drive 0 working not been an issue. The RL-01 also was just as bad but did have the manuals and two drives so was able to build one working drive out of them, the alignment of the RL head assemblies and servo system were not that much different from working on old analog video tape machines so that went well. Little concerned about the air filter for the RL drives, the book say to replace it every six months or when ever it's removed but the best of the two I had were used and from 1980!
Ray F.

April 12th, 2011, 10:10 AM

if want to work with MACRO-11 and Basic, here is an example:
1) Example of a simple macro-11 program:

; Basic callable subroutine to receive the status of
; the CNC-machine in one integer word.
; Basic-Call: Call STATUS(S%)

.globl STATUS
.globl $ARGER
CSR = 167774
STATUS: cmpb #1,(r5)+ ; Number of arguments = 1
beq 10$ ; O.K. continue..
5$: jmp $ARGER ; ARGUMENT error
10$: tstb (r5)+ ; skip type checking
mov @#csr,r0 ; get status
bic #100000,r0 ; and clear bit 15 ( inhib neg.Int.)
mov r0,@(r5)+ ; save contens.
abo: rts pc ; return to caller

2) rebuilt the new BASIC interpreter with this command file:

mac/obj:bscli bsmac+bscli

I called it "cnc" , because it was a BASIC interpreter for controlling a CNC machine connected
on a DRV-11J.