This is a cross-referenced version of ismop.plan, to download the unmodified source try ismop.plan.
#PROGRAM       /GFISMOP(15AM,22AM,DBM,EBM)
#PAGE

#UPPER
MOPCMD         13HIF MOP,AL 6,1
MOP            -1
               60/1, 0, 13, /MOPCMD

#PROGRAM

#              Work out whether we're a MOP terminal
#              returns X6 +ve if MOP, zero if not
#              Trashes X0, X3

      LDX   3  '/MOP'
      LDX   6  0(3)
      BPZ   6  BYE

      LDN   6  0                      [ assume not MOP
      PERI  0  1(3)                   [ if MOP set X6 = 1
#                                     [ assume *CI suspends
#                                     [ ignore (impossible) error
      STO   6  0(3)                   [ save MOP flag
BYE   EXIT  1  0

#END
#FINISH