Google
 

Trailing-Edge - PDP-10 Archives - decuslib20-02 - decus/20-0027/consol.mac
There are 2 other files named consol.mac in the archive. Click here to see a list.
00100	TITLE CONSOLE CONTROL	VERSION #2	SEPT. 1 '69
00200	SUBTTL	DON WITCRAFT	2-7-66
00300	
00400	
00500	
00600	;CONSOLE FUNCTIONS
00700	
00800	INTERNAL S,C,L,DP,E,SS,DOOR,STARTT,SR
00900	EXTERNAL IFSW,IF,IBR,DFSW,DFF,FETOP1,CYCLE,TC,KDATA
01000	
01100	SR:	0		;SIMULATED SWITCH REGISTER
01200	
01300	S:	SETZB	AC,MB		;START
01400		IFN DDF32,<EXTERNAL DFIELD,DMA
01500		SETZM	DFIELD
01600		SETZM	DMA		;ZERO DISK ADDRESS REGISTER>
01700		SETZM	KDATA+1		;SET TIME FOR THE NEXT TTY INT TO 0
01800		SETZB	IR,AC0
01900		SETZB	RUNTIM,TIME
02000		HRLZI	FLAGS,RUN!KACTIVE
02100		SETZB	AC0,MQ
02200		CALLI	AC0,27		;GET RUNNING TIME FOR JOB
02300		MOVEM	AC0,STARTT#	;SAVE
02400	C:	MOVE	PDP,[XWD -10,PDL]	;RELOAD THE PD POINTER
02500		OUTSTR	[ASCIZ /
02600	/]
02700		SETOM	AC0		;LOAD WITH -1
02800		GETLIN	AC0		;GET LINE CHARACTERISTICS
02900		TLO	AC0,6		;SET TAPE MODE, NO CHAR ECHO
03000		SETLIN	AC0		;EFFECT CHANGES
03100		TLO	FLAGS,RUN!KACTIVE	;CONTINUE
03200		SETZM	AC0
03300		JRST	CYCLE
03400	
03500	L:	MOVE	PC,SR		;LOAD ADDRESS
03600		MOVE	AC0,IFSW
03700		MOVEM	AC0,IF
03800		MOVEM	AC0,IBR
03900		MOVE	AC0,DFSW
04000		MOVEM	AC0,DFF
04100		PUSHJ	PDP,CONSOLE
04200	
04300	DP:	OR	AC,SR		;DEPOSIT SWITCH
04400		MOVEI	IR,3
04500		MOVE	MB,PC
04600		TLZ	FLAGS,RUN
04700		JRST	FETOP1
04800	
04900	E:	ANDI	AC,10000	;EXAMINE
05000		MOVEI	IR,1
05100		MOVE	MB,PC
05200		JRST	E-2
05300	
05400	SS:	TLZ	FLAGS,RUN	;SINGLE STEP
05500		JRST	TC
05600	;SIMULATOR INITIALIZATION
05700	
05800	INTERNAL INI,IOINI,TIME,NTIME
05900	EXTERNAL CORE
06000	
06100	INI:	CALLI	0			;RESET IO
06200		MOVE	PDP,[XWD -10,PDL]	;ESTABLISH PUSHDOWN POINTER
06300		PUSHJ	PDP,IOINI
06400	INI1:	PUSHJ	PDP,CONSOL		;RETURN CONTROL TO CONSOL
06500	
06600	EXTERNAL MDLISTL,DLIST,MCLIST,CLIST,FCLOSE
06700	
06800	IOINI:	MOVSI	AC0,MCLIST
06900	IOINI1:	MOVEI	FDB,@CLIST(AC0)
07000		SETZM	CDCHAR(FDB)
07100		SETZM	CDSTAT(FDB)
07200		SETZM	CFSTAT(FDB)
07300		SETZM	CDBLOCK(FDB)
07400		HRRZS	CINI(FDB)
07500		SKIPE	AC1,CBUFH(FDB)	;CLEAR ITEM COUNTS
07600		SETZM	2(AC1)
07700		AOBJN	AC0,IOINI1
07800		MOVSI	FLAGS,KACTIV	;KEYBOARD IS ALWAYS ACTIVE
07900		POPJ	PDP,
08000	
08100	INTERNAL EXIT
08200	
08300	EXIT:	MOVSI	AC0,MCLIST
08400		SKIPE	FDB,CLIST(AC0)
08500		JSP	SRR,FCLOSE
08600		AOBJN	AC0,.-2
08700		PUSHJ	PDP,CONSOL
08800	
08900	;DATA
09000	
09100	TIME:	0		;CUMULATIVE RUNTIME IN 1/4 MICROSECONDS
09200	NTIME:	Z		;NEXT TIME TO CHECK FLAGS
09300				;I.E. CHECK IMMEDIATELY
09400	
09500		LIT
09600	PDL:	ERROR
09700		BLOCK	7
09800	
09900	
10000	INTERNAL ERROR,CONSOLE
10100	
10200	ERROR:
10300	CONSOL:	POP	PDP,AC0		;FROM WHENCE YOU COMETH.
10400		HRRZ	AC4,DOOR#
10500		JRST	(AC4)
10600	
10700		END