From: johnl@taugh.com   
      
   It appears that EricP said:   
   >> On several of the machines I used a subroutine call stored the return   
   >> address in the first word of the routine and branched to that address+1.   
   >> The return was just an indirect jump.   
   >>   
   >> Stacks? What's a stack? We barely had registers.   
   >   
   >Yes, I saw the PDP-8 did that for JMS Jump Subroutine.   
   >I've never used one but it looks like by playing with the   
   >Indirect and Page-zero memory addressing options you could   
   >treat page-zero a bit like a register bank,   
   >but also store some short but critical routines in page-zero   
   >to manually move the return PC to/from a stack.   
   >And use indirect addressing to access its full sumptuous 4kW address space.   
      
   You wouldn't put routines in page zero but you might put pointers to   
   them so you could do JMS I 123 to call the routine pointed to by page   
   zero location 123. We rarely did recursive stuff so there wasn't any   
   need to simulate a stack.   
      
   Storing the return address in the first word was pretty common. Even   
   the PDP-6/10 had a JSR instruction that did that. On machines without   
   index registers, there's no better place to put the return address.   
   --   
   Regards,   
   John Levine, johnl@taugh.com, Primary Perpetrator of "The Internet for   
   Dummies",   
   Please consider the environment before reading this e-mail. https://jl.ly   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|