	.TITLE IOERR   DETECT I/O DATA ERR
/ 
/ 
/                   FIRST PRINTING, FEBRUARY 1974
/ 
/ THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO 
/ CHANGE WITHOUT NOTICE AND SHOULD NOT BE CONSTRUED
/ AS A COMMITMENT BY DIGITAL EQUIPMENT CORPORATION.
/ DIGITAL EQUIPMENT CORPORATION ASSUMES NO RESPON-
/ SIBILITY FOR ANY ERRORS THAT MAY APPEAR IN THIS
/ DOCUMENT.
/ 
/ THE SOFTWARE DESCRIBED IN THIS DOCUMENT IS FUR-
/ NISHED TO THE PURCHASER UNDER A LICENSE FOR USE ON
/ A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH
/ INCLUSION OF DIGITAL'S COPYRIGHT NOTICE) ONLY FOR 
/ USE IN SUCH SYSTEM, EXCEPT AS MAY OTHERWISE BE PRO-
/ VIDED IN WRITING BY DIGITAL.
/ 
/ DIGITAL EQUIPMENT CORPORATION ASSUMES NO RESPONSIBILITY
/ FOR THE USE OR RELIABILITY OF ITS SOFTWARE ON EQUIP-
/ MENT THAT IS NOT SUPPLIED BY DIGITAL.
/ 
/ COPYRIGHT (C) 1974, BY DIGITAL EQUIPMENT CORPORATION
/ 
/ 
        .EJECT
/COPYRIGHT 1971, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
/EDIT 002----2-10-71
/INTEGER FUNCTION	IOERR(M)----ARG. M IGNORED
/CALLING SEQUENCE - JMS* IOERR
/			SUBR RETURN
/AC RETURNED = -1(PARITY),-2(CHECKSUM),-3(SHORT LINE)
/AC RETURNED = -5(EOF),-6(EOM),0(NO I/O  ERRORS)
/IF NONE OF ABOVE,AC WILL CONTAIN OTS ERROR # IN DECIMAL RADIX
	.GLOBL IOERR,.ER3,.ERST
IOERR	0
	LAC* .ERST	/AN OTS 11 ERROR ?
	SAD (11)
	JMP IOERR1
/INTERPRET OTS ERROR NUMBER BETWEEN 0 AND 77 (8) IN DECIMAL
/RADIX AND CONVERT TO OCTAL EQUIVALENT FOR RETURN
	DZM IOERR4	/INIT INCREMENT
IOERR5	TAD (-10)
	SPA
	JMP IOERR6	/DONE
	ISZ IOERR4	/ADD 2
	ISZ IOERR4
	JMP IOERR5	/REMAINDER IN AC
IOERR6	LAC* .ERST	/CONVERT--ADD TWO FOR EVERY MULTIPLE OF 10 (8)
	TAD IOERR4	/AND LEAVE IN AC
	JMP* IOERR	/EXIT
IOERR1	LAC* .ER3
	AND (60)
	SZA!CLL		/GIVE PARITY,CHECKSUM,AND SHORTLINE
	JMP IOERR3	/PRIORITY
	LAC* .ER3	/5 OR 6 FOR EOF OR EOM
IOERR2	CMA		/TWOS COMPL.
	TAD (1)
	JMP* IOERR
IOERR3	RTR		/DIVIDE BY 20(8)
	RTR
	JMP IOERR2
IOERR4	0		/TEMP. FOR INCREMENT
	.END
