/COPYRIGHT 1970, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
/EDIT 4   10-13-70
       .TITLE SPMSG
/OBJECT TIME MESSAGE PRINT ROUTINE FOR STOP AND PAUSE.
/CALLING SEQUENCE--LAC   OCTAL INTEGER TO BE PRINTED.
/                  JMS*  .SP
/                  .DSA  CONTROL RETURN (MEANINGFUL TO PAUSE ONLY)
/                  LAC   1ST CHARACTER
/                  LAC   2ND CHARACTER
/                  LAC   3RD CHARACTER
/                  LAC   4TH CHARACTER
/                  LAC   5TH CHARACTER
/                  LAC   6TH CHARACTER
/	IF BACKGROUND-FOREGROUND MONITOR DEFINE BF
       .GLOBL .SP
	.GLOBL SPMSG
	.IFDEF BF
	.GLOBL PACPF
	.ENDC
SPMSG=.
.SP    CAL    0
       DAC    SAVE           /SAVE OCTAL NUMBER TO BE PRINTED.
       LAC    FSTADD         /SET CURRENT ADDRESS TO ADDRESS OF FIRST
       DAC    CURADD         /   DATA WORD IN BUFFER.
       LAW    -6             /SET COUNTER TO FETCH 6 CHARACTERS FROM
       DAC    CNT            /   CALLING ROUTINE.
	.IFUND BF
       LAC*   .SP            /FETCH CONTROL RETURN ADDRES FOR .INIT
       DAC    SP3
	.ENDC
       ISZ    .SP
SP1	XCT*	.SP	/FETCH ALPHA CHARACTER IN ASCII-7 -ASSIGNED TO GLOBL SPMSG
       DAC*   CURADD         /   STORE IN BUFFER.
       ISZ    .SP            /BUMP FETCH-ADDRESS, STORE-ADDRESS, AND
       ISZ    CURADD         /   CHARACTER COUNT.
       ISZ    CNT
       JMP    SP1            /NOT DONE--GET NEXT CHARACTER.
       LAW    -6             /DONE--SET UP SAVED INTEGER TO OUTPUT 6
       DAC    CNT            /   OCTAL DIGITS.
       LAC    SAVE
       RCL!SKP
SP2    LAC    SAVE
       RTL                   /ROTATE NEXT 3 BITS INTO LOW BITS OF AC.
       RAL
       DAC    SAVE           /SAVE FOR NEXT SHIFT.
       AND    (7)            /MAKE IT AN ASCII-7 CHARACTER.
	XOR L260
       DAC*   CURADD         /STORE IT IN BUFFER--CONTINUE UNTIL ALL L
       ISZ    CURADD         /   OCTAL DIGITS ARE IN BUFFER.
       ISZ    CNT
       JMP    SP2            /NOT DONE--GET NEXT DIGIT.
	.IFUND BF
       CAL    01775          /DONE--INITIALIZE TELEPRINTER.
       .DSA   1
SP3    .DSA   SP3            /CONTROL ADDRESS
       .DSA   0
	.ENDC
	.IFDEF BF
	CAL	1775		/REAL TIME .INIT TO SLOT -3
	.DSA	1		/AND FOR OUTPUT
	SP4+100000		/ADDR OF REAL TIME SUBR.
	0
	.ENDC
       CAL    03775          /PRINT 12 CHARACTERS IN IMAGE-ALPHA.
       .DSA   11
       .DSA   BUFF
L260	.DSA 260
       CAL    00775          /WAIT FOR TELEPRINTER TO FINISH.
	.DSA 6
       JMP*   .SP            /RETURN TO CALLER.
	.IFDEF BF
SP4	0
	DAC	SP5		/SAVE AC
	LAC	SPBFC
	DAC	PACPF
	CAL	1775		/.INIT FOR CR/LF
	.DSA	1
	.DSA	0
	.DSA	0
	LAC	SP5		/RESTORE AC
	CAL	SP4		/.RLXIT
	.DSA	20
SP5	0			/STORAGE FOR AC
SPBFC	1			/FLAG FOR PACPF - CHECKED
PACPF	0	/CONTROL P FLAG
	.ENDC			/IN PAUSE
CURADD .DSA   0              /CURRENT BUFFER ADDRESS.
SAVE   .DSA   0              /TEMP STORAGE FOR OCTAL INTEGER.
CNT    .DSA   0              /CHARACTER COUNT.
FSTADD .DSA   BUFF+2         /FIRST BUFFER ADDRESS AFTER HEADER WORDS.
BUFF   .DSA   007003         /BUFFER AND HEADER.
       .DSA   0
       .BLOCK 14
       .END
