autoboot PiDP-8 user program ?

82 views
Skip to first unread message

albinia hollyman

unread,
Sep 23, 2025, 12:02:00 PM (5 days ago) Sep 23
to PiDP-8
I'm attempting to set up a PiDP-8 on display to interest/intrigue undergrad students. If it is at all feasible, can a user program be automatically started after booting up a PiDP-8 with, e.g. OS/8, and if so, how ?   (like via /etc/rc.local on Unix/Linux)

Clem Cole

unread,
Sep 23, 2025, 12:27:59 PM (5 days ago) Sep 23
to albinia hollyman, PiDP-8
Modify the simh *.ini file and use the built-in expect tool to send the commands to OS/8
Note the syntax for simh's expect is a bit funky, so read the SIMH doc [https://github.com/open-simh/simh/blob/master/doc/simh_doc.doc]  in the OpenSIM  (ie, it is not the same syntax as UNIX  expect(1) command or its parent the UUCP "chat" sequence - but should do the job).

On Tue, Sep 23, 2025 at 12:02 PM albinia hollyman <albinia....@gmail.com> wrote:
I'm attempting to set up a PiDP-8 on display to interest/intrigue undergrad students. If it is at all feasible, can a user program be automatically started after booting up a PiDP-8 with, e.g. OS/8, and if so, how ?   (like via /etc/rc.local on Unix/Linux)

--
You received this message because you are subscribed to the Google Groups "PiDP-8" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pidp-8+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pidp-8/3dbff135-ddb1-4361-bacc-351d8182ced0n%40googlegroups.com.

Steve Tockey

unread,
Sep 23, 2025, 12:33:47 PM (5 days ago) Sep 23
to PiDP-8
There is nothing built into OS/8 itself, unfortunately. One can't expect much from an operating system that runs in 8 to 32K and was written in the early 1970s.

On the other hand, there could be a couple of options:

1) if the program you want to run can be represented as a self-contained simulated BIN format paper tape the it is possible to set up a SIMH boot script that will autoload and auto start that program. This is the most primitive and straightforward way of doing it.

2) The  setup facility that builds all of the PiDP-8/I software from the distribution repository uses a facility, I believe it is called PEXPECT (Python Expect) that can boot up an instance of the PiDP-8/I and inject OS/8 commands.

What sort of program are you interested in running?


-- steve

Rick Murphy

unread,
Sep 23, 2025, 1:12:11 PM (5 days ago) Sep 23
to Steve Tockey, PiDP-8
OS/8 allows you to run a program immediately after boot.
To run progam DEMO.SV after boot,
SET SYS INIT DEMO.SV
    -Rick

--
You received this message because you are subscribed to the Google Groups "PiDP-8" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pidp-8+un...@googlegroups.com.


--
Rick Murphy, D. Sc., CISSP-ISSAP, K1MU/4, Annandale VA USA

albinia hollyman

unread,
Sep 23, 2025, 3:58:09 PM (5 days ago) Sep 23
to Rick Murphy, Steve Tockey, PiDP-8
Thanks, I'll explore those options. Our PiDP-11 autoboots a basic bitcoin mining simulator (written in C) on bsd 2.11 -- I'd hoped to just translate that to Fortran IV for OS/8.

Message has been deleted

Steve Tockey

unread,
Sep 23, 2025, 6:23:33 PM (5 days ago) Sep 23
to PiDP-8

First, I tried

.SET SYS INIT DEMO.SV

in OS8 v3d (the most commonly used release, as far as I know) and what I got was

? INITIAL COMMAND TOO BIG

When I Instead tried

.SET SYSTEM INIT DEMO

on reboot I got

DEMO?
.

Maybe SET SYS INIT is only workable in OS/8 v3f?



