Google
 

Trailing-Edge - PDP-10 Archives - BB-FI82B-DD_1989 - 35,1414/testrp.mac
There is 1 other file named testrp.mac in the archive. Click here to see a list.
TITLE TESTRP - TEST FOR TYPE OF RPXX DISK DRIVE

;TEST A SELECTED PHYSICAL UNIT TO SEE WHETHER IT IS AN RP06 OR RP07
;THIS PROG DESIGNED FOR USE WITH ACCEPTANCE OF DISKS USING THE
;KLAD10 AND ITS NORMAL ACCEPTANCE SCRIPTS. IT IS ASSUMED THAT THIS PROGRAM
;WILL BE USED BY THE RPXTST.CTL FILES IN [35,1414].

	T=1
	T1=2
	T2=3
	D=4	;PHYSICAL UNIT NAME
	LNGTH=30

START:	RESET
	OUTSTR	[ASCIZ/TYPE PHYSICAL UNIT TO BE TESTED - /]	;ASK FOR PHY NAME
	SETZ	D,
	MOVE	T1,[POINT 6,D] ;BYTE POINTER
	MOVE	T2,[POINT 7,NAME]
TYPE:	INCHWL	T		;GET A CHARACTER
	CAIN	T,12		;LINEFEED?
	JRST FIND		;YES END OF LINE GO FIND DISK
	CAIN	T,15		;IS IT A CAR RET?
	JRST	TYPE		;YES, GO LAST CHAR
	IDPB	T,T2		;SAVE THE NAME
	SUBI	T,40		;CONVERT ASCII TO SIXBIT
	IDPB	T,T1		;STORE ANOTHER CHAR IN D
	JRST	TYPE		;GO GET NEXT CHARACTER
FIND:	MOVEM	D,DSKNAM	;SAVE NAME IN ARG BLOCK
	MOVE	D,[XWD LNGTH,DSKNAM]
	DSKCHR	D,		;GET DRIVE CHARACTERISTICS
	JRST	ERROR
	TLNE	D,200000	;IS UNIT DOWN?
	JRST	DOWN		;YES GO TELL OPERATOR
	TRNN	D,20		;IF BIT IS SET, ASSUME RP07
	JRST	RP06
	JRST	RP07
DOWN:	OUTSTR	[ASCIZ/
$ /]
	OUTSTR	NAME
	OUTSTR	[ASCIZ/  IS NOT UP, DO YOU WISH TO TEST THIS DRIVE? TYPE Y OR N -
 /]
	INCHWL	T
	CAIN	T,12
	JRST	.+5
	CAIN	T,15
	JRST	.-4
	MOVE	T1,T
	JRST	.-6
	CAIN	T1,"Y"
	JRST	LOOP
	CAIE	T1,"N"
	JRST	DOWN
	OUTSTR	[ASCIZ/??
/]
	EXIT

LOOP:	OUTSTR	[ASCIZ/
$ CYCLE UP DRIVE /]
	OUTSTR	NAME
	OUTSTR	[ASCIZ/ - TYPE G WHEN READY - 
/]
LOOP1:	INCHWL	T
	CAIN	T,12
	JRST	.+5
	CAIN	T,15
	JRST	LOOP1
	MOVE	T1,T
	JRST	LOOP1
	CAIN	T1,"G"
	JRST	FIND+1
	JRST	LOOP

RP06:	OUTSTR	[ASCIZ/# RP06
/]				;OUTPUT REMARK WITH LEADING # SO BATCH
				;CAN TRAP IT.

	EXIT
RP07:	OUTSTR	[ASCIZ/RP07
/]				;OUTPUT TYPE WITHOUT LEADING #
	EXIT

ERROR:	OUTSTR	[ASCIZ/?INCORRECT PHYSICAL UNIT -
?PLEASE TRY AGAIN
/]
	JRST START

NAME:	BLOCK	3

DSKNAM:	BLOCK	1
	BLOCK	LNGTH-1


	END START