Using VSCode ot program in Assembler on OS/8?

60 views
Skip to first unread message

Stefan Wolfrum

unread,
Apr 14, 2025, 10:15:24 AMApr 14
to PiDP-8
Hi fellow PiDP8 enthusiasts,

I did a quick search for "VSCode" and got no hit. Really? Nobody ever asked here how it's possible to write Assembler (or Fortran or C or Focal or Pascal or ...) source files on a modern computer (a Mac in my case) in Visual Studio Code (with syntax highlighting!) and then by just pressing a button (or invoking some build command) transfer the source code to the PiDP8, compile it, run it and see the result in VSCode's terminal window, too?

I'd really love to have this workflow up and running but I have no idea how to do this.

I asked ChatGPT and it gave me some instructions (it thinks it's possible!) but I didn't really understand what it meant. Plus, its "solution" relies on a tool called "os8-cp" which should be in the GitHub repository "https://github.com/larsbrinkhoff/pdp8-os8-tools.git" but that repository doesn't seem to exist anymore?!

So, anyone here eager to build this workflow? I can't believe that nobody has done this already ...

SIMH, err, pidp8i is up and running on my local Rapberry Pi Zero 2W that's attached to the PiDP8, I can ssh to it and access it from my other computers just fine.

Now what would be the next steps? 😳 

Thanks so much and have a great day!
Stefan.

Stefan Wolfrum

unread,
Apr 14, 2025, 11:51:49 AMApr 14
to PiDP-8
OMG! A typo in the third word in the subject!! 🤦‍♂️ 
"to"! It should have read "Using VSCode to program in Assembler on OS/8?" of course! My bad ... 😞 

Steve Tockey

unread,
Apr 14, 2025, 7:25:56 PMApr 14
to PiDP-8

Stefan,
I think you're going to find it to be a lot less trivial than you might be thinking. Are you going to ship source code from VS Code to the PiDP? Or are you going to compile & build on the host? Compiling & building on the host means the compiler and linker has to run there. Even if you're just going to ship source code to the PiDP then you need some code on the PiDP to catch it because that's not a native part of OS/8. It's going to be even harder if you want to ship binaries.

Anything on the PiDP end is probably going to end up being manual, at a minimum running and stopping whatever code gets there.

The other thing--although I'm not an expert in this part--is that syntax highlighting requires knowledge of the syntax of that specific dialect of the language. Some kind of "personality plug-in" for VS Code. I doubt such things already exist for PAL-8, OS/8 Fortran II, OS/8 Fortran IV, and so on. Actually, building those plug-ins would probably be the easiest part of the job. Getting the code to move--at what ever level: source or binaries--is likely to be the much harder part because the PDP-8 and OS/8 are really quite primitive. FYI, I am not even aware of any TCP/IP implementation that runs on any PDP-8. The best you're going to be able to do is some kind of serial line between them.


-- steve

Stefan Wolfrum

unread,
Apr 15, 2025, 8:01:50 AMApr 15
to PiDP-8
Steve,
I was thinking of editing the source code in VSCode on my Mac but being remotely connected via ssh to the Raspberry Pi which runs SIMH.
This is working fine for now, here's a screenshot that shows the contents of the ~/pidp8 directory and the opened file "hello.pal" even with PAL8 syntax highlighting.
Written by Jeff Andre – if he's here, too: THANK SO MUCH for your effort!

Now I need to learn how to "talk" to SIMH and if it's possible make it "see" this "hello.pal" file somehow.
It would be okay for now if I then had to manually start the compile job in pidp8i/SIMH ...

Any help much appreciated as I'm a total beginner here, not knowing anything about how SIMH handles OS/8 disk images and files therein.
I don't even know (yet) how to see (in OS/8) which images are mounted.
I just know about the DIR command. 😂 
Really need an "OS/8 for dummies" tutorial! 🙈 

Cheers,
Stefan.

Steve Tockey

unread,
Apr 15, 2025, 1:49:09 PMApr 15
to Stefan Wolfrum, PiDP-8

Stefan,
The best "tutorial" on OS/8 would be the OS/8 Handbook. You can find it on Bitsavers:


In terms of the filesystems, files in the PiOS file system are invisible to SIMH unless they have a) the right format, and b) been attached. SIMH disks appear in the PiOS file system as individual files. 

Mike Katz mentioned utilities that could transfer PiOS files into the simulated disks in SIMH. As for me, I just put code in flat text files in PiOS and use the OS/8 paper tape reader to get them into SIMH. There is an issue with the End-of-Line character being different in Pi world vs. the PDP-8 world that is either solved by the utilities that Mike mentioned or by a home-grown utility that I use. I can share more info on my utility and my workflow for code development if you're curious.

But regardless, it's going to be a multi-step manual process to go from the PiOS source code file into SIMH before you can do anything serious with it on the PiDP-8. It would be very difficult, if not impossible, to make it a fully automated process.

And, finally, I would not say that the example of Hello World you have is a "good" example of how to write PDP-8 assembly code. Much better examples exist.


-- steve



--
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/dee47aed-cea1-4f06-8501-e47a1e93650an%40googlegroups.com.

William Cattey

unread,
Apr 15, 2025, 6:07:48 PMApr 15
to PiDP-8
I do PAL-8 programming in VSCode through a bit of a circuitous route:
1. I maintain the sources in the tangentsoft repository (using the fossil Source Code Management system), and use VSCode to edit the files.
2. I have scripts that I run which use python expect to start simh, pull in the relevant PAL8-source assemble it, and do other things with it.

You can learn about the tools I have for maintaining PAL sources, building them, and testing them in SIMH here:


Using these tools I build, from source, and validate basic operation, all the tu56 and rk05 images y'all run in your pidp-8 environments.

-Bill
Reply all
Reply to author
Forward
0 new messages