Reentrant PDP-8 code (was Re: Weekly Classic Computer Trivia Question (20150112))
vrs at msn.com
Mon Jan 12 15:34:40 CST 2015
From: Johnny Billquist: Monday, January 12, 2015 12:38 PM
> Of course I've done it. I suspect there is not much I have not done on a
> PDP-8. I've written programs on PDP-8 systems for over 30 years by now...
> No, you do not need a push/pop to have interrupts enabled while in an
> interrupt handler on a PDP-8. As long as you know the same interrupt
> will not trigger, all you need to do is store the return address from 0
> somewhere else before ION, and then write it back to 0 after IOFF.
Well, and the AC and flags and any other context that the ISR needs.
Essentially, a "one deep stack" for the context, which is much easier
> Like I said, with the provisions that you do not reuse the same
> functions from different interrupt handlers, and you know that the same
> device don't interrupt again.
Yep. Generally, you can't share any storage between the various
routines while the interrupts are on, and you have to also prevent
re-entry of the routines you are already in.
More information about the cctalk