Google
 

Trailing-Edge - PDP-10 Archives - decuslib20-10 - decus/20-184/mlib.unv
There are no other files named mlib.unv in the archive.
x
,Q@P E3%[{ &Ja


	IFL&9E	<B-A>,<PRINTX&X Bad arguments fo&xr BLTMOV macro>
'	IFG <C-17>,<	
'8		IFG <B-17>,<	
			MOVE	T1,[A,,'xC]
			BLT	T1,C(+B-A>
		IFLE <(8B-17>,<	
			MOV(XEM	B,C+B-A	
(x			IFE <A>,<MOVE)I	B,C>
			IFN )8<A>,<MOVE	B,[A)X,,C]>
			BLT	B)x,C+B-A-1	
			*MOVE	B,C+B-A	*8>>
	IFLE <C-17>*X,<	
		IFG <B-17*x>,<	
			IFE <C>+,<MOVSI	C+B-A,+8A>
			IFN <C>,+X<MOVE	C+B-A,[+xA,,C]>
			BLT	,C+B-A,C+B-A>>
A,C+B-A>F:/
: \IM|

.EXIT:\i	NOISE	(from this] program)
	CONFI](RM

DIE:	TXNE	F]H,F%RSCN		;am I pr]hocessing the rsca^n buffer?
	 CALL^(	RCNCLR##		;yes, ^Hclear any unread ^hcharacters
	A		_
	HALTF%
	JRST	_(START			;"@CONTIN_HUE" - begin again
- begin againF:D[ R	M


.HELR)P:	NOISE	(me pleaRHse)
	CONFIRM
	HRhRROI	T1,HLPTXT
	SPSOUT%
	JRST	ENDS(CMD		;go get another command
otF:MiW SiM`

.INFORT	:	NOISE (about prT(ogram)
	CONFIRM
	TMSG < Program Thversion is >
	CAULL	OVERSI##
	TMSU(G	<
>
	HRROI	T1UH,[ASCIZ/ ***** CoUhmmands are currenVtly comming from V(the RESCAN bufferVH *****
/]
	TXNEVh	F,F%RSCN		;is RSWCAN buffer being W(processed?
	 PSOWHUT%				;yes

	SWhKIPN	TAKJFN			;isX a TAKE in progreX(ss?
	 IFSKP.				XH;no
	TMSG < ****Xh* Commands are cuYrrently comming fY(rom >
	FILSTR (TYHAKJFN)
	TMSG <
Yh>
ENDIF.
	TMSG Z< Commands from TZ(AKE files will >
	HRROI	T1,[ASCIZZh/NOT /]
	TXNN	F,[F%ECHO
	[PSOUT%
	TMSG <be echoed[H
>
	A		
	JRST[h	ENDCMD		;go get \another command
other command
G/&N YJ
	CAIN	T2y,.TT100			;is it a VT100?
	 IFSKP8.
	CAIE	T2,.TT10X2			;no, is it a xVT102?
       	 CAIN	T2,.TT131			8;no, is it a VT13X1?
	  TRNA					;xyes, it is a VT102
	   CAIN	T2,.T8T200			;is it a VXT200
ENDIF.
	  x IFNB	<A>,<
		IFNB <B>,<
		IFN8SK.
		 TXO F,A	X	;yes, it is a VTx100 or VT102
		  MOVEI B,.TT100	; 8or VT131 or VT200 X
		ENDIF.
		>
 x>
	   IFB	<A>,<!IFNB <B><MOVEI !8B,.TT100>>
	   I!XFB	<B>,<IFNB <A><TXO F,A>>
AG6!i 0IL@{x

	
	
	1	
	

DEFINE	CMD.1(ZV <
	
	
	TMPJ1HFN:: 0	;JFN got b1hy using COMND% sa2ved here
	TAKJFN2(:: 0	;JFN of of "2HTAKE" file
>;end2h of CMD.ZV

DEF3INE CMD.WM <
	
3(
	MOVE	T1,CMNDIO3H		;reset I/O desi3hgnators for COMND4
	MOVEM	T1,CMDBL4(K+.CMIOJ
>;end o4Hf CMD.WM

		PDL4hEN==C
PDL:	BLOC5K	PDLEN		;push do5(wn list
	BLOCK 45H	;some routines t5hemporarly save da6ta on data by DMO6(VEM ,1(P)
		;max6Himum # words save6hd this way are 4 7so allow space in7(case
		;stack is7H full

STWARM:	7h0	;non-zero means8 program was prev8(iouly started so 8HI know...
		;	..8h.when to do a war9m restart
SAVEP:9(:	0	;saves stack 9Hpointer for repar9hse and changing c:ommand levels

:(
		CMDBLN==:D
:HCMDBUF::BLOCK	CMD:hBLN		;command buf;fer
		ATMBLN==:;(E
ATMBUF::BLOCK	;HATMBLN		;atom buf;hfer

	;NOTE: Th<e RCNINP routine <(requires that ATM<HBUF must follow C<hMDBUF
	IFN CMDBU=F+CMDBLN-ATMBUF,<=(PRINTX ?ATMBUF m=Hust follow CMDBUF=h>

CMNDIO::.PRI>IN,,.PRIOU	;the n>(ormal I/O JFN's f>Hor CMDBLK
RSCNIO>h::.CTTRM,,.NULIO	?;I/O JFN's for CM?(DBLK when RSCAN i?Hn progress

MYN?hAME::ASCIZ \A\
@TOPCLP:	ASCIZ \B@(\

			;Command @HState Block for C@hOMND%
CMDBLK::0,A,RPARSE##		;flagsA(,,address of repaAHrse routine
	.PRAhIIN,,.PRIOU		;JFNBs for command I/OB(
	POINT 7,TOPCLPBH		;^R buffer (topBh command level prCompt string)
	POC(INT 7,CMDBUF		;poCHinter to start ofCh text buffer
	PODINT 7,CMDBUF		;poD(inter to start ofDH next input
	CMDDhBLN*5-1		;size ofE command buffer iE(n bytes
	0			;nuEHmber of unparsed Ehcharacters
	POINFT 7,ATMBUF		;poinF(ter to start of aFHtom buffer
	ATMBFhLN*5-1		;size of Gatom buffer in byG(tes
	GTJBLK			;aGHddress of GTJFN bGhlock

GTJBLK::BHLOCK	.GJATR+1	;GTJFN block

GTOaJ|30OX60:NXO[20@G>tj9 ciN
	
	CALL	DOCFM##
	CALLG`@ I8 wiOL




x		IFE	.-CHNTAB,<$Ox(NCHN==0>	
	$ONCHxHN==<1B<.-CHNTAB>!xh$ONCHN>	
	IFNB <yC>,<C==.-CHNTABy(>
	IFNB <D>,<DyH==A>
	<A>B5!<B>		
<A>B5!<KK O	LzERRMSG (CAO)LL ,ERMSGH,A,<B>,C,D),A,<BKK0 PIMERRMSG (CAPiLL ,CMDERH,A,<B>,C,D),A,<BKK\s HILt

	
	
	Hi
	
	
	
	
	
	I
	

	IFB  <C>I(,<	PRINTX First bIHyte of error messIhage is missing>
J	IFB  <D>,<	$O==J(2	
		IFIDN <C><JH%>,<$O==0>
		IFIJhDN <C><?>,<$O==2K>
		IFB  <F>,<	K(A	B##+5+$O>
		KHIFNB <F>,<	A	[>Kh
		>
	IFNB <D>L,<	$O==3
		IFNB L(<E>,<	A	[HRRZI	LHT1,[ASCIZ \CD\]Lh>
		IFB  <E>,<	MA	[HRROI	T1,[ASCM(IZ \CD\]>
		IFMHB  <F>,<		CALLREMhT	B##+5+$O]>
		N>
	IFNB <F>,<	MN(OVEI	T2,F
			CANHLLRET	B##+0+$O]>
	PURGE	$O	
>L@ L,:P LupP LkxP L8wP M&f= fiNT

	IFNB g	<A>,<IFDIF <A><g(->,<	HRRZ	T2,A>>gH
	IFB  <BC>,<	ghCALL	FILST1##>
	hIFNB <C>,<
		IFh(DIF <C><->,<	HRRhHOI	T1,C>
		IFB hh <B>,<	CALL	FILSiT3##>
		IFNB <Bi(>,<	MOVX	T3,B
	iH			CALL	FILST4##>ih
	>
	IFB  <C>,j<
		IFNB <B>,<	j(MOVX	T3,B
				CjHALL	FILST0##>
	>
FILST0##>
	>S@v8; s	O




s)	ADJSP	P,4+CX+1		sH
	CALL IP.SA1##			
L IP.SA1##	U  OiMERRMSG (ERP	CAL,ERMSGH,A,<B>,C,D),A,<BU(` Q)M
ERRMSG (ERQICAL,CMDERH,A,<B>,C,D),A,<B]>N9  biN
	PARSE	(c	,<.CMNOI,,<POINT c(7,[ASCIZ\A\]>>)
ASCIZ\A\]>>)

	IFNB k)<A>,<IFDIF <A><kH->,<	MOVE	T2,A>>kh
	IFB  <BC>,<	lCALL	NUMOU1##>
	l(IFNB <C>,<
		IFlHDIF <C><->,<	HRRlhOI	T1,C>
		IFB m <B>,<	CALL	NUMOm(U3##>
		IFNB <BmH>,<
			IFDIF <Bmh><->,<	MOVX	T3,Bn>
						CALL	NUMn(OU4##>
	>
	IFB nH <C>,<
		IFNB <nhB>,<
			IFDIF <oB><->,<	MOVX	T3,o(B>
						CALL	NUMOU0##>
	>
N`@ `:fm t	O:


LEVTt)AB::LEV1PC		;PC atHnd flags stored hthere for level 1 iunterrupts
	LEV2Pu(C		;PC and flags uHstored here for luhevel 2 interruptsv
	LEV3PC		;PC anv(d flags stored hevHre for level 3 invhterrupts

LEV1PwC:	BLOCK 2
LEV2Pw(C:	BLOCK 2
LEV3PC:	BLOCK 2
V3P`D@ `H@ `L@ `P@ `T@ `X@ a9  `	N
	IFNB <`)A>,<	MOVEI	T1,A>`H
	IFNB <B>,<	MO`hVEI	T2,[FLDBK. Ba]
			IFNB <C>,<a(PRINTX ?Invalid aaHrguments to PARSEah >>
	IFNB <C>,<b	MOVEI	T2,C>
	Cb(ALL	DOCMD##			
LL	DOCMD##			
aN~] q	OCALL	TCRLF##CALL	TCRLFa` yIG	IF1 <PRINTX A>IF1 <PRINbD@ bH@ bL@ ee)W "J%

	IRP "9A,<
		SKIPE	T1,"XA		;any JFN's aro"xund from last com#mand?
		 RLJFN%	#8		;yes - release #Xit (JFN already i#xn T1)
		  JERR ($%,,PC)
		SETZM	$8A		;zero so I don$X't do it again
	>
 it again
	e!d  N|RET
e!d@ p	OJRST	RET2##JRST	RET2#e!d` pIOJRST	RET3##JRST	RET3#g%h6 ,yJz{(



	I-)FDIF <B><(PRIV)>-H,<
		DMOVE	T1,[S-hIXBIT /B/	
			 .   SIXBIT /A/]	
		SETSN%
		 TRN.H				
	>
	IFIDN .h<B><(PRIV)>,<
	/	MOVE	T1,[SIXBIT /(/A/]	
		SETNM%
	>

		SETNM%Jc(PRIV)gC&  9IC	HRROI	A,[ASCIZ\B\]	A,gR$g "	:
F=:0
T1"(=:1
T2=:2
T3=:3"H
T4=:4
Q1=:5
Q"h2=:6
Q3=:7
P1=:#10
P2=:11
P3=:1#(2
P4=:13
P5=:14#H
P6=:15
CX=:16
P=:17
CX=:16hH@ hL@ hP@ i]\s 9IY
	IFDIF	<YA><->,<HRROI T1,x[ASCIZ\A\]>
	CALL	[IFXE.	F,F%ECH8O
		 TXNN	F,F%RSXCN
		  SKIPE	TAKxJFN
		   TRNA
	ENDIF.
		    PSOUT
		 RET]
SOi
` d)N2
	
	IFNBdI <C>,<..DISP==Cdh>	
	IFB  <C>,<.e.DISP==.A>	
	IFe(B  <B>,<[ASCIZ\eHA\],,..DISP>	
	IehFNB <B>,<[B!CM%fFW	
			ASCIZ\A\f(],,..DISP>
	PURGE	..DISP
	PURGi7{ qIO
	IFB  <qiA>,<	CALL	TCRLF1#r#>
	IFNB <A>,<	r(HRROI	T1,[ASCIZ\rHA\]
			PSOUTL>
]
			PSOUTL>
up %J-

	SETZM%9	A
	MOVE	T1,[XW%XD A,A+1]
	BLT	T1,B
]
	BLT	DI6P ?DL:P S@P &+P &+P &+P >}{woP