Memory Store Macro

All stores to simulated PDP-8 memory go through an instance of this macro. (See FETCH.)
 
 STORE    MACRO  MA,MB       STORE INTO MEMORY 
          IFC    NE,$MA$$  
          MX6    -10 
          BX1    X6*MA 
          AX1    6 
          SB6    X1  
          BX1    -X6*MA  
          SA1    X1+MEMORY 
          ELSE   1 
          SA1    A1  
          LX6    X0,B6 
          BX6    -X6*X1  
          LX1    MB,B6 
          BX6    X6+X1 
          SA6    A1  
          ENDM
 

Memory Store Routine

FORTRAN code gains access to the store logic through this one adaptor routine.
 
 STORE    PS 
          RJ     RESREG  
          STORE  X3,X4 
          EQ     STORE
 
 

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