/ WPCV.PA - DECCONVERT STARTUP CODE
/
/		*******  EDIT HISTORY  *******
/


/***************************************************************************
/****			WRITE OUT CODE FOR WPCV				****
/***************************************************************************


	FIELD 0			/ FIELD WHERE RXHAN IS LOCATED
	*200			/ START ADDRESS USED BY OS8 "GO" COMMAND
	JMP I	.+3		/ LOCATION USED TO START UP RXHAN
	JMP I	.+1 		/ LOCATION USED TO RETURN TO OS8 MONITOR
	7605			/ ADDRESS OF OS8 MONITOR RETURN POINT
	RXLOAD			/ ADDRESS OF START LOCATION FOR RXHAN

	*RXLDLS			/ ADDRESS WITHIN RXHAN TO OVERLAY
	RXEWT			/ WRITE FUNCTION CODE
	0
	RXQBLK			/ ADDRESS OF QUEUE BLOCK TO USE
	.			/ ADDRESS OF TABLE OF DISK COMMANDS

	DLCVTI;CVINIT;CDF 60;-DSCVTI	/ Write-out spell check init code.
	0				/ END OF LIST

	FIELD	6

	*5000
BUFADR,

	*6000

CVINIT=.
CDFMYF=CDFMTH			/ A CDF to current field.
CDFCVT=CDFMTH
CDFTXT=CDFMTH			/ make TXT field here for now




STRTUP,	XX			/ Do initialization stuff.
	HLT			/ halt you b****r
	CDFMNU			/ Map MENU field.
	TAD I	(MUBUF+MNOPTC)	/ Get options word.
	DCA	OPTNWD		/ save it aside.

	TAD	OPTNWD		/ Save it for editing w/o MABIT.
	AND	(-1-MABIT)	/ Isolate all but MABIT.
	DCA I	(MUBUF+MNOPTC)	/  ...

	CDFMYF			/ Map data field back to our field.

	JMS	GTDKID		/ Get system disk id.
		SYSID-1		/  ...

	JMS I	(CHKCV)		/ See if CV diskette needs to be loaded.
	 JMP	NOCV		/ JMP if no. We are currently loaded.

UTLOAD,	AC0001			/ INDICATE UTILITY DISK REQUIRED
UTLDER,	JMS	GETDRV		/ ASK USER FOR DRIVE NUMBER AND VALIDATE IT
	JMP	STRTGM		/ USER OPTED FOR GOLD MENU RETURN

CVLOAD,	JMS I	(FILLIO)	/ Fill queue block parameters.
		RXERD+4000	/ Function				
		CDFCVT		/ Field.
		00		/ load address.
		-DSCONV		/ Size in blocks.
		DLCONV		/ Starting block #.
	 JMP	UTLDER		/ Report missing  cv disk error.

	JMS	MOV100		/ Go copy 100 locations from MENU field

NOCV,

NODD,	JMS I	(CONVERT)		/ Start up the spell checker.

STRTGM,	JMS	CHKID		/ Make sure original system diskette is installed.

MYEXIT,
	CDIMNU			/ Return CDI instruction to MENU field
	JMP I	STRTUP		/ Return to caller.

OPTNWD,	0			/ Location for MNOPTC word during spell check.
SAVET6,	0			/ Location for value of MNTMP6 operation word.
				/ *** SAVET6 = (MNTMP6) - 7 ***		
				/ SAVET6 IS USED AS A THREE WAY SWITCH	
				/ MINUS VALUE = CONVERTING CORRECTOR	
				/ ZERO  VALUE = LOAD USER DICTIONARY	
				/ PLUS  VALUE = POST PROCESSING		


/***********************************************************************
/ CHKID - MAKE SURE ORIGINAL SYSTEM DISKETTE IS INSTALLED BEFORE
/ RETURN TO MAIN MENU.
/
/ WHEN WPCONV IS CALLED, THE NAME AND DISK "RANDOM" ID ARE READ INTO
/ SYSID0-3.  BEFORE WPSPEL IS EXITED, THE NAME AND "RANDOM" ID FOR THE
/ DISK IN DRIVE 0 ARE READ INTO SYSID4-7.  THIS ROUTINE CHECKS TO MAKE
/ SURE THAT BOTH BLOCKS MATCH
/
/ IF NO MATCH IS FOUND, THE OPERATOR IS ASKED TO INSERT THE ORIGINAL SYSTEM
/ DISKETTE.  THE ROUTINE IS NOT EXITED UNTIL THE NAME AND "RANDOM" ID MATCH
/
/***********************************************************************

CHKID,	XX			/ CHECK ORIGINAL SYSTEM DISKETTE
	TAD	OPTNWD		/ Get original option word.
	CDFMNU			/ Map MENU field.
	DCA I	(MUBUF+MNOPTC)	/ Restore it.
	CDFMYF			/ Back to our field.
	JMS	GTDKID		/ Go read current drive diskette name & ID.
CHKID0,		SYSID+4-1	/  ...
	TAD	(-4		/
	DCA	T1		/ SET UP COUNTER
	TAD	(SYSID-1	/
	DCA	X1		/ SET UP SOURCE INDEX
	TAD	CHKID0		/  = (SYSID+4-1				
	DCA	X2		/ SET UP COMPARE INDEX
CHKIDL,	TAD I	X1		/ READ OLD WORD
	CIA			/
	TAD I	X2		/ COMPARE WITH NEW WORD
	SZA CLA			/
	 JMP	GTDKER		/ NO, GO ASK FOR ORIGINAL SYSTEM DISKETTE
	ISZ	T1		/ SEE IF LAST WORD
	JMP	CHKIDL		/ NO, LOOP BACK
	JMP I	CHKID		/ RETURN TO CALLER

MOV100,	XX			/ INITIALIZE PAGE ZERO LOCATIONS

	JMS	CPYBUF		/ Copy locations 0-77 to memory field X
		-100		/ 100 locations
		CDFMNU		/ from MENU field
		0000-1		/  location 0,
		CDFMYF		/   to field X,
		0000-1		/    location 0.

	JMP I	MOV100		/ RETURN TO CALLER

/***********************************************************************
/
/	GTDKID GETS THE DISK ID OF THE SYSTEM DISK
/	THE ID IS THE THREE NAME WORDS AND THE "RANDOM" WORD
/	IT IS USED TO INSURE THAT THE SAME SYSTEM DISK IS REINSERTED
/	IN CASES WHERE IT MUST BE REMOVED.
/
/***********************************************************************

GTDKID,	XX
	TAD I	GTDKID		/ Get buffer address to copy NAME & ID into.
	ISZ	GTDKID		/ Bump to return address.
	DCA	GTDKIA		/ save buffer address.

GTDK1,
	CDFMNU			/ Get density of drive 0.
	DCA I	(CMDBLK+RXQDRV)	/ Set the drive # to 0.			

	CDFMYF			/ Back to our field 
	JMS	RDFIO		/ Do a GET DENSITY to establish drive density.
		RXEDN+4000	/ "GET DENSITY" code.

	SPA CLA			/ Skip if no error.
	 JMP	GTDKER		/ Error. Display "replace" msg.

	JMS	FILLIO		/  ...
		RXERD+4000	/ Function				
		CDFTXT		/ Read home block into block buffer.
		BUFADR		/  buffer address.
		-1		/ Size (1 block).
		DLDIR		/ Read the home block.
	 JMP	GTDKER		/ Error. Display "replace" msg.

	JMS	CPYBUF
		-4		/ Size
		CDFTXT		/ Source field.
		BUFADR+2-1	/ Source Address
		CDFMYF		/ DESTINATION FIELD
GTDKIA,		XX		/ DESTINATION ADDRESS

	JMP I	GTDKID		/ RETURN TO CALLER AFTER OBTAINING ID WORDS

GTDKER,				/ Prompt user to insert the system diskette.
	JMS	SYPRMP		/  ...
	JMP	GTDK1		/ Go retry.

SYSID,	0;0;0;0			/ System disk ID.
	0;0;0;0			/ ID of diskette in drive 0 at exit time.

CPYBUF,	XX			/ copy a buffer
	TAD I	CPYBUF		/ get count
	DCA	T1		/ save it
	TAD     CPYBUF		/ get the address of the rest of params
	DCA	X0		/ save in an INDEX reg
	TAD I	X0		/ get CDF A
	DCA	COPY1		/ save in code
	TAD I	X0		/ get address A
	DCA	X1		/ save in INDEX reg
	TAD I	X0		/ get CDF B
	DCA	COPY2		/ save in code
	TAD I	X0		/ get address B
	DCA	X2		/ save in INDEX reg
COPY1,	0			/ puts a CDF here
	TAD I	X1		/ get a word
COPY2,	0			/ puts a CDF here
	DCA I	X2		/ copy the word
	ISZ	T1		/ finished ?
	JMP 	COPY1		/ no.....
	CDFMYF			/ just in case
	JMP I	X0		/ return	

	X=.			/ FIRST FREE LOCATION ON PAGE
/---------------------
	PAGE



/***************************************************************************
/****		     PAGE ZERO LOCATIONS IN FIELD SIX			****
/***************************************************************************

			/ SET COUNTER TO LOCATION 100 ON PAGE ZERO

X= 100;	CVTFUN=	X	/ LOCATION FOR CONVERT FUNCTION CODE
X= X+1;	CVTDRV=	X	/ LOCATION FOR USER SPECIFIED DRIVE NUMBER
X= X+1;	CVTMAX=	X	/ LOCATION FOR MAXIMUM DRIVE NUMBER
X= X+1;	CVTDOC=	X	/ LOCATION FOR CURRENT DOCUMENT NUMBER
X= X+1;	CVTMS1=	X	/ LOCATION FOR POINTER TO UTILITY/DICTIONARY TEXT
X= X+1;	CVTMS2=	X	/ LOCATION FOR POINTER TO DRIVE - DRIVE/DEVICE TEXT
X= X+1; CVTOPT=	X	/ LOCATION FOR SYSTEM OPTION CONFIGURATION BITS
X= X+1; CVTSDR=	X	/ LOCATION FOR USER DRIVE SELECTION FOR CONVERT

X= X+1;	REDFLG=	X	/ LOCATION FOR READ ROUTINE DRIVE REQUEST FLAG
X= X+1;	REDDRV=	X	/ LOCATION FOR READ ROUTINE DRIVE NUMBER
X= X+1;	REDNUM=	X	/ LOCATION FOR READ ROUTINE CHARACTER COUNTER
X= X+1;	REDCHR=	X	/ LOCATION FOR READ ROUTINE INPUT CHARACTER

X= X+1;	VALADD=	X	/ LOCATION FOR VALIDATION TABLE POINTER ADDRESS
X= X+1;	CVTFNR=	X	/ LOCATION FOR FOOTNOTE RESULT DOC DRIVE NUMBER	
X= X+1;	CVTOPR=	X	/ LOCATION FOR SPell OPeRation flag		
			/	0 IF FOOTNOTING, NOT 0 IF DECCONVERT	


/ GETDRV IS CALLED TO OBTAIN A VALID DRIVE NUMBER FOR THE
/ UTILITY DISK AND THE DICTIONARY DISK.  IT CALLS CVTGET TO PROMPT THE
/ USER FOR THE DRIVE NUMBER AND THEN CHECKS TO SEE IF THE USER SUPPLIED
/ NUMBER IS A VALID DRIVE NUMBER WITH THE PROPER DISKETTE LOADED.
/ IF NOT, IT CALLS CVTGET TO REPORT THE ERROR.
/
/ GETDRV IS CALLED AS FOLLOWS:
/
/	CDIBUF			/ CHANGE TO BUFFER FIELD
/	JMS I	GETDRV		/ CALL ROUTINE TO GET DRIVE NUMBER
/	JMP	GOLDMN		/ GOLD MENU RETURN
/	....			/ NORMAL RETURN
/
/	UPON ENTRY, THE AC CONTAINS ONE OF THE FOLLOWING VALUES:
/
/	AC = 0	ERROR CALL INDICATING AN ERROR DETECTED WHILE READING
/	AC = 1	REQUEST FOR WPS UTILITY DISKETTE

GETDRV,	XX			/ ROUTINE TO GET DRIVE # VIA MENU.
GETBAD,	DCA	CVTFUN		/ SAVE CONVERT FUNCTION CODE
	JMS	CVTGET		/ GO PROMPT USER FOR DRIVE NUMBER
	  JMP	GETXIT		/  USER OPTED FOR GOLD:MENU RETURN.

	JMS	FILLIO		/ FIRST, READ IN THE ALLOC BLOCK.
		RXERD+4000	/ FUNCTION				
		CDFTXT		/ USE THE BUFFER DEFINED IN TXT FIELD.
		BUFADR		/ BUFFER ADDRESS.
		-1		/ 1 BLOCK.
		DLALOC		/ ALLOCATION BLOCK.
	 JMP	GETBAD		/ REPORT BAD DISKETTE.

	CDFTXT			/ MAP BUFFER
	TAD I	(BUFADR+1)	/ SEE IF DOCUMENT DISKETTE.
	TAD	(-40)		/  40 MEANS DOCUMENT DISKETTE.
	SZA CLA			/ SKIP IF DOCUMENT DISKETTE.
	 JMP	GETBAD		/ REPORT VALIDATION ERROR.
	TAD I	(BUFADR+2)	/ CHECK MAX NUMBER OF DOCUMENTS ALLOWED.
	SZA CLA			/ SKIP IF NONE.
	 JMP	GETBAD		/ REPORT VALIDATION ERROR.

	CDFMYF			/ BACK TO OUR FIELD.
	JMS	FILLIO		/ NOW READ THE HOME BLOCK.
		RXERD+4000	/ FUNCTION				
		CDFTXT		/ USE THE SAME 2 PAGES.
		BUFADR		/  ...
		-1		/ 1 BLOCK.
		DLDIR		/ HOME BLOCK.
	 JMP	GETBAD		/ REPORT BAD DISKETTE.

VALDAT, AC7777			/ set ac to -1 for index reg access
	TAD	VALADD		/ GET TABLE ADDRESS POINTER TO NAME
	DCA	X0		/ SAVE IN AUTO INDEX REGISTER
	AC7775			/ SET UP TO COMPARE 3 WORDS.
	DCA	T1		/ STORE COUNT IN COUNTER
	TAD	(BUFADR+2-1)	/ POINTER TO ACTUAL DOCUMENT NAME.
	DCA	X1		/ SAVE IN AUTO INDEX REGISTER

VAL001,	CDFMYF			/ SWITCH BACK TO THIS FIELD
	TAD I	X0		/ PICK UP PART OF DESIRED NAME.
	CIA			/ SEE IF IT'S SAME AS DOCUMENT NAME.
	CDFTXT			/ SWITCH TO TEXT FIELD BUFFER
	TAD I	X1		/ GET WORD OF ACTUAL DOCUMENT NAME.
	SZA CLA			/ SKIP IF THE SAME.
	JMP	GETBAD		/ REPORT VALIDATION ERROR.
	ISZ	T1		/ BUMP COUNT OF WORDS TO COMPARE.
	JMP	VAL001		/ LOOP UNTIL DONE WITH WORDS TO COMPARE

	ISZ	X1		/ POINT TO DATE OF BUILD.
	ISZ	X1		/  ...
X=BLDDY^100+BLDMO		/ COMPUTE EXPECTED DAY-MONTH VALUE.
	TAD	(-X)		/ SEE IF DATE OF BUILD MATCHES DISKETTE.
	TAD I	X1		/  IF NOT THEN DISKETTE IS OF A DIFFERENT BUILD
	SZA CLA			/  AND THEREFORE IS TO BE REJECTED.
	 JMP	GETBAD		/ REJECT DISKETTE IF FROM A DIFFERENT BUILD.

	TAD	(-BLDYR)	/ COMPARE YEAR OF BUILD TOO.
	TAD I	X1		/  
	SZA CLA			/  AND THEREFORE IS TO BE REJECTED.
	 JMP	GETBAD		/ REJECT DISKETTE IF FROM A DIFFERDISK
	SZA CLA			/ ARE WE ABOUT TO LOAD THE UTILITY DISK ?
	JMP	GETXIT		/ NO, WE ARE DOING THE DICTIONARY DISK

	CIFMNU
	JMS I	IOACAL		/ CALL STANDARD MESSAGE OUTPUT ROUTINE
	    0			/ USE DEFAULT OUTPUT CHANNEL
	    WRKTXT		/ POINTER TO MESSAGE CONTROL STRING
	    0200		/ CLEAR SCREEN FROM TIME DISPLAY FIRST	
	    1020		/ SCREEN POSITION FOR FIRST TEXT LINE
	    CVTUTL		/ POINTER TO "WPS UTILITY SOFTWARE"

GETXIT,	JMP I	GETDRV		/ RETURN TO CALLER.



SYPRMP,	XX			/ Prompt for system diskette.
SYPRM1,	CIFMNU
	JMS I	IOACAL		/  ...
		0		/ Display to the screen.
		SYDISK		/ Replace the system diskette, etc.
		0000		/ Cursor Home address.
		1505		/ Error message address.
		2305		/ posn of 2nd part of prompt.
	JMP	SYPAP2		/ Merge below.

SYPAP1,	CIFSYS			/ JWAIT for a bit.
	JWAIT			/  ...
SYPAP2,	CIFSYS			/ Get an input character.
	XLTIN			/  ...
	 JMP	SYPAP1		/ Loop & wait if none.

	TAD	(-EDNWLN)	/  Return typed?
	SZA CLA			/ Skip if yes. Otherwise repeat error.
	 JMP	SYPRM1		/ Repeat the message.
	JMP I	SYPRMP		/ Return to caller.

SYDISK,	IFDEF ENGLSH <
TEXT '^P!E^CG^P&REPLACE THE SYSTEM DISKETTE IN DRIVE 0^PAND PRESS !&RETURN'
	>
IFDEF ITALIAN <
	TEXT /^P!E^CG^P&INTORODURRE IL DISCO SISTEMA NELL'UNIT\@ 0 /
	*.-1
	TEXT /^P&E PREMERE RITORNO/
	>



	X=.			/ FIRST FREE LOCATION ON PAGE
/---------------------
	PAGE


/ CVTGET IS CALLED FROM THE GETDRV ROUTINE TO PROMPT THE USER FOR A DISK
/ DRIVE NUMBER WHICH SHOULD CONTAIN EITHER THE WPS UTILITY SOFTWARE 
/  THIS ROUTINE IS ALSO CALLED TO HANDLE A
/ DISK ERROR THAT MAY BE CAUSED BY THE USER NOT HAVING THE PROPER DISKETTE
/ LOADED IN THE SPECIFIED DRIVE OR A READ ERROR ON THE SPECIFIED DRIVE.
/
/ UPON ENTRY, THE VALUE STORED IN CVTFUN DETERMINES WHAT KIND OF REQUEST IS
/ BEING MADE.  A ZERO ENTRY INDICATES THAT THIS ROUTINE HAS BEEN CALLED
/ BEFORE AND THAT ALL TEXT POINTERS ARE CORRECTLY SET UP.  A NON-ZERO ENTRY
/ WILL CAUSE THE ROUTINE TO SET ITSELF UP TO HANDLE THE PROPER REQUEST.

/ AFTER THE USER HAS ENTERED A DRIVE NUMBER, IF NECESSARY, THE INDICATED
/ DRIVE NUMBER IS CHECKED VIA A GET-DENSITY CALL TO SEE IF IT CONTAINS A
/ DISKETTE OR FOR A WINCHESTER SYSTEM, THAT THE VOLUME IS MOUNTED.

/ UPON EXIT, CONTROL IS PASSED TO THE FIRST LOCATION FOLLOWING THE CALL IF
/ THE USER TYPED GOLD MENU TO ABORT THE OPERATION AND RETURN TO MAIN MENU.
/ CONTROL IS PASSED TO THE SECOND LOCATION FILLOWING THE CALL WHEN THE USER
/ ENTERS A VALID DRIVE NUMBER CONTAINING A MOUNTED DISKETTE OR VOLUME.

CVTGET,	XX			/ ENTRY POINT TO GET A DRIVE NUMBER FROM USER
	TAD	CVTFUN		/ PICK UP THE CONVERT FUNCTION CODE
	SNA CLA			/ IS THIS A VALIDATION ERROR OPERATION ?
	JMP	CVTVER		/ YES, GO HANDLE THE VALIDATION ERROR

	TAD	(VALTAB)	/ CONSTRUCT VALIDATION POINTER
	DCA	VALADD		/ STORE TABLE POINTER ADDRESS

	TAD	CVTFUN		/ GET THE FUNCTION CODE BACK
	TAD	(-1)		/ DECREMENT THE FUNCTION CODE
	SNA			/ IS THIS A UTILITY DISK REQUEST ?
	JMP	CVTGT1		/ YES, GO SET UP FOR THE UTILITY DISK

CVTGT1,	TAD	(CVTUTL)	/ ELSE SET UP FOR WPS UTILITY DISK
	DCA	CVTMS1		/ STORE POINTER TO UTL. txT STRING

	CDFMNU			/ CHANGE DATA FIELD TO THE MENU FIELD

	TAD I	(MNMXDR+MUBUF)	/ PICK UP THE MAXIMUM DRIVE NUMBER ALLOWED
	DCA	CVTMAX		/ SAVE FOR LATER USE
	TAD I	(MNOPTN+MUBUF)	/ PICK UP THE SYSTEM OPTION CONFIGURATION BITS
	DCA	CVTOPT		/ SAVE FOR LATER USE
	TAD I	(MNSDRV+MUBUF)	/ PICK UP THE USER DRIVE SELLECTION FOR CONVERT
	DCA	CVTSDR		/ SAVE FOR LATER USE
	CDFMYF			/ RETURN DATA FIELD TO OUR FIELD

	TAD	CVTOPT		/ GET OPTION CONFIGURATION BITS
	AND	(MNRX2X)	/ MASK OFF THE WINCHESTER ON LINE BIT
	SZA CLA			/ CHECK TO SEE IF THE WINCHESTER IS ON LINE
	TAD  (DEVTXT-DRVTXT)	/ YES, SET UP TO DISPLAY "DRIVE/DEVICE"
	TAD	(DRVTXT)	/ NO, SET UP TO DISPLAY "DRIVE"
	DCA	CVTMS2		/ STORE FOR MESSAGE DICVTAYS

				/ NO, THIS IS A TWO DRIVE SYSTEM

CVTGDR,	CLA CLL CMA		/ SET AC TO MINUS ONE AND CLEAR THE LINK
	TAD	CVTFUN		/ COMBINE WITH FUNCTION CODE - SETS LINK
	SNA CLA			/ IS THIS A UTILITY DISK REQUEST ?
	CLL			/ YES, CLEAR THE LINK FOR INDICATOR
	TAD	CVTSDR		/ PICK UP THE USER DRIVE SELECTION FOR CONVERT
CVTGD1,	AND	(17)		/ MASK OFF THE DIRVE BITS
	DCA	CVTDRV		/ SAVE INDICATED DRIVE NUMBER
	TAD	CVTDRV		/ GET DRIVE NUMBER BACK AGAIN
	SZA CLA			/ WAS A DRIVE NUMBER SPECIFIED BY USER
	JMP	CVTDEN		/ YES, GO CHECK ITS DENSITY

CVTGD2,	CIFMNU			/ NO, PRINT "TYPE THE DRIVE/DEVICE NUMBER ..."
	JMS I	IOACAL		/ CALL STANDARD MESSAGE OUTPUT ROUTINE
	    0			/ USE DEFAULT OUTPUT CHANNEL
	    NUMTX1		/ POINTER TO MESSAGE CONTROL STRING
	    0			/ ADDRESS FOR CLEAR SCREEN COMMAND
	    1020		/ SCREEN POSITION FOR FIRST TEXT LINE
	    CVTMS2		/ POINTER TO "DRIVE" OR "DRIVE/DEVICE"
	    1220		/ SCREEN POSITION FOR SECOND TEXT LINE
	    CVTMS1		/ POINTER TO "UTILITY" OR "DICTIONARY"
	    CVTAND		/ POINTER TO "AND PRESS RETURN"

	JMS	REDCVT		/ GO HANDLE USER INPUT REQUEST
	JMP	CVTGD2		/ USER ERROR - GO HANDLE IT
	JMP	CVTGMR		/ USER TYPED "GOLD MENU", GO HANDLE IT
	    			/ USER TYPED "RETURN" - DO A DENSITY CHECK
CVTDEN,	TAD	CVTMAX		/ PICK UP THE MAXIMUM ALLOWABLE DRIVE NUMBER
	CMA			/ MAKE IT NEGATIVE
	TAD	CVTDRV		/ COMBINE WITH USER SELECTED DRIVE NUMBER
	SMA CLA			/ IS USER SELECTED DRIVE NUMBER WITHIN RANGE
	JMP	CVTGD2		/ NO, GO REQUEST A VALID DRIVE NUMBER

	TAD	CVTDRV		/ PICK UP THE DRIVE NUMBER
	CDFMNU			/ GET DENSITY OF CV DISKETTE.
	DCA I	(CMDBLK+RXQDRV)	/ SET TO USER SPECIFIED DRIVE NUMBER.
	CDFMYF			/ BACK TO OUR FIELD & CALL RDFIO IN MENU FIELD.
	JMS I	(RDFIO)		/ DO A GET DENSITY TO ESTABLISH DRIVE DENSITY.
		RXEDN+4000	/ "GET DENSITY" CODE.
	SPA CLA			/ SKIP IF NO ERROR.
	  JMP	DENERR		/ GET DENSITY ERROR DETECTED, REPORT TO USER

	ISZ	CVTGET		/ BUMP THE RETURN ADDRESS POINTER
CVTGMR,	JMP I	CVTGET		/ RETURN TO CALLER


VALTAB,	7061;6466;6555		/ 'WPSUTL' UTILITY DISKETTE NAME

/####

RDFIO,	XX
	CDFMNU
	DCA I	(CMDBLK+RXQBLK) 	/ STORE BLOCK NUMBER			
	CDFMYF
	TAD I	RDFIO 		/ ++++
	CDFMNU
	DCA I	(CMDBLK+RXQFNC) 	/ AND FUNCTION CODE			
	CDFMYF
	ISZ	RDFIO
	CIFMNU			/ call this one in the MENU field
	JMS I	(CMDQUX)	/ USE SYSTEM QURX ROUTINE FOR CALL	

	JMP I	RDFIO 		/ ELSE RETURN STATUS



/ The code immediately below is called by the startup code. This code decides
/ whether or not the CV disk needs to be loaded. This code runs in field 2.
/
CHKCV,	XX			/ Entry point.
	TAD I	(OLL400)	/ Now check FIELD 6.			
	TAD	(-OLL301)	/  ...					
	SZA 			/ Skip if no.				
	 DCA	LOADCV		/ Set flag if yes. CV needs to be loaded.
NOLOAD,	TAD	LOADCV		/ Do we need to (re)load the conv disk	
	SZA CLA			/ Skip if not				
	ISZ	CHKCV		/ Take bump return to (re)load the spell disk.
	JMP I	CHKCV		/  ...

LOADCV,	0			/ Set if (re)load of spell disk is needed


/ TEXT SUBROUTINES TO PLACE COMMON TEXT STRINGS ON THE SCREEN

CVTTX4,	XX			/ PRINT "OR TYPE THE DRIVE/DEVICE NUMBER ..."
	CIFMNU			/ CHANGE INDTRUCTION FIELD TO MENU FIELD
	JMS I	IOACAL		/ CALL STANDARD MESSAGE OUTPUT ROUTINE
	    0			/ USE DEFAULT OUTPUT CHANNEL
	    NUMTX2		/ POINTER TO MESSAGE CONTROL STRING
	    1620		/ SCREEN POSITION FOR FIRST TEXT LINE
	    CVTMS2		/ POINTER TO "DRIVE" OR "DRIVE/DEVICE"
	    2020		/ SCREEN POSITION FOR SECOND TEXT LINE
	    CVTMS1		/ POINTER TO "UTILITY"
	    CVTAND		/ POINTER TO "AND PRESS RETURN"
	JMP I	CVTTX4		/ RETURN TO CALLER

	X=.			/ FIRST FREE LOCATION ON PAGE
/---------------------
	PAGE


/ TEXT SUBROUTINES TO PLACE COMMON TEXT STRINGS ON THE SCREEN

CVTTX1,	XX			/ PRINT "REMOVE THE DISKETTE FROM DRIVE ..."
	CIFMNU			/ CHANGE INDTRUCTION FIELD TO MENU FIELD
	JMS I	IOACAL		/ CALL STANDARD MESSAGE OUTPUT ROUTINE
	    0			/ USE DEFAULT OUTPUT CHANNEL
	    REMTXT		/ POINTER TO MESSAGE CONTROL STRING
	    0			/ ADDRESS FOR CLEAR SCREEN COMMAND
	    1020		/ SCREEN POSITION FOR FIRST TEXT LINE
	    CVTDRV		/ POINTER TO DRIVE NUMBER
	    1220		/ SCREEN POSITION FOR SECOND TEXT LINE
	    CVTMS1		/ POINTER TO "UTILITY" 
	    CVTAND		/ POINTER TO "AND PRESS RETURN"
	JMP I	CVTTX1		/ RETURN TO CALLER

CVTTX2,	XX			/ PRINT "INSERT THE DISKETTE INTO DRIVE ..."
	CIFMNU			/ CHANGE INDTRUCTION FIELD TO MENU FIELD
	JMS I	IOACAL		/ CALL STANDARD MESSAGE OUTPUT ROUTINE
	    0			/ USE DEFAULT OUTPUT CHANNEL
	    INSTXT		/ POINTER TO MESSAGE CONTROL STRING
	    0			/ ADDRESS FOR CLEAR SCREEN COMMAND
	    1020		/ SCREEN POSITION FOR FIRST TEXT LINE
	    CVTMS1		/ POINTER TO "UTILITY" 
	    1220		/ SCREEN POSITION FOR SECOND TEXT LINE
	    CVTDRV		/ POINTER TO DRIVE NUMBER
	    CVTAND		/ POINTER TO "AND PRESS RETURN"
	JMP I	CVTTX2		/ RETURN TO CALLER



/ COME HERE TO HANDLE VALIDATION ERRORS

CVTVER,	AC7776			/ SET THE AC EQUAL TO A MINUS 2
	TAD	CVTMAX		/ COMBINE WITH THE MAXIMUM DRIVE NUMBER
	SMA CLA			/ IS THIS A MULTI DRIVE SYSTEM ?
	JMP	CVTTYP		/ YES, GO CHECK DRIVE TYPE

CVTVE1,	JMS	CVTTX1		/ PRINT "REMOVE THE DISKETTE FROM DRIVE ..."
	AC7777			/ SET UP FOR NO DRIVE NUMBER ALLOWED
	JMS	REDCVT		/ GO HANDLE USER INPUT REQUEST
	    JMP	CVTVE1		/ USER ERROR - GO HANDLE IT
	    JMP	CVTGMR		/ USER TYPED "GOLD MENU", GO HANDLE IT
	    JMP CVTDEN		/ USER TYPED "RETURN", GO HANDLE IT

CVTTYP,	JMS	CVTSEL		/ CHECK IF DRIVE IS WINCHESTER OR FLOPPY
	JMP	CVTVE3		/ WINCHESTER, DICVTAY "VOLUME DOES NOT ..."

CVTVE2,	JMS	CVTTX1		/ PRINT "REMOVE THE DISKETTE FROM DRIVE ..."
	JMS	CVTTX4		/ PRINT "OR TYPE THE DRIVE/DEVICE NUMBER ..."
	AC0001			/ SET UP FOR OPTIONAL DRIVE NUMBER
	JMS	REDCVT		/ GO HANDLE USER INPUT REQUEST
	    JMP	CVTVE2		/ USER ERROR - GO HANDLE IT
	    JMP	CVTGMR		/ USER TYPED "GOLD MENU", GO HANDLE IT
	    JMP CVTDEN		/ USER TYPED "RETURN", GO HANDLE IT

CVTVE3,	CIFMNU			/ YES, HANDLE VOLUME DOES NOT CONTAIN...
	JMS I	IOACAL		/ CALL STANDARD MESSAGE OUTPUT ROUTINE
	    0			/ USE DEFAULT OUTPUT CHANNEL
	    CVTVNC		/ POINTER TO MESSAGE CONTROL STRING
	    0			/ ADDRESS FOR CLEAR SCREEN COMMAND
	    1020		/ SCREEN POSITION FOR FIRST TEXT LINE
	    CVTDRV		/ POINTER TO DRIVE NUMBER
	    CVTMS1		/ POINTER TO "UTILITY" 
	JMS	CVTTX3		/ PRINT "TYPE THE DRIVE/DEVICE NUMBER ..."
	JMS	REDCVT		/ GO HANDLE USER INPUT REQUEST
	    JMP	CVTVE3		/ USER ERROR - GO HANDLE IT
	    JMP	CVTGMR		/ USER TYPED "GOLD MENU", GO HANDLE IT
	    JMP CVTDEN		/ USER TYPED "RETURN", GO HANDLE IT

/ COME HERE TO HANDLE DENSITY ERRORS

DENERR,	AC7776			/ SET THE AC EQUAL TO A MINUS 2
	TAD	CVTMAX		/ COMBINE WITH THE MAXIMUM DRIVE NUMBER
	SMA CLA			/ IS THIS A MULTI DRIVE SYSTEM ?
	JMP	DENTYP		/ YES, GO CHECK DRIVE TYPE

CVTDE1,	JMS	CVTTX2		/ PRINT "INSERT THE DISKETTE INTO DRIVE ..."
	AC7777			/ SET UP FOR NO DRIVE NUMBER ALLOWED
	JMS	REDCVT		/ GO HANDLE USER INPUT REQUEST
	    JMP	CVTDE1		/ USER ERROR - GO HANDLE IT
	    JMP	CVTGMR		/ USER TYPED "GOLD MENU", GO HANDLE IT
	    JMP CVTDEN		/ USER TYPED "RETURN", GO HANDLE IT

DENTYP,	JMS	CVTSEL		/ CHECK IF DRIVE IS WINCHESTER OR FLOPPY
	JMP	CVTDE3		/ WINCHESTER, DICVTAY "VOLUME NOT ASSIGNED"

CVTDE2,	JMS	CVTTX2		/ PRINT "INSERT THE DISKETTE INTO DRIVE ..."
	JMS	CVTTX4		/ PRINT "OR TYPE THE DRIVE/DEVICE NUMBER ..."
	AC0001			/ SET UP FOR OPTIONAL DRIVE NUMBER
	JMS	REDCVT		/ GO HANDLE USER INPUT REQUEST
	    JMP	CVTDE2		/ USER ERROR - GO HANDLE IT
	    JMP	CVTGMR		/ USER TYPED "GOLD MENU", GO HANDLE IT
	    JMP CVTDEN		/ USER TYPED "RETURN", GO HANDLE IT

CVTDE3,	CIFMNU			/ YES, HANDLE VOLUME NOT ASSIGNED
	JMS I	IOACAL		/ CALL STANDARD MESSAGE OUTPUT ROUTINE
	    0			/ USE DEFAULT OUTPUT CHANNEL
	    CVTNAS		/ POINTER TO MESSAGE CONTROL STRING
	    0			/ ADDRESS FOR CLEAR SCREEN COMMAND
	    1020		/ SCREEN POSITION FOR FIRST TEXT LINE
	    CVTDRV		/ POINTER TO DRIVE NUMBER
	JMS	CVTTX3		/ PRINT "TYPE THE DRIVE/DEVICE NUMBER ..."
	JMS	REDCVT		/ GO HANDLE USER INPUT REQUEST
	    JMP	CVTDE3		/ USER ERROR - GO HANDLE IT
	    JMP	CVTGMR		/ USER TYPED "GOLD MENU", GO HANDLE IT
	    JMP CVTDEN		/ USER TYPED "RETURN", GO HANDLE IT


/FILLIO -- fills queue block with I/O parameters & then does I/O.
/
/CALL:	JMS	FILLIO
/		FUNCTION code						
/		CDF to buffer field.
/		ADDRESS to read/write to/from.
/		-# of disk blocks to read/write.
/		START block #.
/	Rtn1:	Return here if I/O error.
/	Rtn2:	Normal completion return.
/
FILLIO,	XX			/ Entry point.
	TAD I	FILLIO		/ Get FUNCTION code.			
	DCA	FILLFN		/ Store in line.			
	ISZ	FILLIO		/ Bump to CDF.				
	TAD I	FILLIO		/ Get CDF to buffer.
	CDFMNU
	DCA I	(CMDBLK+RXQBFD)	/ Set into queue block.			
	CDFMYF
	ISZ	FILLIO		/ Bump to read/write address.
	TAD I	FILLIO		/ Get read/write address.
	CDFMNU
	DCA I	(CMDBLK+RXQBAD)	/ Set into queue block.			
	CDFMYF
	ISZ	FILLIO		/ Bump to size (in blocks).

	TAD I	FILLIO		/ Get minus number of blocks to read/write.
	CDFMNU
	DCA I	(CMDBLK+RXQRS1)	/ Set into queue block.			
	CDFMYF
	ISZ	FILLIO		/ Bump to startint block #.
	TAD I	FILLIO		/ Get starting block #.
	ISZ	FILLIO		/ Bump to return address.
	JMS	RDFIO		/ Go do the read/write.
FILLFN,	0			/ ...					
	SMA CLA			/ Skip if error returned.
	 ISZ	FILLIO		/ For normal return, bump address.
	JMP I	FILLIO		/ Return to caller.
	X=.			/ FIRST FREE LOCATION ON PAGE
/---------------------
	PAGE


/ REDCVT IS THE ROUTINE THAT HANDLES THE USER RESPONSE.  IT DISPLAYS
/ THE COMMON TEXT MESSAGE AND SELECTIVLY ACCEPTS ONLY THE KEYS FOR
/ "RETURN" AND "GOLD-MENU" OR IT ALSO ACCEPTS A DIRVE NUMBER OF ONE DIGIT
/ AND ALLOWS THE USER TO RUB-OUT A MISTAKE.
/
/ UPON ENTRY:
/
/ A NEGATIVE VALUE IN THE AC MEANS THAT NO DRIVE NUMBER IS ALLOWED AND THAT
/ ONLY THE "RETURN" KEY AND THE "GOLD-MENU" KEYS ARE VALID.
/
/ A POSITIVE VALUE IN THE AC MEANS THAT THE DRIVE NUMBER IS OPTIONAL AND
/ THAT THE "RETURN" KEY AND THE "GOLD-MENU" KEYS ARE VALID.
/
/ A ZERO VALUE IN THE AC MEANS THAT THE DRIVE NUMBER IS REQUIRED AND THAT
/ A NUL-RESPONSE WILL GENERATE AN ERROR.  THE DRIVE NUMBER CAN ONLY BE ONE
/ DECIMAL CHARACTER AND IS TERMINATED BY PRESSING THE "RETURN" KEY.
/ THE RUBOUT KEY CAN BE USED TO CORRECT AN ERROR IN THE FIRST DIGIT.
/ TWO DIGITS OR ANY NON DIGIT KEY TERMINATES WITH AN ERROR.
/
/ UPON EXIT:
/
/ CONTROL IS TRANSFERED TO THE FIRST LOCATION FOLLOWING THE CALL WHEN A USER
/ INPUT ERROR IS DETECTED AND CAUSES THE TERMINAL BELL TO RING.  AC IS CLEAR.
/
/ CONTROL IS TRANSFERED TO THE SECOND LOCATION FOLLOWING THE CALL IF THE USER
/ PRESSES THE "GOLD-MENU" KEYS.  AC IS CLEAR.
/
/ CONTROL IS TRANSFERED TO THE THIRD LOCATION FOLLOWING THE CALL WHEN THE USER
/ SUCCESSFULLY PRESSES THE RETURN KEY OR ENTERS A ONE DIGIT DRIVE NUMBER AND
/ THEN PRESSES THE RETURN KEY.  THE LOCATION CVTDRV IS UPDATED WITH THE
/ VALUE FROM REDDRV IF THE USER ACTUALLY TYPED A DRIVE NUMBER.  AC IS CLEAR.

REDCVT,	XX			/ HANDLE THE USER RESPONSE
	DCA	REDFLG		/ SAVE DRIVE NUMBER REQUEST VALUE

	CIFMNU			/ CHANGE INDTRUCTION FIELD TO MENU FIELD
	JMS I	IOACAL		/ CALL STANDARD MESSAGE OUTPUT ROUTINE
	    0			/ USE DEFAULT OUTPUT CHANNEL
	    REDTXT		/ POINTER TO MESSAGE CONTROL STRING
	    2520		/ ADDRESS FOR LINE OF COMMON TEXT
	    GMTXT		/ "OR PRESS GOLD MENU ..."
	    2700		/ POSSITION CURSOR TO BOTTOM SCREEN LINE
	DCA	REDDRV		/ CLEAR THE SAVED DRIVE NUMBER

REDNXT,	DCA	REDNUM		/ STORE NEW CHARACTER COUNT
	CIFMNU			/ CHANGE INDTRUCTION FIELD TO MENU FIELD
	JMS I	(INAIN)		/ GO GET A CHARACTER AND DICVTAY TIME
	DCA	REDCHR		/ SAVE CHARACTER THAT USER TYPED

	TAD	REDFLG		/ GET THE DRIVE NUMBER REQUESTED FLAG
	SPA CLA			/ CAN USER ENTER A DRIVE NUMBER ?
	JMP	RETTST		/ NO, ONLY RETURN AND GOLD MENU ALLOWED

	AC7777			/ SET THE AC EQUAL TO A MINUS ONE
	TAD	REDNUM		/ COMBINE WITH THE CHARACTER COUNT
	SNA CLA			/ HAS THE USER ENTERED ONE CHARACTER ?
	JMP	RUBTST		/ YES, THEN NO MORE DIGITS ARE ALLOWED

	TAD	REDCHR		/ GET CHARACTER THAT USER ENTERED
	SPA			/ IS IT A SPECIAL CHARACTER ?
	JMP	RUBTST		/ YES, GO CHECK FOR A VALID ONE
	TAD	(-60)		/ NO, CHECK FOR AN ASCII "0" CHARACTER
	SPA CLA			/ IS CHARACTER AT LEAST A "0" ?
	JMP	REDERR		/ NO, IT'S LESS THAN "0", GO REPORT ERROR

	TAD	REDCHR		/ GET CHARACTER THAT USER ENTERED
	TAD	(-72)		/ CHECK FOR AN ASCII "9" CHARACTER
	SMA CLA			/ IS CHARACTER GREATER THAN A "9"
	JMP	REDERR		/ YES, GO REPORT THE ERROR

	TAD	REDCHR		/ PICK UP CHARACTER USER TYPED
	AND	(17)		/ MASK OFF DRIVE BITS
	DCA	REDDRV		/ SAVE DRIVE NUMBER

	TAD	REDCHR		/ PICK UP CHARACTER THAT USER TYPED
	JMS	REDOUT		/ ECHO CHARACTER ON SCREEN
	AC0001			/ SET UP FOR AN INCREMENT
	JMP	REDSET		/ GO UPDATE THE CHARACTER COUNT

RUBTST,	TAD	REDCHR		/ PICK UP CHARACTER THAT USER TYPED
	TAD	(-EDRBCH)	/ CHECK FOR THE "RUB-OUT" KEY
	SZA CLA			/ IS IT A MATCH ?
	JMP	RETTST		/ NO, GO CHECK FOR THE OTHER CHARACTERS
	TAD	REDNUM		/ YES, PICK UP THE CHARACTER COUNT
	SNA CLA			/ IS THERE ANYTHING TO RUB-OUT
	JMP	REDNXT		/ NO, JUST IGNORE THE KEY

	TAD	(10)		/ PICK UP THE BACK SPACE CHARACTER CODE
	JMS	REDOUT		/ OUTPUT IT TO THE SCREEN
	TAD	(40)		/ PICK UP THE SPACE CHARACTER CODE
	JMS	REDOUT		/ OUTPUT IT TO THE SCREEN
	TAD	(10)		/ PICK UP THE BACK SPACE CHARACTER CODE
	JMS	REDOUT		/ OUTPUT IT TO THE SCREEN

	DCA	REDDRV		/ CLEAR DRIVE NUMBER
	AC7777			/ SET UP FOR A DECREMENT
REDSET,	TAD	REDNUM		/ COMBINE WITH CHARACTER COUNT
	JMP	REDNXT		/ GO STORE NEW CHARACTER COUNT

RETTST,	TAD	REDCHR		/ PICK UP CHARACTER THAT USER TYPED
	TAD	(-EDMENU)	/ COMBINE WITH GOLD MENU CODE
	SNA CLA			/ DID USER TYPE "GOLD-MENU" ?
	JMP	GMXIT		/ YES, GO TAKE GOLD MENU EXIT

	TAD	REDCHR		/ PICK UP CHARACTER THAT USER TYPED
	TAD	(-EDNWLN)	/ COMBINE WITH RETURN KEY CODE
	SZA CLA			/ DID USER TYPE "RETURN" ?
	JMP	REDERR		/ NO, GO REPORT ERROR

	TAD	REDFLG		/ GET DRIVE NUMBER REQUEST FLAG
	SZA CLA			/ MUST THE USER ENTER A DRIVE NUMBER ?
	JMP	RETXIT		/ NO, TAKE NORMAL RETURN WITH CLEAR AC

	TAD	REDNUM		/ PICK UP THE CHARACTER COUNT
	SNA CLA			/ DID THE USER TYPE ANYTHING ?
	JMP	REDERR		/ NO, GO REPORT THE ERROR

RETXIT,	TAD	REDNUM		/ PICK UP THE CHARACTER COUNT
	SNA CLA			/ DID THE USER ENTER A DRIVE NUMBER
	JMP	REDXIT		/ NO, THEN DO NOT UPDATE THE DRIVE NUMBER
	TAD	REDDRV		/ PICK UP THE USER SPECIFIED DRIVE NUMBER
	DCA	CVTDRV		/ SET UP THE NEW DRIVE NUMBER

REDXIT,	ISZ	REDCVT		/ BUMP RETURN ADDRESS TO NORMAL RETURN
GMXIT,	ISZ	REDCVT		/ BUMP RETURN ADDRESS TO GOLD MENU RETURN
	JMP I	REDCVT		/ RETURN TO CALLER

REDERR,	CIFMNU			/ CHANGE INDTRUCTION FIELD TO MENU FIELD
	JMS I	IOACAL		/ CALL STANDARD MESSAGE OUTPUT ROUTINE
	    0			/ USE DEFAULT OUTPUT CHANNEL
	    ERRTXT		/ POINTER TO CONTROL STRING TO RING BELL
	JMP I	REDCVT		/ TAKE ERROR RETURN TO CALLER

REDOUT,	XX			/ ROUTINE TO OUTPUT A CHARACTER
	JMP	REDOT2		/ SKIP OVER JWAIT INSTRUCTION

REDOT1,	CIFSYS			/ CHANGE INSTRUCTION FIELD TO SYSTEM FIELD
	JWAIT			/ WAIT FOR NEXT SIGNIFICENT EVENT

REDOT2,	CIFSYS			/ CHANGE INSTRUCTION FIELD TO SYSTEM FIELD
	TTYOU			/ TRY TO OUTPUT THE CHARACTER TO THE SCREEN
	JMP	REDOT1		/ BUSY, GO TO SYSTEM WAIT ROUTINE
	JMP I	REDOUT		/ DONE, RETURN TO CALLER

/ CVTSEL IS A ROUTINE THAT WILL DETERMINE IF THE SPECIFIED DRIVE NUMBER
/ BELONGS TO A WINCHESTER DEVICE OR A FLOPPY DISK DRIVE.
/ RETURN IS TO CALL+1 FOR WINCHESTER AND CALL+2 FOR FLOPPY.

CVTSEL,	XX			/ CHECK DRIVE SELECTION FOR DEVICE TYPE
	TAD	CVTOPT		/ GET OPTION CONFIGURATION BITS
	AND	(MNRX2X)	/ MASK OFF WINCHESTER ON LINE BIT
	SNA CLA			/ CHECK FOR WINCHESTER ON LINE
	JMP	CVTFLP		/ NO, DRIVE MUST BELONG TO A FLOPPY
	TAD	CVTDRV		/ PICK UP THE DRIVE NUMBER
	TAD	(-10)		/ SUBTRACT FOR DRIVES 0 TO 7
	SMA CLA			/ CHECK FOR DRIVES 8 AND 9
	JMP	CVTFLP		/ YES, THEN DRIVES ARE FLOPPY
	TAD	CVTOPT		/ GET OPTION CONFIGURATION BITS
	AND	(MNRX4X)	/ MASK OFF DRIVE 0 ASSIGNED TO WINNI BIT
	SZA CLA			/ CHECK FOR SYSTEM RUNNING ON WINCHESTER
	JMP	CVTWIN		/ YES, DRIVE MUST BELONG TO WINCHESTER
	TAD	CVTDRV		/ PICK UP THE DRIVE NUMBER
	SNA			/ CHECK FOR DRIVE ZERO
	JMP	CVTFLP		/ YES, THEN IT'S A FLOPPY
	TAD	(-1)		/ DECREMENT THE DRIVE COUNT
	SZA CLA			/ CHECK FOR DRIVE ONE
	JMP	CVTWIN		/ NO, DRIVE MUST BELONG TO WINCHESTER
	TAD	CVTOPT		/ GET OPTION CONFIGURATION BITS
	AND	(MNRX3X)	/ MASK OFF DRIVE ONE ASSIGNED TO WINNI BIT
	SNA CLA			/ CHECK FOR DRIVE ONE ASSIGNED TO WINCHESTER
CVTFLP,	ISZ	CVTSEL		/ NO, DRIVE BELONGS TO FLOPPY DRIVE
CVTWIN,	JMP I	CVTSEL		/ YES, DRIVE BELONGS TO WINCHESTER


	X=.			/ FIRST FREE LOCATION ON PAGE
/---------------------
	PAGE

/ TEXT MESSAGES DISPLAYED WHEN REQUESTING THE WPS UTILITY SOFTWARE
/
/-----------------------------------------------------------------------------
/ TWO DRIVE SYSTEM	|  REMOVE THE DISKETTE FROM DRIVE 0 AND INSERT THE
/ VALIDATION ERROR  VE1	|  WPS UTILITY SOFTWARE DISKETTE AND PRESS RETURN
/ DRIVE NUMBER ERROR	|
/ RETURN OR GOLD MENU	|  OR PRESS GOLD MENU TO RECALL THE MAIN MENU.
/-----------------------------------------------------------------------------
/ TWO DRIVE SYSTEM	|  INSERT THE WPS UTILITY SOFTWARE DISKETTE
/ GET DENSITY ERROR DE1	|  INTO DRIVE 1 AND PRESS RETURN
/ DRIVE NUMBER ERROR	|
/ RETURN OR GOLD MENU	|  OR PRESS GOLD MENU TO RECALL THE MAIN MENU.
/-----------------------------------------------------------------------------
/ MULTI DRIVE SYSTEM	|  TYPE THE DRIVE NUMBER THAT CONTAINS THE
/ NO DEFAULT SET    GDR	|  WPS UTILITY SOFTWARE AND PRESS RETURN
/ DRIVE NUMBER REQURIED	|
/ GOLD MENU		|  OR PRESS GOLD MENU TO RECALL THE MAIN MENU.
/-----------------------------------------------------------------------------
/ MULTI DRIVE SYSTEM	|  REMOVE THE DISKETTE FROM DRIVE 0 AND INSERT THE
/ VALIDATION ERROR  VE2	|  WPS UTILITY SOFTWARE DISKETTE AND PRESS RETURN
/ 			|
/ 			|  OR TYPE THE DRIVE NUMBER THAT CONTAINS THE
/ 			|  WPS UTILITY SOFTWARE AND PRESS RETURN
/ DRIVE NUMBER OPTIONAL	|
/ RETURN OR GOLD MENU	|  OR PRESS GOLD MENU TO RECALL THE MAIN MENU.
/-----------------------------------------------------------------------------
/ MULTI DRIVE SYSTEM	|  INSERT THE WPS UTILITY SOFTWARE DISKETTE
/ GET DENSITY ERROR DE2	|  INTO DRIVE 1 AND PRESS RETURN
/ 			|
/ 			|  OR TYPE THE DRIVE NUMBER THAT CONTAINS THE
/ 			|  WPS UTILITY SOFTWARE AND PRESS RETURN
/ DRIVE NUMBER OPTIONAL	|
/ RETURN OR GOLD MENU	|  OR PRESS GOLD MENU TO RECALL THE MAIN MENU.
/-----------------------------------------------------------------------------
/ WINCHESTER SYSTEM	|  TYPE THE DRIVE/DEVICE NUMBER THAT CONTAINS THE
/ NO DEFAULT SET    GDR	|  WPS UTILITY SOFTWARE AND PRESS RETURN
/ DRIVE NUMBER REQURIED	|
/ GOLD MENU		|  OR PRESS GOLD MENU TO RECALL THE MAIN MENU.
/-----------------------------------------------------------------------------
/ WINCHESTER SYSTEM	|  VOLUME 5 DOES NOT CONTAIN THE WPS UTILITY SOFTWARE
/ VALIDATION ERROR  VE3	|
/ 			|  TYPE THE DRIVE/DEVICE NUMBER THAT CONTAINS THE
/ 			|  WPS UTILITY SOFTWARE AND PRESS RETURN
/ DRIVE NUMBER REQURIED	|
/ GOLD MENU		|  OR PRESS GOLD MENU TO RECALL THE MAIN MENU.
/-----------------------------------------------------------------------------
/ WINCHESTER SYSTEM	|  VOLUME 5 IS NOT ASSIGNED.
/ GET DENSITY ERROR DE3	|
/ 			|  TYPE THE DRIVE/DEVICE NUMBER THAT CONTAINS THE
/ 			|  WPS UTILITY SOFTWARE AND PRESS RETURN
/ DRIVE NUMBER REQURIED	|
/ GOLD MENU		|  OR PRESS GOLD MENU TO RECALL THE MAIN MENU.
/-----------------------------------------------------------------------------

/***************************************************************************
/****				N O T E					****
/****	IF YOU CHANGE ANY OF THE TEXT STRINGS BELOW, MAKE SURE YOU	****
/****	CHANGE THE MESSAGE LISTINGS ON THE THREE PREVIOUS PAGES		****
/***************************************************************************

DSKBLK=	.-200%400+DLCONV	/ DISK BLOCK WHERE PAGE IS LOADED

CVTUTL,
	IFDEF ENGLSH <TEXT '!&WPS &UTILITY &SOFTWARE' >
	IFDEF ITALIAN<TEXT /PROGRAMMI DI UTILIT\@ !&WPS/ >

DRVTXT,
	IFDEF ENGLSH <TEXT ' DRIVE '>
	IFDEF ITALIAN<TEXT 'UNIT\@ ' >

DEVTXT,
	IFDEF ENGLSH <TEXT ' DRIVE/DEVICE '>
	IFDEF ITALIAN<TEXT /UNIT\@ / >

REMTXT,
	IFDEF ENGLSH <
	TEXT '^P!E^P&REMOVE THE DISKETTE FROM DRIVE !D AND INSERT THE '
	*.-1
	TEXT '^P!S DISKETTE^S'
	>
	IFDEF ITALIAN <
	TEXT /^P!E^P&TOGLIERE IL DICHETTO DALL'UNIT\@ !D ED INSERIRE IL /
	*.-1
	TEXT /^PDISCHETTO DEI !S/
	>

CVTAND,
	IFDEF ENGLSH <TEXT ' AND PRESS !&RETURN'>
	IFDEF ITALIAN<TEXT / E PREMERE !&RITORNO/ >

INSTXT,
	IFDEF ENGLSH <TEXT '^P!E^P&INSERT THE !S DISKETTE^PINTO DRIVE !D^S'>
	IFDEF ITALIAN<
	TEXT /^P!E^P&INSERIRE IL DISCHETTO DEI !S NELL'UNIT\@ !D^S/ >

NUMTX1,
	IFDEF ENGLSH <TEXT '^P!E^P&TYPE THE!SNUMBER THAT CONTAINS THE^P!S^S'>
	IFDEF ITALIAN<
	TEXT /^P!E^P&INTORDURRE IL NUMERO DELL'!SCHE CONTIENE I^P!S^S/>

NUMTX2,
	IFDEF ENGLSH <TEXT '^P&OR TYPE THE!SNUMBER THAT CONTAINS THE^P!S^S'>
	IFDEF ITALIAN<
	TEXT /^P&O INTRODURRE IL NUMERO DELL'!SCHE CONTIENE I^P!S^S/>

CVTVNC,
	IFDEF ENGLSH <TEXT '^P!E^P&VOLUME !D DOES NOT CONTAIN THE !S'>
	IFDEF ITALIAN<TEXT /^P!E^P&IL SUPPORTO !D NON CONTIENE I !S/>

CVTNAS,
	IFDEF ENGLSH <TEXT '^P!E^P&VOLUME !D IS NOT ASSIGNED.'>
	IFDEF ITALIAN<TEXT /^P!E^P&SUPPORTO !D NON DEFINITO./>

WRKTXT,
	IFDEF ENGLSH <TEXT '^P!E^P&LOADING ^S - &PLEASE &STAND &BY'>	
	IFDEF ITALIAN<TEXT /^P!E^P&ATTIVAZIONE DEI ^S. &ATTENDERE.../>

REDTXT,
	TEXT '^P^S^P'

GMTXT,
	IFDEF ENGLSH <
	TEXT '!&OR &PRESS &GOLD !&MENU TO RECALL THE &MAIN &MENU.'>
	IFDEF ITALIAN <
	TEXT /&O PREMERE &ORO !&MENU PER TORNARE AL &MENU &PRINCIPALE./>

ERRTXT,
	TEXT '^CG'	/ CONTROL STRING TO RING THE TERMINAL BELL


/ TEXT SUBROUTINES TO PLACE COMMON TEXT STRINGS ON THE SCREEN

CVTTX3,	XX			/ PRINT "TYPE THE DRIVE/DEVICE NUMBER ..."
	CIFMNU			/ CHANGE INDTRUCTION FIELD TO MENU FIELD
	JMS I	IOACAL		/ CALL STANDARD MESSAGE OUTPUT ROUTINE
	    0			/ USE DEFAULT OUTPUT CHANNEL
	    NUMTX1		/ POINTER TO MESSAGE CONTROL STRING
	    1600		/ ADDRESS FOR CLEAR SCREEN COMMAND
	    1620		/ SCREEN POSITION FOR FIRST TEXT LINE
	    CVTMS2		/ POINTER TO "DRIVE" OR "DRIVE/DEVICE"
	    2020		/ SCREEN POSITION FOR SECOND TEXT LINE
	    CVTMS1		/ POINTER TO "UTILITY"
 	   CVTAND		/ POINTER TO "AND PRESS RETURN"
	JMP I	CVTTX3		/ RETURN TO CALLER


