Save Registers

The SAVREG routine saves assigned registers between executions of the assembly language portions of the simulator. (See also RESREG, FETCH and STORE.)  The register save area is available to the FORTRAN code which freely reads and modifies it.
 
 SAVREG   PS
          BX6    X3 
          BX7    X4 
          SA6    MA 
          SA7    A6+B1
          BX6    X5 
          BX7    X0*X2
          SA6    A7+B1
          SA7    A6+B1
          BX6    X2 
          AX6    12 
          SA6    A7+B1
          SX6    B2 
          SA6    STEP 
          EQ     SAVREG 
 
The registers are stored into sequential locations within a common block of memory.
 
          USE    /REGS/  
 SR       BSS    1 
 MA       BSS    1 
 MD       BSS    1 
 PC       BSS    1 
 AC       BSS    1 
 LK       BSS    1 
 MQ       BSS    1 
 STEP     BSS    1 
          USE    *
 
 

PDP-8 Simulator
© 1975, 1998, Ward Cunningham
all rights reserved