.; .MODULE IVP,RELEASE=V05,VERSION=13,COMMENT=<Installation Verification>
.;
.;                        COPYRIGHT (c) 1984 BY
.;             DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
.;                         ALL RIGHTS RESERVED.
.;
.; THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND  COPIED
.; ONLY  IN  ACCORDANCE  WITH  THE  TERMS  OF  SUCH  LICENSE AND WITH THE
.; INCLUSION OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR  ANY  OTHER
.; COPIES  THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY
.; OTHER PERSON.  NO TITLE TO AND OWNERSHIP OF  THE  SOFTWARE  IS  HEREBY
.; TRANSFERRED.
.;
.; THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT  NOTICE
.; AND  SHOULD  NOT  BE  CONSTRUED  AS  A COMMITMENT BY DIGITAL EQUIPMENT
.; CORPORATION.
.;
.; DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR  RELIABILITY  OF  ITS
.; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL.
.;
.;
.;***********************************************************************
.;			      IVP.COM
.;	  RT-11 VERSION 5.2 INSTALLATION VERIFICATION PROGRAM
.;***********************************************************************

	.DISABLE SUFFIX
	.DISABLE PREFIX
	.ENABLE GLOBAL
	.IFDF $BIG .GOTO IVP0
	;	The Installation Verification Procedure must be run indirectly
	;	through VERIFY.COM
	.EXIT
.IVP0:
	;
	;
	;		INSTALLATION VERIFICATION PROGRAM
	;
	;
	;	The Installation Verification Program (IVP) verifies that RT-11 has
	;	been installed correctly on your hardware configuration.  
	;
	;	The program will:
	;	
	;	.  Print the RT-11 V5.2 Release Notes (If a serial or line printer
	;	   is available)
	;
	;	.  Build and run the terminal identification program (IVP.MAC)
	;
	;	.  Print the program listing and link map for IVP.MAC (If a serial
	;	   or line printer is available)
	;
	.ASK CONTIN         Press the "RETURN" key when ready to continue
	.IF <SYSTEM> EQ 10 .GOTO IVP22
	;
	;	The IVP must be run using the Foreground/Background monitor.
	;	Reboot the system under FB and restart the IVP.
	.STOP
.IVP22:
	.SETF LP
	.TESTDEVICE LP
	.PARSE <EXSTRI> "," LPDEV REST
	.SETS LPTYP "line"
	.IF LPDEV NE "NSD" .GOTO IVP25

	.SETS LPTYP "serial"
	;
.RE:
	.SETS LPDEV "LS"
	.ASK LS         Does your system have a serial printer? (Enter Yes or No) 
	.IFT <DEFAUL> .GOTO RE

	.IFF LS .GOTO PC3
	.IF <SYDISK> EQ "DW" .GOTO PC3
	.IF <SYDISK> EQ "DZ" .GOTO PC3
	;
	;	This procedure assumes that your serial printer has been installed
	;	at the standard device address (CSR=176500 & vector=300).
	;
	REMOVE LS
	SET LS CSR=176500
	SET LS VECTOR=300
	INSTALL LS
	.IF <EXSTAT> EQ <SUCCES> .GOTO PC3
	;
	;Error installing LS handler.  (CSR and vector unknown)
	.GOTO FAIL

.PC3:
	.IFF LS .SETS LPDEV "NSD"
	.IF LPDEV NE "LS" .GOTO IVP29
	;
	ASSIGN LS LP
	.IF <EXSTAT> EQ <SUCCES> .GOTO IVP29
	;
	;Error ASSIGNing LS LP
	.GOTO FAIL
.IVP29:
	.IF LPDEV NE "NSD" .GOTO IVP25
	.SETS LPTYP ""

	;
	;	Your configuration does not contain a line or serial printer.
	;	
	.ASK TT         Do you want the RT-11 release notes typed at your terminal?
	.IFF TT .GOTO IVP60
	;
	;***********RT11 V5.2 RELEASE NOTES
	;
	TYPE '$OTHER'V5NOTE.TXT
	;
	;***********END OF RT11 V5.2 RELEASE NOTES
	;
	.IF <EXSTAT> EQ <SUCCES> .GOTO IVP60
	;
	;Error TYPEing '$OTHER'V5NOTE.TXT
	.GOTO FAIL
.IVP25:
	.SETT LP
	;
	;	Your  configuration  contains  a  'LPTYP' printer.  Check that the
	;	printer is on-line and ready.  The RT-11 Version 5.2 release notes
	.SETS HOW "queued"
	.IF <SYDISK> EQ "DW" .SETS HOW "spooled"
	;	will now be 'HOW' to this printer.
	;	
	;
	LOAD 'LPDEV'
	.IF <EXSTAT> EQ <SUCCES> .GOTO IVP30
	;
	;Error LOADing 'LPDEV'
	.GOTO FAIL
.IVP30:
	;
	.IF <SYDISK> EQ "DW" .GOTO IVP35
	RUN '$OTHER'QUEMAN /A
	;
	FRUN '$OTHER'QUEUE
	.IF <EXSTAT> EQ <SUCCES> .GOTO IVP50
	;
	;Error FRUNing '$OTHER'QUEUE
	.GOTO FAIL
.IVP35:
	FRUN SY:SPOOL
	.IF <EXSTAT> EQ <SUCCES> .GOTO IVP38
	;
	;Error FRUNing SY:SPOOL
	.GOTO FAIL
.IVP38:
	ASSIGN SP0 LP
	ASSIGN SP0 LP0
	.IF <EXSTAT> EQ <SUCCES> .GOTO IVP50
	;
	;Error assigning spooler handler (SP) to LP
	.GOTO FAIL
