Rotate Handler Expansion

This idiomatic macro usage generates four handlers that differ only in name and one instruction.
 
          ECHO   ,OPR=(RAL,RTL,RAR,RTR),SFT=(1,2,13-1,13-2)
 OPR      MX1    -13
          LX2    SFT
          BX6    X1*X2
          BX2    -X1*X2 
          AX6    13 
          BX2    X2+X6
          EQ     INT1 
          ENDD
 
This is a typical expansion, the first of four, with OPR=RAL and SFT=1.

  RAL      MX1    -13
           LX2    1
           BX6    X1*X2
           BX2    -X1*X2
           AX6    13
           BX2    X2+X6
           EQ     INT1
 


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