|
|
|
|
|
by srean
4442 days ago
|
|
By the time I got within touching distance of any computer the era of the PDPs were long over. I have learned from John Skaller that they could exchange control between two stack frames in a single assembly instruction. "Exchange Jump" is what I think it was called. You will have to search the assembly manual for PDP-11 for more. Wikipedia has some details http://en.wikipedia.org/wiki/Coroutine#Implementations_in_as... But I am sure there are HN readers who can speak with way more authority and exhaustiveness than the wikipedia page and can probably point find you a PDP-11 manual. I think you will find this thread interesting http://permalink.gmane.org/gmane.org.user-groups.linux.tolug... Quoting the most interesting bits from that thread, (although I urge you to read the original): Of the many styles of subroutine calls on the PDP-10, JSP ac,addr is the fastest,
as it's the only one that doesn't require a memory store.
Its ISP is something like:
ac = PC
PC = effective address [addr in the usual case]
The subroutine return, of course, is:
JRST (ac)
Here, the efective address is the contents of the register.
The coroutine instruction combined the two:
JSP ac,(ac)
This essentially exchanged the PC with ac.
|
|
Overall, it has been fun reading on all the variants of this idea.
side note: in my first job, there were a few PDP-11s in the lab that I was responsible for. We never turned them on though.
Also, the PDP 10, which you mention above, was one of the most revered machines by hackers.