Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-01 - 43,50146/consol.mac
There are 2 other files named consol.mac in the archive. Click here to see a list.
TITLE CONSOLE CONTROL	VERSION #2	SEPT. 1 '69
SUBTTL	DON WITCRAFT	2-7-66



,CONSOLE FUNCTIONS

INTERNAL S,C,L,DP,E,SS,DOOR,STARTT,SR
EXTERNAL IFSW,IF,IBR,DFSW,DFF,FETOP1,CYCLE,TC,KDATA

SR:	0		;SIMULATED SWITCH REGISTER

S:	SETZB	AC,MB		;START
	IFN DDF32,<EXTERNAL DFIELD,DMA
	SETZM	DFIELD
	SETZM	DMA		;ZERO DISK ADDRESS REGISTER>
	SETZM	KDATA+1		;SET TIME FOR THE NEXT TTY INT TO 0
	SETZB	IR,AC0
	SETZB	RUNTIM,TIME
	HRLZI	FLAGS,RUN!KACTIVE
	SETZB	AC0,MQ
	CALLI	AC0,27		;GET RUNNING TIME FOR JOB
	MOVEM	AC0,STARTT#	;SAVE
C:	MOVE	PDP,[XWD -10,PDL]	;RELOAD THE PD POINTER
	OUTSTR	[ASCIZ /
/]
	SETOM	AC0		;LOAD WITH -1
	GETLIN	AC0		;GET LINE CHARACTERISTICS
	TLO	AC0,6		;SET TAPE MODE, NO CHAR ECHO
	SETLIN	AC0		;EFFECT CHANGES
	TLO	FLAGS,RUN!KACTIVE	;CONTINUE
	SETZM	AC0
	JRST	CYCLE

L:	MOVE	PC,SR		;LOAD ADDRESS
	MOVE	AC0,IFSW
	MOVEM	AC0,IF
	MOVEM	AC0,IBR
	MOVE	AC0,DFSW
	MOVEM	AC0,DFF
	PUSHJ	PDP,CONSOLE

DP:	OR	AC,SR		;DEPOSIT SWITCH
	MOVEI	IR,3
	MOVE	MB,PC
	TLZ	FLAGS,RUN
	JRST	FETOP1

E:	ANDI	AC,10000	;EXAMINE
	MOVEI	IR,1
	MOVE	MB,PC
	JRST	E-2

SS:	TLZ	FLAGS,RUN	;SINGLE STEP
	JRST	TC
,SIMULATOR INITIALIZATION

INTERNAL INI,IOINI,TIME,NTIME
EXTERNAL CORE

INI:	CALLI	0			;RESET IO
	MOVE	PDP,[XWD -10,PDL]	;ESTABLISH PUSHDOWN POINTER
	PUSHJ	PDP,IOINI
INI1:	PUSHJ	PDP,CONSOL		;RETURN CONTROL TO CONSOL

EXTERNAL MDLISTL,DLIST,MCLIST,CLIST,FCLOSE

IOINI:	MOVSI	AC0,MCLIST
IOINI1:	MOVEI	FDB,@CLIST(AC0)
	SETZM	CDCHAR(FDB)
	SETZM	CDSTAT(FDB)
	SETZM	CFSTAT(FDB)
	SETZM	CDBLOCK(FDB)
	HRRZS	CINI(FDB)
	SKIPE	AC1,CBUFH(FDB)	;CLEAR ITEM COUNTS
	SETZM	2(AC1)
	AOBJN	AC0,IOINI1
	MOVSI	FLAGS,KACTIV	;KEYBOARD IS ALWAYS ACTIVE
	POPJ	PDP,

INTERNAL EXIT

EXIT:	MOVSI	AC0,MCLIST
	SKIPE	FDB,CLIST(AC0)
	JSP	SRR,FCLOSE
	AOBJN	AC0,.-2
	PUSHJ	PDP,CONSOL

;DATA

TIME:	0		;CUMULATIVE RUNTIME IN 1/4 MICROSECONDS
NTIME:	Z		;NEXT TIME TO CHECK FLAGS
			;I.E. CHECK IMMEDIATELY

	LIT
PDL:	ERROR
	BLOCK	7


INTERNAL ERROR,CONSOLE

ERROR:
CONSOL:	POP	PDP,AC0		;FROM WHENCE YOU COMETH.
	HRRZ	AC4,DOOR#
	JRST	(AC4)

	END