Google
 

Trailing-Edge - PDP-10 Archives - decuslib20-04 - decus/20-0134/fcltmp.mac
There is 1 other file named fcltmp.mac in the archive. Click here to see a list.
TITLE FCLTMP PROGRAM TO CREATE A PARAMETER FILE, CONTENTS DEPENDING ON CPU TYPE.
;FILE:	FCLTMP.PRM	PARAMETER FILE FOR FOCAL ASSEMBLY.
	AC=1
	MQ=2
	PC=3
	QC=4
	PT=5		;BYTE POINTER
	.GTCNF=11	;GETTAB CONFIGURATION TABLE.
	%CNVER=34	;MONITOR VERSION NUMBER.
START:	RESET
	INIT
	SIXBIT	"DSK"
	XWD	OBUF,0
	HALT	.
	ENTER	E2		;CREATE PARAMETER FILE.
	HALT	.
	JSP	PC,OUTASC
	ASCIZ	"IF1 <
WPV=2
.CPU="
	MOVEI	MQ,"1"		;DEFAULT VALUE FOR IF IT'S A PDP-6
	JFCL	17,.+1
	JRST	.+1
	JFCL	1,MON		;JUMP IF PDP-6
	AOS	MQ
	MOVNI	AC,1
	AOBJN	AC,.+1
	JUMPN	AC,MON		;JUMP IF KA-10
	AOS	MQ
	BLT	AC,0
	JUMPE	AC,MON		;JUMP IF KI-10
	AOS	MQ
MON:	JSP	QC,OUTONE	;OUTPUT ONE CHARACTER =C(MQ)
	MOVE	AC,[XWD %CNVER,.GTCNF]
	GETTAB	AC,		;FIND THE MONITOR'S VERSION NUMBER IN AC.
	JRST	FIN		;HERE IF IT HASN'T GOT ONE.
	MOVE	PT,[POINT 3,AC,17];SET TO PICK ONE DIGIT AT A TIME.
	JSP	PC,OUTASC	;CLOSE PREVIOUS LINE AND START NEW ONE.
	ASCIZ "
MONITOR="
	JSP	QC,OUTDIG	;FIRST DIGIT OF VERSION NUMBER.
	JSP	QC,OUTDIG	;SECOND. (E.G. 6)
	MOVEI	MQ,"."		;DECIMAL POINT.
	JSP	QC,OUTONE
	JSP	QC,OUTDIG	;HIGH ORDER OF MINOR VERSION NUMBER (E.G. 0)
	JSP	QC,OUTDIG	;LOW ORDER (E.G. 1)
FIN:	JSP	PC,OUTASC
	ASCIZ	"
>;END IF1
"
	EXIT
OBUF:	BLOCK 3
E2:	SIXBIT "FCLTMP"
	SIXBIT "PRM"
	BLOCK 2
OUTASC:	HRLI	PC,(POINT 7)
OUTAS1:	ILDB	MQ,PC		;PICK NEXT CHAR IN STRING.
	JUMPE	MQ,1(PC)	;RETURN TO IN-LINE CODE.
	MOVEI	QC,OUTAS1	;DUMMY UP A RETURN ADDRESS TO LOOP.
OUTONE:	SOSGE	OBUF+2		;DECREMENT & TEST COUNT
	OUT			;OUTPUT A BUFFER.
	SKIPA			;O.K. OUTPUT OR NO OUTPUT.
	HALT	.
	IDPB	MQ,OBUF+1	;PUT CHAR IN BUFFER.
	JRST	(QC)		;RETURN.
;HERE TO SEND AN OCTAL DIGIT FROM WHERE PT POINTS BELOW.
OUTDIG:	ILDB	MQ,PT		;GET 3 BITS.
	ADDI	MQ,"0"		;MAKE IT A DIGIT.
	JRST	OUTONE	;SEND IT.
	END	START