Second, even if you can cause OS/8 to run a .SV file on initial boot, that doesn't actually solve the problem if it's a Fortran IV program. The compiler tool chain for F4 in OS/8 does not give you a .SV file. For example, if you have DEMO.FT as your Fortran IV source program then you compile it and link it you end up with DEMO.LD. That .LD file is then interpreted by the Fortran IV Run Time System, FRTS.SV. Specifically, you would type:

.R FRTS
*DEMO.LD$

You would NOT type:

.R DEMO

because DEMO.SV doesn't exist. Therefore:

.SET SYS INIT FRTS.SV

won't help because it only starts the interpreter, it doesn't also load the DEMO.LD file. I'm not sure if you could package FRTS.SV together with a *.LD file into a .SV file. It might be possible but even if it is, it won't be convenient to make it happen.


Good luck,

-- steve




Rick Murphy

unread,
Sep 23, 2025, 9:29:46 PM (5 days ago) Sep 23
to Steve Tockey, PiDP-8
It's limited to 5 characters. Pretty restrictive, but it's got to fit into a small space.
You can set up a batch file with contents like
$JOB RUN DEMO
.R FRTS
*DEMO.LD$

Give it a two-character name, like DM.BI. Then SET SYS INIT SU DM

I forgot it was so restrictive. 
    -Rick

--
You received this message because you are subscribed to the Google Groups "PiDP-8" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pidp-8+un...@googlegroups.com.

Steve Tockey

unread,
Sep 24, 2025, 9:40:01 AM (4 days ago) Sep 24
to PiDP-8

There will be a problem with the SET SYS INIT, I believe, if you try to have your demo program in Fortran IV. Specifically, the Fortran IV tool chain does not result in *.SV files. Instead, it results in .LD files which are interpreted by the Fortran IV Run Time System, FRTS.SV. If you start with DEMO.FT as Fortran IV source code in OS/8 it compiles and links into DEMO.LD. You then do not run DEMO.LD directly:

.R DEMO    <--- You do not do this.

Instead, you:

.R FRTS
*DEMO.LD$

So unless SET SYS INIT allows additional parameters, it won't work directly.

I will have to check to see if there's a way to convert FRTS.SV plus a *.LD file into a .SV file, but I'm not that hopeful.


-- steve


Steve Tockey

unread,
Sep 24, 2025, 4:51:13 PM (4 days ago) Sep 24
to PiDP-8

Rick,
Well, whadda know? It works. Mostly. I already have a Fortran IV version of Hello World named HW.FT for the source code file and HW.LD for the load image file. You have to make one change to the batch file, which I called HW.BI, from what you showed. It needs to include a $END. For me to run HW.LD on boot up, the batch file needs to be:

$RUN JOB HELLO WORLD
.R FRTS
*HW.LD$
$END

Without the $END you get trapped in an infinite loop of #INPUT FAILURE messages. With the $END, the batch file terminates nicely.

The command

.SET SYS INIT SU HW

 will work like a charm as long as both HW.BI and HW.LD are on the DSK: device.

Thanks for teaching a really old dog some new tricks. I first started using OS/8 in 1977 so I have a number of years of experience with it. I've never seen the SET SYS INIT command documented anywhere (e.g., in the OS/8 Handbook).


Cheers,

-- steve


Message has been deleted
Message has been deleted

Rick Murphy

unread,
Sep 24, 2025, 11:33:33 PM (4 days ago) Sep 24
to Steve Tockey, PiDP-8
Steve - 
Thanks for diagnosing the reason for the "INPUT FAILURE" error as I saw that but didn't remember. All of us have something to learn :)

I think the SET SYS INIT change came with OS/78 but that's probably wrong. At least something past V3D.

