;;; -*- Mode: Midas -*-
.AUXIL

;;; Canonical symbol definition macro, FOO==BAR with error check.
IFNDEF DEFSYM,[	
DEFINE DEFSYM X/
IRPS Z,,[X]
IFNDEF Z,X
.ELSE [	$$TEM1==Z
	X
	IFN Z-$$TEM1,.ERR Z MULTIPLY .QUOTE`.QUOTE/DEFINED/`
      ]
.ISTOP
TERMIN TERMIN
$$TEMP==1
] ;IFNDEF DEFSYM
.ELSE, $$TEMP==0

; Hardware description of AI-KA/ML/MC IMP interface, device "IMP".
; For a more detailed description, see AI Hardware Memo #10,
; "ARPA Network Interface".
; In particular, the "channel 1 multiplexing" feature of the ITS KA's
; is used, so that:
; When PI level 2 (NETCHN) is assigned, the IMP interface takes
;	all interrupts on the normal channel (goes to IMPINT).
; When PI level 1 (IMPCHN) is assigned,
;	IMPID+(-IMPLIW) => Pseudo channel 4, location 70 (IMPILC)-> various
;	IMPOD => Pseudo channel 5, location 72 (IMPOLC)-> various
;	else normal PI channel 1 (PI0LOC+2)-> IMPBRK

; CONI bits - starred items cause interrupt on PIA channel
				; 1.1-1.3 => PIA
DEFSYM IMPID==10		;* INPUT DONE - on when word avail for DATAI
DEFSYM IMPI32==20		; Input in 32 bit mode
;DEFSYM IMPIB==40		; Input Busy
DEFSYM IMPOD==100		;* OUTPUT DONE - Word sent to IMP
;DEFSYM IMPO32==200		; Output in 32 bit mode
;DEFSYM IMPOB==400		; Output Busy
DEFSYM IMPERR==1000		;* Imp Error (interrupt if IMPIC zero)
DEFSYM IMPR==2000		;* Imp Ready (interrupt if IMPIC set)
;DEFSYM IMPIC==4000		; Imp interrupt condition
				; (0 = int on IMPERR, 1= int on IMPR)
DEFSYM IMPHER==10000		;* Host Error (interrupt if IMPIHE zero)
;DEFSYM IMPHR==20000		; Host Ready
;DEFSYM IMPIHE==40000		; Inhibit interrupt on Host Error (IMPHER)
DEFSYM IMPLW==100000		;* Last Imp Word

; CONO bits - starred flags are always copied directly to set states
				;* 1.1-1.3 => PIA set from these bits
DEFSYM IMPIDC==10		; Clear Input Done
DEFSYM IMI32S==20		; Set input to 32 bit mode
DEFSYM IMI32C==40		; Clear input in 32 bit mode
DEFSYM IMPODC==100		; Clear Output Done
DEFSYM IMO32S==200		; Set output to 32 bit mode
DEFSYM IMO32C==400		; Clear output in 32 bit mode
DEFSYM IMPODS==1000		; Set Output Done
DEFSYM IMPIR==4000		;* Copied to IMPIC; 1= Enable int on imp ready
DEFSYM IMPHEC==10000		; Clear Host Error
;DEFSYM IMIIHE==40000		;* Copied to IMPIHE
				;   1= Inhibit int on host error
DEFSYM IMPLHW==200000		; Set Last Host Word
				;  (do this before last DATAO of msg)
IFN $$TEMP,EXPUNG DEFSYM
