!TITLE Writing to the OPER Console
!
! These four procedures allow a process to communicate with the
! operator's console (OPER).
!<DOPER
externalroutine DOPER(integer CONSOLE, string (255)S)
!
! This writes the string S to Dirlog and to the OPER. CONSOLE is not
! used and should be set to zero.
!>
WRSS("OPER: ", S)
OPER(0, S)
END ; ! DOPER
!
!-----------------------------------------------------------------------
!
!<DOPERPROMPT
externalroutine DOPER PROMPT(integer CNSL, string (255)S)
!
! This procedure is used when an interactive process is started from an
! OPER
!>
RECORD (PARMF)P
P = 0
P_DEST = X'00320008' ! ((CNSL&X'FF')<<8)
P_S <- S
DPONI(P)
END ; ! DOPER PROMPT
!
!-----------------------------------------------------------------------
!
EXTERNALROUTINE DOPER2(STRING (255)S)
DOPER(0, S)
END ; ! DOPER2
!
!-----------------------------------------------------------------------
!
!<DOPERR
externalroutine DOPERR(string (23)TXT, integer FN, RES)
!
! This procedure is used to write a short error message to the OPER
! console. FN is used to select a value from the list of names below and
! the text written is of the form:
!
! TXT sp NAME(FN) sp RES
!
CONSTINTEGER TOP = 15
CONSTSTRING (4)ARRAY NAME(1:TOP) = C
{..1}"CRTE",
{..2}"CONN",
{..3}"PERM",
{..4}"DSFI",
{..5}"DSCN",
{..6}"STOP",
{..7}"GTDA",
{..8}"DFST",
{..9}"RNAM",
{.10}"SPOL",
{.11}"XFER",
{.12}"DNDA",
{.13}"CNDA",
{.14}"GFND",
{.15}"DSTR"
!>
STRING (23)S
S = TXT
IF 1 <= FN <= TOP C
THEN S <- S." ".NAME(FN)
S <- S." ".ITOS(RES) IF RES >= 0
DOPER2(S)
END ; ! DOPERR
!
!-----------------------------------------------------------------------
!
!<OPER
systemroutine OPER(integer CONSOLE, string (255)S)
!
! This procedure causes the text string S to be displayed on logical
! Oper console number CONSOLE (taking as many lines of scrolled Oper
! output as necessary).
!>
RECORD (PARMF)NAME P
INTEGER L
P == RECORD(OUTPAD)
!
CYCLE
P = 0
P_DEST = X'320007' ! ((CONSOLE & 7) << 8)
P_S <- S
*OUT_6; ! LIKE DPON BUT WITHOUT SPOILING LOUTP
L = LENGTH(S) - 23
RETURN UNLESS L > 0
LENGTH(S) = L
MOVE(L, ADDR(S)+24, ADDR(S)+1)
REPEAT
END ; ! OPER
!
!-------------------end-of-included-text---------------------------------
!