| These are some hack routines to allow the console to break into the
| execution of the gateway.  Interrupts on the console DL are enabled
| and for most characters are just ignored.  If a C-Z is typed then
| the trace bit is turned on in the SR causing a trace trap which DDT
| should catch.

.globl	con_up, con_int

RX_CSR =	0xffff70
RX_DATA =	0xffff72
INT_ENA	=	0x0040
TRACE =		0x8000		|Trace bit in CSR

con_up:
	movw	#INT_ENA,RX_CSR		|enable receive interrupts
	rts

con_int:
	movw	RX_DATA,d0		|get data
	andb	#0x7f,d0		|nuke parity
	cmpb	#26,d0			|see if C-Z
	bne	done			|if not then just go away
	orw	#TRACE,sr		|turn on trace bit
 done:	movw	#INT_ENA,RX_CSR		|reenable receive interrupts
	rts
