Graphics programming on the PiDP-10

102 views
Skip to first unread message

Francis King

unread,
Sep 28, 2025, 5:56:08 PMSep 28
to PiDP-10
Now that I have two working PiDP-10s in effect (one the PiDP10 console / Pi 5, one the x86 simulation running on a Lenovo 580 laptop), I'd like to have a go at graphics programming. I am not sure how best to do this.

As I understand it, graphics requires ITS rather than TOPS-10 or TOPS-20. Is this correct, please? If so, I am golden, since I have figured out how ITS works, reasonably well.

Is there a guide to programming graphics? Is there a programming language which is more practical than the others?

Advice please.

PS: When I ran pdpcontrol start 1 on the x86 simulation, I couldn't get pdp con to work, although pdp view worked well. This is odd, because the teletype appears to be part of the pdp view terminal.

dave avery

unread,
Sep 28, 2025, 7:13:15 PMSep 28
to Francis King, PiDP-10
There were graphics on tops 10 machines.  Model 340 displays and other vector displays

Sent from Gmail Mobile


--
You received this message because you are subscribed to the Google Groups "PiDP-10" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pidp-10+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pidp-10/5e5930b0-c2cc-4f87-b024-46cb1e28de78n%40googlegroups.com.

Lars Brinkhoff

unread,
Sep 29, 2025, 12:34:02 AMSep 29
to PiDP-10
TVBROT is an example of a program that displays on both the Knight TV and the 340, subject to an assembly time switch.

The Type 340 is described here:

Francis King

unread,
Sep 29, 2025, 7:10:44 AMSep 29
to PiDP-10
Thanks, Lars.