.IVP50:
	;
	.IF <SYDISK> EQ "DW" .GOTO IVP55
	RUN '$OTHER'QUEMAN 'LPDEV':='$OTHER'V5NOTE.TXT
	.IF <EXSTAT> EQ <SUCCES> .GOTO IVP60
	;
	;Error QUEUEING '$OTHER'V5NOTE.TXT
	.GOTO FAIL
.IVP55:
	SET SP FLAG=0
	SETUP PRINTER LETTER
	.IF <EXSTAT> EQ <SUCCES> .GOTO IVP58
	;
	;Error setting printer to letter mode
	.GOTO FAIL
.IVP58:
	PRINT V5NOTE.TXT
	.IF <EXSTAT> EQ <SUCCES> .GOTO IVP60
	;
	;Error printing '$OTHER'V5NOTE.TXT
	.GOTO FAIL
.IVP60:
	;
	;	The console terminal identification program will now be built and run.
	;
	.IFF LP .GOTO IVP65
	;	The assembly listing and link map from this program will be printed.
.IVP65:
	.SETS LIST ""
	.SETS LST $OTHER
	.IF <SYDISK> NE "DY" .SETS LST "SY:"
	.IFT LP .SETS LIST "/LIST:'LST'IVP/CROSSREF"
	.IF <SYDISK> EQ "DY" ASSIGN '$OTHER' WF
	;
	MACRO'LIST' '$OTHER'IVP
	.IF <EXSTAT> EQ <SUCCES> .GOTO IVP70
	;
	;Error assembling IVP.MAC
	.GOTO FAIL
.IVP70:
	.IFT LP .SETS LIST "/MAP:'LST'IVP"
	;
	LINK'LIST' IVP
	.IF <EXSTAT> EQ <SUCCES> .GOTO IVP80
	;
	;Error linking IVP.OBJ
	.GOTO FAIL
.IVP80:
	.IFF LP .GOTO IVP85
	.IF <SYDISK> EQ "DW" .GOTO IVP82
	;
	RUN '$OTHER'QUEMAN 'LPDEV':='LST'IVP.LST/D,'LST'IVP.MAP/D
	.IF <EXSTAT> EQ <SUCCES> .GOTO IVP85
	;
	;Error QUEUEing 'LST'IVP.LST,'LST'IVP.MAP
	.GOTO FAIL
.IVP82:
	SET SP FLAG=1
	SETUP PRINTER LISTING
	PRINT/DELETE 'LST'IVP.LST,'LST'IVP.MAP
	.IF <EXSTAT> EQ <SUCCES> .GOTO IVP84
	;
	;Error Printing 'LST'IVP.LST,'LST'IVP.MAP
	.GOTO FAIL
.IVP84:
	SET SP FLAG=0
	SETUP PRINTER HORIZ:10
	SHOW QUEUE
.IVP85:
	;
	RUN IVP
	.IF <EXSTAT> EQ <SUCCES> .OR .IF <EXSTAT> EQ <WARNIN> .GOTO IVP90
	;
	;Error running IVP.SAV
	.GOTO FAIL
.IVP90:
	;
	DELETE IVP.(SAV,OBJ)
	.IF <EXSTAT> EQ <SUCCES> .GOTO IVP100
	;
	;Error deleting IVP.(SAV,OBJ)
	.GOTO FAIL

.IVP100:
	.IFF LP .GOTO IVP115
	.IF <SYDISK> EQ "DW" .GOTO IVP115
	.TESTFILE 'LST'IVP.MAP
	.IF <FILERR> NE <SUCCES> .GOTO IVP102
	;
	RUN '$OTHER'QUEMAN /L
	;
	;	...Waiting for listing to finish printing.
.IVP101:
	.TESTFILE 'LST'IVP.MAP
	.IF <FILERR> EQ <SUCCES> .GOTO IVP101
.IVP102:
	;
	RUN '$OTHER'QUEMAN /A
	.IF <EXSTAT> EQ <SUCCES> .GOTO IVP110
	;
	;Error ABORTing Foreground
	.GOTO FAIL
.IVP110:
	.IFF LP .GOTO IVP111
	;
	UNLOAD 'LPDEV'
	.IF <EXSTAT> EQ <SUCCES> .GOTO IVP111
	;
	;Error UNLOADing 'LPDEV'
	.GOTO FAIL
.IVP111:
	;
	UNLOAD F
	.IF <EXSTAT> EQ <SUCCES> .GOTO IVP115
	;
	;Error UNLOADing Foreground
	.GOTO FAIL
.IVP115:
	;
	;	Your installation has been verified and appears to be correctly ins-
	;	talled.	To obtain information on the various RT-11 commands, enter:
	;
	;				HELP
	;
	;	In addition, the  operating  system is thoroughly documented:  refer
	;	to the GUIDE TO RT-11 DOCUMENTATION and the  INTRODUCTION  TO RT-11.
	;	These manuals help you become familiar with the system.  If you will
	;	be installing any  optional  languages  or utility software,  follow
	;	the installation instructions packaged with those products.
	;
	;	Digital suggests you now edit  the  provided startup command file(s)
	;	(STARTX.COM and/or STARTF.COM)  to  select  the run-time options ap-
	;	propriate for your configuration.
	;
	UNPROTECT SY:START*.COM/NOLOG
	.IF <SYDISK> NE "DW" .GOTO CON
	.IFF LP .GOTO CON
	;
	;	The spooler has been left running for your convenience,  however, if
	;	you wish to rerun this procedure,  you must abort the foreground job
	;	with the ABORT F command and deassign LP and LP0 before doing so.
	.GOTO CON

.FAIL:
	;
	;
	;        The Installation Verification Program has failed due to the 
	;        error specified above.
.CON:	;
	.ASK CONTIN         Press the "RETURN" key when ready to continue.
	.EXIT