NOTE: If you're an old school OS/8 person, using BUILD to install and change handlers, you must use SET SYS NO INIT first as the usual run of BUILD followed by BOOT is usually followed by a SAVE SYS BUILD after the new kernel boots. Having an init script means you're now overwriting the build.sv that booted the system by whatever runs at boot. Been there, done that. :(
    -Rick

--
You received this message because you are subscribed to the Google Groups "PiDP-8" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pidp-8+un...@googlegroups.com.

albinia hollyman

unread,
Sep 25, 2025, 6:11:49 AM (3 days ago) Sep 25
to Rick Murphy, Steve Tockey, PiDP-8
Wow, well done, no wonder I was flummoxed.
Another challenge:-- at present I've four PiDP-8 windows: OS/8, {Linux} TOP, {Linux} root, and Rene Richarz's TU56 emulator (ostensibly for bitcoin mining data, but right now just a data sink). Ideally the Fortran IV program would pop up in a fifth window -- is that possible?  And if not, and if the init script overwrites build.sv, does that mean you canna get to OS/8 anymore?
Your help is really appreciated.

Rick Murphy

unread,
Sep 25, 2025, 6:36:49 AM (3 days ago) Sep 25
to albinia hollyman, Steve Tockey, PiDP-8
It doesn't overwrite BUILD.SV - you do.

Normal operation (sans SET SYS INIT) is to 
.RUN SYS BUILD
$ Do some stuff - insert drivers, etc.
$ BOOT
. SAVE SYS BUILD

What that does is to save the current driver configuration over the top of BUILD.SV - upon completion of the boot, BUILD is in memory and ready to save.  If you have an INIT script, then when that runs memory is lost. But OS/8 doesn't care and allows you to SAVE based on what's currently in memory.
    -Rick

albinia hollyman

unread,
Sep 25, 2025, 8:57:43 AM (3 days ago) Sep 25
to Rick Murphy, Steve Tockey, PiDP-8
Good, thanks, so if the Fortran IV output was sent to a terminal emulator (something equivalent to "cool-retro-term") in a 5th window, would the OS/8 console still boot up as normal in its window, i.e. are they independent processes, or has the Fortran IV program (intended to run "forever") taken over the whole machine?

Rick Murphy

unread,
Sep 25, 2025, 9:10:55 AM (3 days ago) Sep 25
to albinia hollyman, Steve Tockey, PiDP-8
OS/8 is a single-tasking system.  When you run something at boot, it's the only thing that (emulated) PDP-8 is running. If that program exits, you get the OS/8 "." prompt and can interact.
    -Rick

albinia hollyman

unread,
Sep 25, 2025, 10:30:39 AM (3 days ago) Sep 25
to Rick Murphy, Steve Tockey, PiDP-8
Yes, I suspected that. So when does the INIT script take over -- before the OS/8 console shows up, or afterwards. And later is it possible to abort this "forever" Fortran program from the console, and if so, how?  PS: I'd try it but am away, following this discussion with great interest
Message has been deleted
Message has been deleted

Rick Murphy

unread,
Sep 25, 2025, 1:32:18 PM (3 days ago) Sep 25
to albinia hollyman, Steve Tockey, PiDP-8
The way this is implemented is something like jamming the init string into the keyboard buffer that's read when the system boots. 
The SET program patches the operating system on disk to basically jam the command string into the image, and patches the on-disk image of the keyboard monitor (what prints the "." prompt) to act as if the user typed that command.

To kill the running program (assuming Fortran), just press control-C.
    -Rick

albinia hollyman

unread,
Sep 25, 2025, 4:20:08 PM (3 days ago) Sep 25
to Rick Murphy, Steve Tockey, PiDP-8
OK. I'll explore all that next week. One last question: would TSS/8 be a better option, given it's preloaded on the PiDP-8 ?

Steve Tockey

unread,
Sep 25, 2025, 4:53:42 PM (3 days ago) Sep 25
to albinia hollyman, Rick Murphy, PiDP-8
Trying to post a different way, maybe this will work ...

I don't believe TSS-8 will help you. It is multi-user but each user is only allowed 4k words of memory. That's enough for trivial programming in an introductory education environment, but it's almost certainly not enough to let you do anything remotely close to bitcoin mining.

Here's a brief overview of ETOS:  https://www.pdp8online.com/os/etos/etos.shtml
ETOS gives you much more of a full OS/8 experience, and with 20k of available memory per user it's 5 times as much as you get out of TSS-8. ETOS will also support more languages than TSS-8. There may be a Fortran compiler on TSS-8 but it's Fortran II at best, and again limited to 4k. ETOS will almost certainly run the OS/8 Fortran IV compiler.

-- steve


Steve Tockey

unread,
Sep 26, 2025, 11:42:57 AM (2 days ago) Sep 26
to PiDP-8

The INIT script takes over and needs to complete before the OS/8 dot (".") prompt appears.

It is possible to abort the "forever" program, it's just a matter of typing control/c on the console.

While OS/8 is a single user, single task OS--like RT-11 SJ on the PDP-11s, CPM on 8080s, and MS-DOS--there is a third party "timeshare" version of OS/8 called ETOS. Within certain limits, it allows a PDP-8 to offer a mostly OS/8-like environment across multiple users (IIRC, up to 8). I seem to remember there being some licensing issues with ETOS as early versions of the PiDP-8/I did come with it but current versions do not. It could still be available from other sources. I would suspect it's going to be the only way you'll be able to have more than one OS/8-style user (and window) at the same time. Having said that, I'm not sure ETOS allows for the kind of autoboot script you are looking for. I haven't used ETOS since about 1980.


-- steve

Steve Tockey

unread,
Sep 26, 2025, 11:42:57 AM (2 days ago) Sep 26
to PiDP-8

I don't know what's going on with Google Groups but this is the second time I've tried to post a message here that got deleted instead. I'm trying again ...

Albinia,
Now that Rick has solved the autoboot problem, I have many years of experience with OS/8 Fortran IV. It's not always like what you might expect with, for example, Fortran IV on the PDP-11. Let me know if you need any help with OS/8 Fortran IV, I might be able to bail you out.


Cheers,

-- steve


On Tuesday, September 23, 2025 at 12:58:09 PM UTC-7 albinia....@gmail.com wrote:

Steve Tockey

unread,
Sep 26, 2025, 11:42:57 AM (2 days ago) Sep 26
to PiDP-8

Albinia,
Given that Rick has solved the how-do-you-boot problem, I do have several years of experience with OS/8 Fortran IV so if you run into difficulty in the translation, let me know. I might be able to help you out. OS/8 Fortran IV can a bit quirky and unlike what you would normally expect out of Fortran IV.


-- steve

On Tuesday, September 23, 2025 at 12:58:09 PM UTC-7 albinia....@gmail.com wrote:

Steve Tockey

unread,
Sep 26, 2025, 11:42:57 AM (2 days ago) Sep 26
to PiDP-8

The INIT script takes over and needs to complete before the OS/8 dot (".") prompt appears.

It is possible to abort the "forever" program, it's just a matter of typing control/c on the console.

While OS/8 is a single user, single task OS--like RT-11 SJ on the PDP-11s, CPM on 8080s, and MS-DOS--there is a third party "timeshare" version of OS/8 called ETOS. Within certain limits, it allows a PDP-8 to offer a mostly OS/8-like environment across multiple users (IIRC, up to 8). I seem to remember there being some licensing issues with ETOS as early versions of the PiDP-8/I did come with it but current versions do not. It could still be available from other sources. I would suspect it's going to be the only way you'll be able to have more than one OS/8-style user (and window) at the same time. Having said that, I'm not sure ETOS allows for the kind of autoboot script you are looking for. I haven't used ETOS since about 1980.


-- steve



On Thursday, September 25, 2025 at 7:30:39 AM UTC-7 albinia....@gmail.com wrote:

William Cattey

unread,
11:51 AM (4 hours ago) 11:51 AM
to PiDP-8
Hi Steve,
I don't know why, but Google Groups sent some of your replies for moderation. As soon as I saw the moderation request, I approved it, but I've been a bit behind in email the past couple days.

-Bill
Reply all
Reply to author
Forward
0 new messages