I have read some of the PDF that you recommended. The documentation provides an example in the MACRO programming language. The questions that I have relate to where I start my exploration of graphics on the PDP-10. Does the following seem reasonable?

  • MACRO-10
  • TOPS-10 (according to the PiDP-10 book, p.244, MACRO-10 doesn't work properly on ITS)

Lars Brinkhoff

unread,
Sep 29, 2025, 7:28:51 AMSep 29
to PiDP-10
Francis wrote:
The questions that I have relate to where I start my exploration of graphics on the PDP-10. Does the following seem reasonable?
  • MACRO-10
  • TOPS-10 (according to the PiDP-10 book, p.244, MACRO-10 doesn't work properly on ITS)

If you're going with TOPS-10, MACRO-10 should be your best choice.  But I don't know how to do graphics programming on TOPS-10, so I can't say whether it's advisable or not.  It would probably only have the Type 340 (or the mostly equivalent VB10C).

If you're going with ITS, you should use MIDAS.  But it's simliar to MACRO-10, so no big deal.  ITS also has the Knight TV monochrome raster, color scope, IMLAC, and GT40 available for graphics programming of various flavours.

MACRO-10 does work on ITS.  There may be some edge cases that don't work.  It can assemble itself.

Francis King

unread,
Oct 1, 2025, 5:58:15 PMOct 1
to PiDP-10
I've just worked through the Macro-10 Disassembly Language Handbook. I'm coming at this from the viewpoint of Z80A programming. Some questions please.

Am I correct in my understanding that the PDP-10 doesn't have a stack? If so, how do you call a subroutine?

Francis.

Eric Swenson

unread,
Oct 1, 2025, 6:52:50 PMOct 1
to Francis King, PiDP-10
I’m most definitely not the best person to answer this — and I’m sure someone will provide a better answer.  But….

There is not “a stack” for the PDP-10.  However, any application can allocate some stack space (array or 36-bit words) and initialize a PDP-10 register to hold an AOBJN pointer (see later) to the base of the stack.  Then, stack-based calls can be done with the PUSHP SP, instructor and returns can be done with the POPJ SP, instruction, where SP is defined as the register that points to the stack.  Register 17 is frequently used as the stack pointer for an application (although this is not required).  There is nothing stopping a PDP-10 program from having more than one stack and using more than one register for stack pointers.

One of the first things a PDP-10 program that uses a stack must do is set up the stack.  Assuming you have allocate some space in your program for the stack, frequently called a “PDL” (push down list), and assuming that this location is memory is located at the symbol PDL and that the stack length you allocated is defined by the constant PDLLEN, then you do this to initialize your stack pointer:

MOVE SP,[-PDLLEN,,PDL]

This sets up an AOBJN pointer, where the negative length (-PDLLEN) is in the left half (LH) of a word, and the top-of-stack is located in the right half (RH).

Now, you can call your subroutines with:

PUSHJ SP, FOO

Where FOO is the subroutine.  That subroutine can return with:

POPJ SP,

The PUSHJ SP, FOO instruction will first add 000001000001 (base 8)  to the memory referenced by SP.  If the LH of SP goes to zero, the Pushdown Overflow flag will be set.  Then PUSHJ will place the address of the next instruction (the return address), into the RH of SP.  If will then JUMP to the address of FOO.

The increment of both halves of SP will set things up for the next PUSHJ or POPJ.

The POPJ SP, instruction will take the return address from the location addressed by the RH of SP (and hang onto it until the stack is adjusted).  Then it will subtract 000001000001 from the memory addressed by SP.  If this causes the LH of SP to go to -1, the Pushdown Overflow flag will be set.  Then the POPJ instruction will cause a transfer to the address retrieved prior to the decrement.

I’ve written the above from memory and haven’t programmed in assembly on a PDP-10 for many months, so I may have messed up the description in some way.  I’m sure someone else will correct me if I did.

The main takeways are that there isn’t a single stack, but any program is free to define one or more stacks (usually one), and then use the PUSHJ and POPJ instructions to “call” and “return” from subroutines.

Oh, I forgot to give an example of allocation stack space in the program:

pdllen==100.   ;this is how deep the stack should be
pdl: block pdllen

100 words are allocated at the address specified by PDL.

— Eric

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

Lars Brinkhoff

unread,
Oct 2, 2025, 12:37:52 AMOct 2
to Eric Swenson, Francis King, PiDP-10
Eric Swenson wrote:
There is not “a stack” for the PDP-10.  However, any application can allocate some stack space (array or 36-bit words) and initialize a PDP-10 register to hold an AOBJN pointer (see later) to the base of the stack.  Then, stack-based calls can be done with the PUSHP SP, instructor and returns can be done with the POPJ SP, instruction, where SP is defined as the register that points to the stack.  Register 17 is frequently used as the stack pointer

Minor additional notes.  The "stack" is often called the "pushdown list", aka PDL.  The stack pointer is usually called P.  Maybe it's best to stick to this convention. 

Lars Brinkhoff

unread,
Oct 2, 2025, 12:57:10 AMOct 2
to PiDP-10
Eric Swenson wrote:
then you do this to initialize your stack pointer:

MOVE SP,[-PDLLEN,,PDL]

One more thing.  You can do MOVE P,[-PDLLEN,PDL-1]
The stack grows up, and when a word is pushed, the pointer is incremented before writing to memory. 

Eric Swenson

unread,
Oct 2, 2025, 1:14:06 AMOct 2
to Lars Brinkhoff, PiDP-10
I think Lars meant to use a ,, rather than a single comma in his example. FOO,,BAR is the standard way of writing two half-words with a LF and RH.

On Oct 1, 2025, at 21:57, Lars Brinkhoff <lars.br...@gmail.com> wrote:


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

Ric Werme

unread,
Oct 2, 2025, 1:49:37 AMOct 2
to PiDP-10
I think Lars meant to use a ,, rather than a single comma in his example.

To init a stack pointer, use [iowd len,addr] where addr is the start of the stack.  It generates [-len,,addr-1].

I started a new topic - this goes way beyond graphics programming.

Lars Brinkhoff

unread,
Oct 2, 2025, 2:02:37 AMOct 2
to Ric Werme, PiDP-10
Ric Werme wrote:
To init a stack pointer, use [iowd len,addr] where addr is the start of the stack.  It generates [-len,,addr-1].

That's a MACRO thing.  IOWD doesn't exist in MIDAS.  You can define one yourself, of course.  But the convention in ITS is to spell it out -len,,addr-1. 

Ric Werme

unread,
Oct 2, 2025, 7:52:46 AMOct 2
to PiDP-10
Francis wrote:
I've just worked through the Macro-10 Disassembly Language Handbook.

Disassembly?  I don't see that mentioned here or on Google.  Typo?  Or something I've missed?

I went from PDP-10 to Z80.  The loss of all those general purpose registers was the hardest transition.  Learning hexadecimal addition and multiplication tables was annoying - octal is much much easier.  AOBJN is a wonderful instruction.  I was positively impressed with the PIO, SIO, and DMA support chips from Zilog - each replaced a cabinet, more or less, on the KA10 (think LPT, DC10, DF10).
Reply all
Reply to author
Forward
0 new messages