/	WPCU3 - COMMAND UTILITIES III
/

/	044	KMD	02-Oct-85	Allow MNCs in file name to be deleted.
/	043	EMcD	11-Sep-85	Fix bug dispalying MCS/Tech chars
/					if bolded when deleting
/	042	EMcD	11-Sep-85	Add Nordic translations 
/					(conditionalised)
/	041	Mart	01-aug-85	fix assembly bug in ITALIAN
/	040	WCE	29-SEP-84	DISPLAY TECH CHARACTER IN DELETE TEXT
/	039	DFB	27-SEP-84	Fix to prevent AD when TM=GRAPHICS
/	038	DFB	17-SEP-84	FIX TO CHECK GRAPHICS BOARD FOR DMIII
/	037	DFB	11-SEP-84	FIX TO PREVENT LOGON IN GRAPHICS MODE
/	036	DFB	07-SEP-84	FIX TM=125 REFERENCE
/	035	TCW	16-JUL-84	Expand # of terminal modes
/	034	DFB	11-JUN-84	CX GRAPHICS-clear/set call to flash buz
/					...TIMDSP+3 -- WP2CMF --
/					...when PRTFLD loaded/deleted
/	033	DFB	16-MAY-84	Fix load parameter DSPRM1
/	032	DFB	02-MAY-84	Add addtnl fld to  graphics mode(vt125)
/	031	DFB	20-APR-84     Reload printer page 0(20-76) on ret VT125
/	030	DFB	17-APR-84	Fixes to VT125 graphics mode
/	029	DFB	02-APR-84	Change graphics to load each time called
/	028	TCW	27-MAR-84	Add PHONE capability
/	027	WCE	26-MAR-84	CHANGED NAME FROM VT-125 TO WPSUTL
/	026	SBB	27-DEC-83	SOME GRFX CONSTANTS CHANGED etc.
/	025	SBB	12-DEC-83	PUT IN DATE CHECK FOR GRFX DISKETTE
/	024	SBB	26-SEP-83	DON'T PUT BUFFER IN 5 OR 6 FOR VT125
/					LOAD GRAPHICS FROM DISK AND/OR CPMEM
/	023	GDH	18-APR-83	Moved Buffer from field 5 to field 6.
/	022	GDH	17-APR-83	Moved Buffer defns from WPF1 to local.
/	021	GDH	13-APR-83	Implemented larger COMMUNICATIONS
/					buffer into field 5.
/ ----------------------------------------
/ | EDIT HISTORY BELOW IS FOR DECmate II |
/ ----------------------------------------
/	020	DFB	14-DEC-82	Ignore blk 0 as hdr(error)
/	019	SBB	25-aug-82	changed cursor position at "DEOPEN"
/					from top line to row 1
/
/	018	mjs	10-aug-82	Deleted "H2INIT" (communications init)
/					within subroutine "CU3COM". The HOST
/					will be init only at POWER-UP and
/					"CC" menu.
/
/ ---------------------------------------
/ | EDIT HISTORY BELOW IS FOR DECmate I |
/ ---------------------------------------
/	017	GDH	23-MAR-82	Implemented the "valid goto page" bit
/					 in header pointer.
/	016	GDH	15-NOV-81	Take into consideration Extn blocks.
/	015	GDH	12-NOV-81	Modified DELETE to delete RPG blocks.
/	014	GDH	16-OCT-81	Implemented 3rd TM option (DWORD)
/	013	GDH	14-OCT-81	added clear of menu lock word for
/					ax/dx upon their initialization.
/					De-implemented LOCK/UNLOCK.
/	012	GDH	 2-Oct-81	Moved COMM support to sys field.
/	011	GDH	29-Sep-81	Fixed bug in loading port 0
/					      characteristics (port 1 was
/					      always being selected).
/	010	GDH	22-Sep-81	Primary/Secondary port support.
/	009	GDH	26-Aug-81	WPFILS calling seq changes.
/					Removed SLAVE SCREEN/EXCHANGE KBDS
/						command utilities.
/	008	TT	07-JUL-81	Removed superfluous conditionals
/	007	JM	09-APR-81	Deleted patch into H2PAT since this
/					location is no longer used
/	006	DAO	18-SEP-80	MERGED WITH X3.5
/	005	DM,JM	15-SEPT-80	MERGED SCANDI AND EUROPE/ENGLISH
/	004	DSS	09-JUL-80	MOFIDIED FOR ENGLISH/FRENCH-CANADIAN
/	003	CMW	5-MAY-80	ENTERED CANADA TRANSLATIONS
/	002	DSS	17-APR-80	ENTERED DUTCH FIXES
/	001	GLT	24-Mar-80	Inserted French, German and Dutch translations
/					French diacritical substitutions:
/					"["-L.A.E, "]"-L.G.E; "&" unavailable
/					German diacritical substitutions:
/					"["-L.U.A, "\"-L.U.O, "]"-L.U.U; "&" usable
/	III.D	MB	1-APR-78	PUT IN SYSTEM OPTIONS
/	III.D	KEE	29-MAR-78	CHANGED FOR WT FILENUMBER REP. PLUS CLEANUP
/	2.N-1	RLT	9/14/77		CREATED FROM WPCU2

/	WRITES OUT WPCU3
/
	*200
	JMP I	.+3
	JMP I	.+1
	7600
	RXLOAD
	*RXLDLS
	RXEWT=4
	RXEWT
	0
	RXQBLK=11
	RXQBLK
	.
	DLOCU3 			/ ++++
	0 			/ ++++
	CDF 20 			/ ++++
	-DSOCU3
	0

/
	FIELD 2
/
	*100		/ THE FIRST 100 LOCATIONS ARE USED FOR THE SYSTEM
/
	CIFMYF=CIFBUF		/ DEFINE OUR FIELD.
	CDFMYF=CDFBUF		/  ...
	CDFTFL=CDFSYS							/A029

/ ROUTINE TO GET A CHARACTER FROM THE DOCUMENT FILE			/A040

CHRGET,	XX			/ GET A CHARACTER FROM DOCUMENT		/A040
	CIFFIO			/ CHANGE TO HANDLER FIELD		/A040
	FILEIO			/ MAKE A REQUEST OF THE FILE SYSTEM	/A040
	XRDFNC			/ READ A CHARACTER FROM THE DOCUMENT	/A040
	SPA			/ CHECK FOR ANY READ ERRORS		/A040
	JMP	DELERR		/ YES, GO HANDLE THE READ ERROR		/A040
	SNA			/ CHECK FOR END OF DOCUMENT		/A040
	JMP	DELEOF		/ YES, GO HANDLE END OF DOCUMENT	/A040
	JMP	MSKIT		/ Mask char				/A043
CHRGEX,	JMP I	CHRGET		/ RETURN TO CALLER WITH CHARACTER IN AC	/A040

/ ROUTINE TO GET AND CHECK A CHARACTER FROM THE DOCUMENT		/A040

DELCHK,	XX			/ GET AND CHECK A DOCUMENT CHARACTER	/A040
DELCK1,	JMS	CHRGET		/ GET CHARACTER FROM THE DOCUMENT	/A040
	JMS	DELFLT		/ CHECK FOR A PRINTABLE CHARACTER	/A040
	JMP	DELCK1		/ NOT PRINTABLE, IGNORE IT		/A040
	TAD	(-ECSTOV)	/ COMBINE WITH START DEAD KEY CODE	/A040
	SNA CLA			/ IS THIS A START OF DEAD KEY CODE ?	/A040
	JMP	DELCK2		/ YES, GO CHECK FOR A TEC CHARACTER	/A040
DELXIT,	TAD	T2		/ GET THE SAVED DOCUMENT CHARACTER	/A040
	ISZ	DELCHK		/ BUMP PAST TECH CHARACTER RETURN	/A040
DELTEC,	ISZ	DELCHK		/ BUMP PAST END OF FILE ERROR RETURN	/A040
DELEOF,	ISZ	DELCHK		/ BUMP PAST READ ERROR RETURN		/A040
DELERR,	JMP I	DELCHK		/ RETURN TO CALLER			/A040

DELCK2,	JMS	CHRGET		/ GET THE NEXT CHARACTER FROM DOCUMENT	/A040
	TAD	(-ECSPC)	/ COMBINE WITH SPACE CODE		/A040
	SZA CLA			/ IS THIS START OF A TEC CHARACTER ?	/A040
	JMP	DELXIT		/ NO, GO RETURN TO CALLER		/A040
	JMS	CHRGET		/ YES, GET NEXT CHARACTER FROM DOCUMENT	/A040
	TAD	(-ECSPC)	/ COMBINE WITH SPACE CODE		/A040
	SNA CLA			/ IS THIS START OF A REQUIRED SPACE ?	/A040
	JMP	DELXIT		/ YES, GO RETURN TO CALLER		/A040
	TAD	T2		/ NO, GET THE SAVED DOCUMENT CHARACTER	/A040
	TAD	(-62)		/ COMBIND WITH SECOND G-SET CODE	/A040
	SZA			/ IS THIS THE SECOND G-SET ?		/A040
	JMP	DELCK3		/ NO, MUST BE FIRST OR THIRD		/A040
	TAD	(7400)		/ YES, SET UP SECOND G-SET CODE		/A040
	JMP	DELSET		/ GO SET UP CHARACTER SET SELECTION	/A040
DELCK3,	SMA CLA			/ IS THIS THE THIRD G-SET CODE ?	/A040
	TAD	(7400)		/ YES, SET UP THIRD G-SET CODE		/A040
	TAD	(200)		/ NO, SET UP FIRST G-SET CODE		/A040
DELSET,	DCA	T1		/ STORE CHARACTER SET SELECTION CODE	/A040
	JMS	CHRGET		/ GET NEXT CHARACTER FROM DOCUMENT	/A040
	AND	P177		/ MASK OFF ANY HIGH ORDER BITS		/A040
	DCA	DELMS1		/ STORE CHARACTER TO BE DISPLAYED	/A040
	CDIMNU			/ CHANGE TO MENU FIELD			/A040
	TAD I	(MUBUF+MNLANG)	/ PICK UP THE LANGUAGE WORD		/A040
	DCA	T2		/ STORE FOR RESET TO PROPER LANGUAGE	/A040
	CDFMYF			/ SET TO THIS FIELD FOR IOACAL RETURN	/A040
	JMS I	IOACAL		/ CALL SYSTEM DISPLAY ROUTINE		/A040
	0			/ USE DEFAULT OUTPUT ROUTINE		/A040
	DELMSG			/ CONTROL STRING TO USE			/A040
	T1			/ CHARACTER SET SELECTION CODE		/A040
	DELMS1			/ CHARACTER TO BE DISPLAYED		/A040
	T2			/ RESET LANGUAGE SELECTION CODE		/A040
	JMP	DELTEC		/ GO RETURN AND COUNT THE CHARACTER	/A040

DELMS1,	.-.			/ ASCII CHARACTER TO BE DISPLAYED	/A040
	0			/ TERMINATOR FOR ASCII STRING		/A040



/--------------------
	PAGE


/d021;	CU3BF1=7400 		/ TEMP BUFFER THAT CAN BE USED BY ANY OF THE RROUTINES
/
	XX 			/ CUDELT - DELETE COMMAND
	JMS	CUDELT
	CDIMNU
	JMP I	.-3
/
	XX 			/ CUSS - SLAVE SCREEN
	HLT			/ SHOULD NEVER GET HERE.		/M009
	CDIMNU
	JMP I	.-3
/
	XX 			/ CUXK - EXCHANGE KEYBOARDS
	HLT			/ SHOULD NEVER GET HERE.		/M009
	CDIMNU
	JMP I	.-3
/
CU3COX,	XX
	JMS	CU3COM 		/ WILL CALL IN THE CORRECT COMMUNICATIONS OVERLAY AFTER
	CDIMNU
	JMP I	.-3 		/ SETTING THE CORRECT OPTIONS FOR THE LINE

/
/	THESE ARE CONSTANTS USED BY THE DELETE COMMAND
/
	DELIMB=-400 		/ THE SIZE OF THE BLOCK BUFFER
	DEBUFR=5200 		/ STARTING ADDRESS OF THE BLOCK
	DEBUF=3000 		/ ADDRESS OF THE RECORD BUFFER		/M0009
	DERCAY=5600 		/ THE RECORD NUMBERS TO BE DELETED
/
	TAB=11 			/ THE TAB VALUE
	LF=12 			/ VALUE FOR A LINE FEED
	CR=15 			/ CARRIGE RETURN
	BLANK=40 		/ ASPACE
/
	LNCNT=-12 		/ THE LINE COUNTER
	CRCNT=-120 		/ NEGATIVE CHARACTER COUNT FOR A LINE
	RECLIM=-2577 		/ NEGATIVE THE LIMIT OR CHARACTERS IN A RECORD
/
	DESTRP=1014 		/ THE START OF PRINTER CONTROL
	DENDP=1414 		/ END OF PRINTER CONTROL
	DESTRR=16 		/ START OF RULER
	DENDR=17 		/ END OF RULER
/

/
/	THIS IS THE DELETE COMMAND.
/
CUDELT,	XX
/
	CLA
	DCA	DELERT 		/ CLEAR THE ERROR FLAG
/
	CDFBUF 			/ CLEAR THE BEGINNING OF THE BUFFERS
	DCA I	(DEBUF) 	/ THE BUFFER FOR A RECORD WHEN CHECKING
				/ THE INDEX DOCUMENT
	DCA I	(DERCAY) 	/ THE BUFFER CONTAINING THE RECORDS TO
				/ DELETE FROM THE INDEX DOCUMENT
	CDFMYF
/
	DCA	DEPRNT 		/ CLEAR THE PRINTER CONTROL FLAG
	DCA	DERULE 		/ CLEAR THE RULER FLAG
	TAD	(CRCNT) 	/ INITALIZE THE CHARACTER COUNT FOR A LINE
	DCA	DELCTM
	TAD	(LNCNT) 	/ INITALIZE THE LINE COUNTER TO A NEGATIVE 10
	DCA	DELLTM
	DCA	DELMT
	DCA	DELERT 		/ CLEAR THE ERROR CODE
/
	CDFMNU 			/ GET THE FILE NUMBER TO BE DELETED
	TAD I	(MUBUF+MNFNO)
	CDFMYF
/
	DCA	DELFND 		/ SAVE THE NUMBER
	TAD	DELFND 		/ CREATE AN ABSOLUTE FILE NUMBER
	AND	P377
	DCA	DELFNO
/
	CDFMNU 			/ GET THE DRIVE THAT THE FILE IS ON
	TAD I	(MUBUF+MNDRV)
	CDFMYF
/
	DCA	DELDRV 		/ SAVE IT
	TAD	DELDRV
	BSW 			/ ++++
	RTL CLL 		/ POSITION DRIVE NUMBER AND INCLUDE A
	IAC 			/ DOCUMENT MUNBER OF 1
	DCA	DELIND 		/ BE USED FOR THE INDEX

/	THE FIRST 10 LINES OF THE DOCUMENT TO BE DELETED ARE DISPLAYED FOR
/	THE USER'S APPROVIAL
/
DEOPEN,	JMS	DEINDX		/ CHECK HDR BLOCK FOR 0	/A020
	CIFMNU
	JMS I	IOACAL 		/ "Beginning of document to be deleted"
	0 			/ default output routine
	DELNMS 			/ message text address
	0			/ cursor position for clear screen
	0100			/ PUT HEADING ON 2ND LINE		/A019
	IFDEF CANADA < 141 	/ L.G.A--Accented character >
	IFDEF FRENCH < 141 	/ L.G.A--Accented character >
	300 			/ cursor position for document text
/
	DCA	DEPRNT 		/ CLEAR THE FLAG FOR PRINT CONTROL
	DCA	DERULE 		/ CLEAR THE RULER FLAG
/
	TAD	DELFND 		/ GET THE FILE TO BE DELETED
	CIFFIO 			/
	FILEIO 			/
	XRDFIN 			/ INITALIZE THE READFIL ROUTINE
/
DELLP1,	JMS	DELCHK		/ GET AND CHECK A DOCUMENT CHARACTER	/A040
	JMP	DERRO2 		/ HANDLE READ ERROR ON FILE DETECTED
	JMP	DEXT 		/ HANDLE END OF DOCUMENT ENCOUNTERED
	JMP	DELLP3		/ TECH CHARACTER, GO COUNT IT		/A040
	AND	P177		/ MASK OF HIGH ORDER BITS
	TAD	(-LF) 		/ SEE IF A LINE FEED
	SNA 			/ ++++
	JMP	DELRES
	TAD	(LF-TAB) 	/ CHECK FOR TAD CHANGE TO SPACE
	SNA 			/ ++++
	JMP	DETAD2
	TAD	(TAB-40) 	/ GET RID OF UNWANTED CONTROL CHARACTERS
	SPA 			/ ++++
	JMP	DELLP1
	TAD	(40)
DELLP2,	JMS	DELDIS 		/ DISPLAY THE CHARACTER
DELLP3,	ISZ	DELCTM 		/ INCREMENT THE CHAR COUNT FOR A LINE
	JMP	DELLP1
DELRES,	TAD	(CRCNT) 	/ RESET THE CHARACTER COUNT FOR LINE OVERFLOW
	DCA	DELCTM
	TAD	(LF) 		/ INSERT A LF TO THE SCREEN
	JMS	DELDIS
	TAD	(CR) 		/ NOW A CR TO END THE LINE
	JMS	DELDIS
	ISZ	DELLTM 		/ THE LINE COUNTER (COUNTS THE 10)
	JMP	DELLP1
	JMP	DEXT 		/ DONE WITH THE DOCUMENT DISPLAY
DETAD2,	TAD	(BLANK) 	/ INSERT A BLANK
	JMP	DELLP2
DELRUT,/D013;	JMS	ULKSUB 		/ UNLOCK THE DOCUMENT AND INDEX
/D013;	DELIND
/D013;	JMS	ULKSUB
/D013;	DELFND
CUEXIT,	JMP I	CUDELT
DELFNO,	0
DELFND,	0
DELIND,	0
DELDRV,	0
DELCTM,	0
DELLTM,	0

MSKIT,	AND 	P177		/ Mask each char			/A043
	DCA	T2		/ SAVE THE CHARACTER			/A040
	TAD	T2		/ GET THE CHARACTER BACK AGAIN		/A040
	JMP	CHRGEX		/ Go back now				/A043
/--------------------
	PAGE

/D013;
/D013;/
/D013;/	ULKSUB - ROUTINE TO UNLOCK A FILE
/D013;/
/D013;/	CALL:	JMS	ULKSUB
/D013;/	FNOADD	ADDRESS OF THE FILE NUMBER WITH DRIVE NUMBER IN
/D013;/	BITS 0-3
/D013;/
/D013;ULKSUB,	XX
/D013;	CLA
/D013;	IFDEF WS102 <
/D013;	TAD I	ULKSUB
/D013;	DCA	ULKP1
/D013;/
/D013;	CIFPRT
/D013;	JMS I	(ULKFIL)
/D013;ULKP1,	0
/D013;	USERNO
/D013;/
/D013;	>
/D013;/
/D013;	ISZ	ULKSUB
/D013;	JMP I	ULKSUB

/
/	NOW CHECK THE INDEX FILE FOR THE NAMES GIVEN TO THE FILE FOR DELETION
/	TO ASK THE USER IF THEY ARE CORRECT
/
DEXT,	CLA
	DCA	DERULE 		/ CLEAR THE RULER FLAG
	DCA	DEPRNT 		/ AND THE PRINTER CONTROL
/
	TAD	DELIND 		/ OPEN THE INDEX FILE FOR READING
	CIFFIO 			/ ++++					/M0009
	FILEIO 			/ ++++					/M0009
	XRDFIN
	CLA
	DCA	DERCNT 		/ CLEAR THE RECORD COUNT OF THE INDEX
	TAD	(DERCAY) 	/ GET THE STARTING ADDRESS OF THE ARRAY
				/ CONTAINING THE RECORDS TO BE DELETED
	DCA	DETARY
DELKIN,	ISZ	DERCNT 		/ INCREMENT THE RECORD COUNTER
	JMS	DERDNM 		/ READ IN A RECORD
	DEADR3 			/ THIS IS THE SEQUENCE THAT DENOTES EOR
	JMP	DEDONE 		/ THERE IS NO MORE RECORDS
/
	CLA
	TAD	(DEBUF-1) 	/ START CHECKING FOR THE PARTS
	DCA	X2 		/ THAT ARE DEFINED IN A RECORD
/
	JMS	DECKTK 		/ CHECK FOR THE <N>
	DEADR1
	JMP	DERRO1 		/ NONE FOUND
/
	CLA
	TAD	X2 		/ SAVE THE LOCATION THAT IT WAS FOUND AT
	DCA	DETMP2 		/ TO COMPARE TO THE LOCATION OF THE <#>
/
	JMS	DECKTK 		/ SEE IF ANY MORE <N> EXIST IN THE RECORD
	DEADR1
	JMP	DEJMP1 		/ NONE FOUND OK
	JMP	DERRO1 		/ ANOTHER FOUND ITS AN ERROR
/

/
/	NOW THE CHECK FOR THE <#> TO FIND THE FILE NUMBER RELATED TO THE
/	RECORD BEING EXAMINED
/
DEJMP1,	CLA
	TAD	(DEBUF-1) 	/ SET THE STARTING ADDRESS OF THE SEARCH
	DCA	X2
/
	JMS	DECKTK 		/ LOOK FOR A <#>
	DEADR2
	JMP	DERRO1 		/ NONE FOUND-AN ERROR
/
	CLA
	TAD	X2 		/ SAVE THE LOCATION THAT THE <#> IS IN TO
	DCA	DETMP3 		/ CHECK THAT THE <#> IS AFTER THE <N>
/
	JMS	DECKTK 		/ CHECK FOR ANY MORE <#> IN THE RECORD
	DEADR2
	SKP
	JMP	DERRO1 		/ YES
/
	CLA 			/ CHECK FOR THE RIGHT ORDER
	TAD	DETMP2
	CIA
	TAD	DETMP3
	SPA CLA 		/ ++++
	JMP	DERRO1
/
	TAD	DETMP3 		/ SET THE SEACH LOCATION TO THE LOCATION
	DCA	X2 		/ AFTER THE <#> TO CHECK THE FILE NO.
/
	JMS	DEFNUM 		/ CONVERT THE NUMBER IN THE RECORD TO
	JMP	DERRO1 		/ BINARY TO COMPARE TO THE FILE NO.
				/ TO BE DELETED
	CIA
	TAD	DELFNO 		/ COMPARE THE NUMBERS
	SZA CLA 		/ ++++
	JMP	DELKIN
	TAD	DERCNT 		/ SAVE THE RECORD COUNT FOR DELETING
/
	CDFBUF
	DCA I	DETARY
	ISZ	DETARY
	DCA I	DETARY
	CDFMYF
/
	TAD	DETMP2 		/ GET THE LOCATION OF THE <N>
	DCA	X2 		/ SAVE IT AS THE POINTER
/
	TAD	DELMT 		/ SEE IF THE MESSAGE IS ALREADY UP
	SZA CLA 		/ ++++
	JMP	DEJMP2 		/ IF SO DONT DO IT AGAIN
	ISZ	DELMT
/
	TAD	DELFND
	AND	P377
	DCA	DEJNO
	CIFMNU
	JMS I	IOACAL 		/ Print "Entries in document for #.# --"
	0 			/ default output routine
	DEDCNM 			/ string address
	1600 			/ cursor position
	DELDRV 			/ drive number
DEJNO,	0 			/ document number
	2000 			/ cursor position
/
	CLA
DEJMP2,	JMS	DECKDS 		/ DISPLAY THE NAME ON THE SCREEN
	JMP	DERRO1
/
	JMP	DELKIN
DETARY,	0
DETMP2,	0
DETMP3,	0
DELMT,	0

DEXTNL,	ZBLOCK	22		/ 1 FOR HEADER				/A016
				/ 16. FOR EXTENSIONS.			/A016
				/  1  FOR STOPPER (ALWAYS 0).		/A016
/************
/************ THE NEXT 3 LOCATIONS MUST REMAIN IN ORDER FOR THE DELT ROUTINE.
/************
DEHDBK,	0
DERHBK,	0			/ RAPID PAGINATION HEADER BLOCK #1.	/A015
	0			/ HEADER STOPPER.			/A016

/--------------------
	PAGE

/
/	DELETE THE RECORDS IN THE INDEX DOCUMENT IF ANY
/	THAT ARE FOR THE DOCUMENT TO BE DELETED
/
DECONT,	CLA
	DCA	DELERT 		/ CLEAR THE ERROR FLAG
	TAD	(DERCAY) 	/ GET THE START ADDRESS OF THE LIST OF RECORDS
	DCA	DEBFT 		/ TO BE DELETED
/
	CDFBUF
	TAD I	DEBFT
	CDFMYF
/
	SNA CLA 		/ ++++
	JMP	DEDON1 		/ IF ZERO SKIP THE PROCESS
/
	TAD	DELIND 		/ OPEN THE INDEX FILE TO BE MODIFIED
	MQL
	CIFFIO 			/ ++++					/M0009
	FILEIO 			/ ++++					/M0009
	XDSKIN 			/ OPEN THE INDEX
	CLA
	DCA	DERCNT 		/ CLEAR THE RECORD COUNT
DEWTIL,	ISZ	DERCNT
/
	CDFBUF
	TAD I	DEBFT 		/ GET FIRST RECRD TO BE DELETED
	CDFMYF
/
	SNA 			/ ++++
	JMP	DEDON3 		/ IF ZERO DONE
	CIA 			/ ++++
	TAD	DERCNT 		/ SEE IF THE RECORD IS TO BE DELETED
	SZA CLA 		/ ++++
	JMP	DEWTL2
/
	JMS	DELCUR 		/ DELETE RECORD
	DEADR3
	JMP	DERRO1
/
	ISZ	DEBFT
	JMP	DEWTIL
DEWTL2,	JMS	DECOPY 		/ COPY THE RECORD DONT DELETE
	DEADR3
	JMP	DEDON2
/
	JMP	DEWTIL
DEDON3,	JMS	DECOPY 		/ DONE NOW SCROLL THROUGH THE REMAINING OF THE
	DEADR3 			/ INDEX
	JMP	DEDON2
/
	JMP	DEDON3
DEDON2,	CIFFIO 			/ ++++					/M0009
	FILEIO 			/ ++++					/M0009
	XDSKCL 			/ CLOSE INDEX
	JMP	DEDON1		/ CONTINUE ON THE NEXT PAGE.


DEBFT,	0
DERCNT,	0
/
/   ROUTINE TO CHECK HDR BLOCK=0(ILLEGAL)
/   MAYBE CHANGED DOC DISKETTE AFTER INDEX, OR COPY
/   AND USED DEFAULT CONDITION TO DELETE NON-EXISTENT DOC.
/
DEINDX,	0						/A020
	TAD	(4000+RXEDN)		/GET DENSITY(OPEN)	/A020
	JMS	DESETQ		/SET Q BLOCK AND DO IT	/A020
	SPA CLA			/ERROR RET?		/A020
	JMP	DELRUT		/YES			/A020
	TAD	(RXEGF)		/SET THE FNC FOR GET FIRST /A020
	DCA	QUQBLK+RXQFNC	/SET IT			/A020
	JMS	QURX		/DO IT			/A020
	CLA
	TAD	QUQBLK+RXQBLK	/GET BLOCK NO		/A020
	SZA CLA			/IS BOOT BLK(ERR)	/A020
	JMP I	DEINDX		/NO PROCESS		/A020
	JMP	DELRUT		/YES IS ERROR		/A020
/
/SET IO PARAMETERS-----
/   SUBROUTINE TO SAVE SPACE				/A020
/	MOVED VER 020---
/	ENTERS WITH FUNCTION CODE IN AC			/A020
DESETQ,	0						/A020
	DCA	QUQBLK+RXQFNC
	TAD	DELFNO 		/ SET THE DOCUMENT HEADER BLOCK TO READ
	DCA	QUQBLK+RXQFNO
	TAD	(DEBUFR) 	/ SET THE BUFFER ADDRESS
	DCA	QUQBLK+RXQBAD
	TAD	(CDFBUF)	/ MAKE CDF BUFFER.
	DCA	QUQBLK+RXQBFD
	DCA	QUQBLK+RXQBLK 	/ CLEAR THE BLOCK NUMBER
	TAD	DELDRV 		/ SET THE DRIVE IN THE QUEUE BLOCK
	DCA	QUQBLK+RXQDRV
	JMS	QURX
	JMP I	DESETQ					/A020


/
/	THE STRINGS THAT ARE USED FOR DELIMITERS
/
DEADR1,	"<-200 			/ ++++
	156 			/ ++++
	">-200 			/ ++++
	0
DEADR2,	"<-200 			/ ++++
	"#-200 			/ ++++
	">-200 			/ ++++
	0
DEADR3,	"<-200 			/ ++++
	">-200 			/ ++++
	0
	IFDEF	VT125R	<


/WE MUST RELOAD THE CRITICAL VALUES ON PAGE ZERO BEFORE WE LEAVE	/A031
/....MOVES LOCS 20-76 FIELD 0 TO PRINT FIELD				/A031

SETPG0,	0		/RESET PAGE 0 LOCS 20-76			/A031
	TAD	(20-T1)		/ INITIALIZE 10020-10076		/A031
	DCA	T1		/ UP TO BUT NOT INCLUDING T1!		/A031
	TAD	(20-1		/ ELSE THIS LITTLE SECTION BLOWS AWAY!	/A031
	DCA	X0							/A031
	TAD	(20-1							/A031
	DCA	X1							/A031
WAKEU1,	CDFSYS								/A031
	TAD I	X0							/A031
	CDFPRT								/A031
	DCA I	X1							/A031
	ISZ	T1							/A031
	JMP	WAKEU1							/A031
	CDFMYF								/A031
	TAD	(CIFPRT		/RESET CALL TO FLABUZ NOW THAT PRTFLD IN/A034
	JMS	SETFLA		/SET IT					/A034
	JMP I	SETPG0		/RET					/A031
			>	/END IFDEF VT125R			/A031
/--------------------
	PAGE

/
/	NOW THE DOCUMENT WILL BE ACTUALLY DELETED
/
DEDON1,	CLA
	TAD	DELFND 		/ OPEN THE DOCUMENT FOR OVERWRITE
	MQL
	AC7777
	CIFFIO 			/ ++++					/M0009
	FILEIO 			/ ++++					/M0009
	XDSKIN
/
	CIFFIO 			/ ++++					/M0009
	FILEIO 			/ ++++					/M0009
	XDSKCL 			/ CLOSE IT
/
	CLA
	TAD	(RXEGF) 	/ SET THE FUNCTION FOR GET FIRST
	JMS	DESETQ		/SET UP Q BLK			/A020
/
	CLA
	TAD	QUQBLK+RXQBLK 	/ SAVE THE BLOCK NUMBER THAT THE HEADER
	DCA	DEHDBK 		/ IS IN
	TAD	DEHDBK		/ READ THE HEADER BLOCK INTO OUR BUFFER./A015
	SNA			/ SKIP IF THERE IS ONE.			/A015
	JMP	DENOHD		/ JMP IF NO HEADER BLOCK.		/A015
	DCA	QUQBLK+RXQBLK	/ SET BLOCK TO READ.			/A015
	TAD	(RXERD)		/ SET FUNCTION CODE TO READ.		/A015
	DCA	QUQBLK+RXQFNC	/  ...					/A015
	JMS	QURX		/ GO GET IT.				/A015
/									/A015
	AC0001			/ SEE IF "VALID GOTO PAGE STRUCTURE" BIT/A017
	AND	DEBUFR+1	/  IS SET. IF NOT THEN IGNORE GTP PNTR.	/A017
	SZA CLA			/ SKIP IF NOT SET. IGNORE PTR.		/A017
	TAD	DEBUFR+53	/ GET RAPID-PAGINATION HEADER BLOCK #.	/A015
	DCA	DERHBK		/ SAVE RPG HEADER BLK #			/A015
	AC7776			/ 2 HEADERS TO DE-ALLOCATE.		/A016
	DCA	T1		/  ...					/A016
	TAD	(DEHDBK-1)	/ GET HEADER LIST POINTER.		/A016
	DCA	X0		/  ...					/A016
/									/A015
DECON1,	TAD	(DEXTNL-1)	/ SAVE HEADER EXTENSION LIST PTR.	/A016
	DCA	X1		/  ...					/A016
	TAD I	X0		/ GET HEADER POINTER.			/A016
	DCA	QUQBLK+RXQBLK	/ SAVE IN QUEUE BLOCK.			/A016
	TAD	QUQBLK+RXQBLK	/ GET HEADER BLOCK PTR.			/A016
	SNA			/ SKIP IF THERE IS ONE (MORE) TO PROCESS/A016
	JMP	DENOHD		/ JMP WHEN DONE.			/A016
	DCA I	X1		/ SAVE IN HEADER XTN LIST.		/A016
	TAD	(RXERD)		/ SET FUNCTION TO "READ".		/A016
	DCA	QUQBLK+RXQFNC	/  ...					/A016
	JMS	QURX		/ GO DO IT.				/A016
	CLA			/ GET EXTN PTRS 1 & 2 FROM FILE HDR.	/A016
	TAD	DEBUFR+2	/     (GET EXT #1)			/A016
	DCA I	X1		/ SAVE IT.				/A016
	TAD	DEBUFR+3	/     (GET EXT #2)			/A016
	DCA	QUQBLK+RXQBLK	/ SET UP TO READ IT TO.			/A016
	TAD	QUQBLK+RXQBLK	/ SAVE IT IN THE HDR LIST TOO.		/A016
	SNA			/ SKIP IF THERE IS AN EXTENSION LIST	/A016
	JMP	DEDNLS		/ JMP IF DONE LIST.			/A016
	DCA I	X1		/ SAVE PTR IN LIST.			/A016
	JMS	QURX		/ READ 2ND XTN BLOCK.			/A016
	CLA			/					/A016
	TAD	(DEBUFR+361)	/ SET PTR TO XTN LIST.			/A016
	DCA	X2		/  ...					/A016
	TAD	(-16)		/ PICK UP 14. POINTERS.			/A016
	DCA	T2		/  SET UP FOR ISZ LOOP.			/A016
DEXTL1,	TAD I	X2		/ TRANSFER FROM HDR XTN LIST TO		/A016
	SNA			/  (SKIP IF NOT DONE.			/A016
	JMP	DEDNLS		/    JMP TO SET STOPPER).		/A016
	DCA I	X1		/   OUR XTN LIST.			/A016
	ISZ	T2		/ LOOP ON THE # OF PTRS IN THE XTN LIST./A016
	JMP	DEXTL1		/ JMP IF MORE TO DO.			/A016
DEDNLS,	DCA I	X1		/ SET STOPPER.				/A016
	TAD	(DEXTNL-1)	/ GET HEADER BLOCK LIST POINTER.	/A016
	DCA	X1		/ RESET LIST POINTER.			/A016
	JMS	DECLBF		/ CLEAR THE BLOCK BUFFER.		/A016

DECON2,	CLA			/					/A016
	TAD I	X1		/ GET NEXT BLOCK IN HEADER LIST.	/A016
	SNA			/ SKIP IF THERE IS ONE.			/A016
	JMP	DECON1		/ JMP IF ALL DONE DEALLOCATING THIS HDR./A016
	DCA	QUQBLK+RXQBLK	/ SET BLOCK TO INIT & DE-ALLOCATE.	/A016
	TAD	(RXEWT)		/ 1ST INIT THE BLOCK.			/A016
	DCA	QUQBLK+RXQFNC	/ SET WRITE OUT ZEROED BLOCK.		/A016
	JMS	QURX		/  ...					/A016
	CLA			/ NOW TO DE-ALLOCATE THE BLOCK.		/A016
	TAD	(RXEFR)		/  ...					/A016
	DCA	QUQBLK+RXQFNC	/   ....				/A016
	JMS	QURX		/    FREE IT UP.			/A016
	JMP	DECON2		/ GO DO NEXT HDR BLOCK.			/A016
				/					/A016
/									/A015
DENOHD,	TAD	(RXESF) 	/ GET RID OF THE HEADER
	DCA	QUQBLK+RXQFNC	/
	TAD	DELFNO 		/ SET THE FILE
	DCA	QUQBLK+RXQFNO	/
	DCA	QUQBLK+RXQBLK 	/ BLOCK HAS TO BE SET TO ZERO
	JMS	QURX		/
/
	CLA
	JMP	DELRUT 		/ GO BACK TO CALLER

/--------------------
	PAGE

/
/	THE ERROR HANDLING
/	TVALUE IN MNTMP2 HAS THE TYPE OF ERROR
/	AND IN MNTMP1 IS THE RETURN VALUE FROM THE MENU
/
DERRO1,	CLA
	CDFBUF 			/ IF INDEX IS BAD THEN DONT TOUCH IT
	DCA I	(DERCAY)
	CDFMYF
	JMP	DERR1B
DERRO3,	ISZ	DELERT
DERRO2,	ISZ	DELERT
DERR1B,	ISZ	DELERT
	JMP	DEDONR
/
DEDONE,	CLA
	DCA	DERULE
	DCA	DEPRNT
	DCA	DELERT
DEDONR,	CLA
	TAD	DELERT
/
	CDFMNU
	DCA I	(MUBUF+MNTMP2)
	CDFMYF
/
	CIFMNU
	JMS I	MNUCAL
	DLMDL2
/
	CDFMNU
	TAD I	(MUBUF+MNTMP1)
	CDFMYF
/
	SNA CLA 		/ ++++
	JMP	DELRUT
	JMP	DECONT
DELERT,	0

/
/	DERDNM - READ IN A RECORD FROM THE INDEX FILE TO THE BUFFER
/	DEBUF.
/
DERDNM,	XX
	CLA
	TAD	(RECLIM) 	/ SET THE RECORD SIZE LIMIT
	DCA	DERCTM
	TAD	(DEBUF-1) 	/ SET THE STARTING ADDRESS
	DCA	X1
DECLFG,	TAD I	DERDNM 		/ GET THE TERMINATING STRING OF A RECORD
	DCA	DETMP1
DELUP2,	CLA
	CIFFIO 			/ ++++					/M0009
	FILEIO 			/ ++++					/M0009
	XRDFNC 			/ GET A CHARACTER
	SPA 			/ ++++
	JMP	DERRO3
	SNA 			/ ++++
	JMP	DEOF 		/ REACHED END OF FILE
	JMS	DELFLT 		/ CHECK FOR NOT PRINT THINGS
	JMP	DELUP2 		/ NG
/
	AND	P177
	ISZ	DERCTM 		/ INCREMENT CHARACTER COUNT
	SKP 			/ ++++
	JMP	DERRO1
	CIA
	TAD I	DETMP1 		/ CHECK FOR A DELIMITER
	SNA 			/ ++++
	JMP	DEUPDT
	CIA 			/ ++++
	TAD I	DETMP1 		/ GET HTE ORIGINAL BACK
/
	CDFBUF
	DCA I	X1
	CDFMYF
/
	JMP	DECLFG
DEUPDT,	CIA 			/ ++++
	TAD I	DETMP1
/
	CDFBUF
	DCA I	X1
	CDFMYF
/
	ISZ	DETMP1 		/ CHECK THE NEXT CHARACTER IN THE STRING
	TAD I	DETMP1
	SZA CLA 		/ ++++
	JMP	DELUP2 		/ FOR A ZERO
/
	CDFBUF 			/ END THE STRING READ IN WITH A ZERO
	DCA I	X1
	CDFMYF
/
	ISZ	DERDNM 		/ SKIP 2 IF OK
DEOF,	ISZ	DERDNM 		/ SKIP 1 IF EOF
	JMP I	DERDNM
DERCTM,	0
DETMP1,	0

/
/	DECOPY - WILL MOVE TO THE NEXT RECORD IN THE INDEX DOCUMENT
/	COPYING EVERYTHING IN IT
/
DECOPY,	XX
DECOP1,	CLA
	TAD I	DECOPY 		/ GET THE ADDRESS OF THE STRING THAT WILL
	DCA	DECPTM 		/ TERMINATE THE COPY
DECOP2,	CIFFIO 			/ ++++					/M0009
	FILEIO 			/ ++++					/M0009
	XGETET 			/ GET THE NEXT CHARACTER
	SPA 			/ ++++
	JMP	DERRO3 		/ READ ERROR WITH INDEX
	SNA 			/ ++++
	JMP	DECOPN 		/ IF ZERO REACHED EOF
	DCA	DECPCR 		/ SAVE FOR LATER
	TAD	DECPCR
	CIFFIO 			/ ++++					/M0009
	FILEIO 			/ ++++					/M0009
	XPUTST 			/ SAVE THE CHARACTER
	TAD	DECPCR 		/ SEE IF IT MATCHES THE DELIMITER
	AND	P177
	CIA 			/ ++++
	TAD I	DECPTM 		/ COMPARE CHARACTER TO DELIMITER
	SZA 			/ ++++
	JMP	DECOP1
	ISZ	DECPTM 		/ FOUND MATCH INCREMENT THE POINTER
	CLA
	TAD I	DECPTM 		/ GET THE NEXT CHARCATER OF THE DELIMITER
	SZA CLA 		/ ++++
	JMP	DECOP2 		/ SEE IF ZERO
	ISZ	DECOPY 		/ YES DONE
DECOPN,	ISZ	DECOPY
	JMP I	DECOPY
DECPTM,	0
DECPCR,	0
/--------------------
	PAGE

/
/	DELCUR - DELETES THE CURRENT RECORD
/
DELCUR,	XX
DELCR1,	CLA
	TAD I	DELCUR 		/ GET THE ADDRES OF THE STRING TO STOP THE DELETE
	DCA	DELCRT
DELCR2,	CIFFIO 			/ ++++					/M0009
	FILEIO 			/ ++++					/M0009
	XGETET 			/ GET THE NEXT CHARACTER OF THE INDEX
	SPA 			/ ++++
	JMP	DERRO3 		/ READ ERROR WITH THE INDEX
	SNA 			/ ++++
	JMP	DELCEN
	JMS	DELFLT 		/ SEE IF THE CHARACTER HAS A SPECIAL MEANING
	JMP	DELCR3 		/ IF SO COPY IT
/
	CIA 			/ ++++
	TAD I	DELCRT 		/ IF NOT CHECK FOR DELIMITER
	SZA CLA 		/ ++++
	JMP	DELCR1
	ISZ	DELCRT 		/ IF A DELIMITER CHECK FOR LAST
	TAD I	DELCRT
	SZA CLA 		/ ++++
	JMP	DELCR2
	TAD	(BELL) 		/ INSERT A BELL FOR THE EDITOR
	CIFFIO 			/ ++++					/M0009
	FILEIO 			/ ++++					/M0009
	XPUTST
	ISZ	DELCUR 		/ IF DONE INCREMENT
DELCEN,	ISZ	DELCUR
	JMP I	DELCUR
DELCR3,	CIFFIO 			/ ++++					/M0009
	FILEIO 			/ ++++					/M0009
	XPUTST 			/ SAVE THE CHARACTER
	JMP	DELCR2
DELCRT,	0

/
/	DECKDS - DISPLYS THE NAME PORTION OF THE CURRENT
/	RECORD TO THE SCREEN
/
DECKDS,	XX
DECKL3,	CLA
/D044	CDFBUF
/D044	TAD I	X2
/D044	CDFMYF
	JMS	GETNXT		/ GET NEXT CHARACTER			/A044
/
	SNA 			/ ++++
	JMP	DECEND 		/ ZERO MEANS EOF
	AND	P177
	TAD	(-TAB) 		/ CHECK FOR TABS AND CHANGE THEM TO SPACES
	SNA 			/ ++++
	JMP	DETAB
	TAD	(TAB-40) 	/ GET RID OF CONTROL CHARS
	SPA 			/ ++++
/D044	JMP	DECKL3
	JMP	DECKST		/ GO CHECK FOR START-OF-DEAD		/A044
	TAD	(40)
	CIA 			/ ++++
	TAD	DECKDT 		/ SEE IF A < HAS BEEN FOUND
	SNA 			/ ++++
	JMP	DELFCR 		/ YES
	CIA 			/ ++++
	TAD	DECKDT 		/ NO
/
DEDSOU,	JMS	DELDIS 		/ DISPLAY THE CHARACTER
/
	JMP	DECKL3
DELFCR,	CLA
	TAD	(LF) 		/ TERMINATE THE LINE
	JMS	DELDIS
	TAD	(CR)
	JMS	DELDIS
	ISZ	DECKDS 		/ OK
DECEND,	JMP I	DECKDS
DETAB,	CLA
	TAD	(BLANK)
	JMP	DEDSOU
DECKDT,	"<-200

/
/	GETCHR - GET A CHARACTER
/
GETCHR,	XX
	CLA
	TAD I	GETCHR
	DCA	T1
	ISZ	GETCHR
	TAD I	T1
	CLL RAR
	TAD I	GETCHR
	DCA	T1
	TAD I	T1
	SNL 			/ ++++
	BSW
	AND	P77
	ISZ	GETCHR
	JMP I	GETCHR

/
/	THIS IS THE QUEUE ROUTINE TO RXHAN.  THE REQUEST IS IN QUQBLK
/	USED BY DELETE AND SYSTEM OPTIONS
/
QURX,	XX
	CIFSYS 			/ ++++
	ENQUE 			/ ++++
	QUBLK
QURX1,	CIFSYS 			/ ++++
	JWAIT
	TAD	QUQBLK+RXQCOD
	SNA 			/ ++++
	JMP	QURX1
	JMP I	QURX
/
QUBLK,	DSKQUE 			/ ++++
	0 			/ ++++
	0
QUQBLK,	ZBLOCK 17


LOADMC,	23			/ ++++
	200			/ ++++
	CIF 20			/ MAG CARD I

LOADCX,	3			/ ++++
	200			/ ++++
	CIF 20			/ CX

LOADAX,
LOADDX,	5			/ ++++
	200			/ ++++
	CIF 10			/ AX AND DX
/--------------------
	PAGE

/
/	DELFLT - WILL CHECK FOR A RULER OR PRONTER CONTROL STRING
/	IF IT ISTHE CHARACTER WIL BE RETURNED ON A NON-SKIP RETURN
/	IF IT IS ANYTHING ELSE IT WILL RETURN THE CHARACTER IN THE AC ON
/	ASLIP RETURN
/
DELFLT,	XX
	TAD	(-DENDP) 	/ CHECK FOR A END OF PRINTER CONTROL CHAR.
	SNA 			/ ++++
	JMP	DELEP 		/ CLEAR THE FLAG IF IT IS
	TAD	(DENDP-DENDR) 	/ CHEKC FOR END OF RULER
	SNA 			/ ++++
	JMP	DELER 		/ IF SO DELETE THE RULER FLAG
	MQL
	TAD	DEPRNT 		/ SEE IF THE PRINTER CONTROL FLAG IS SET
	TAD	DERULE 		/ CHECL THE RULER FLAG
	SZA CLA 		/ ++++
	JMP	DELRTN
	MQA
	TAD	(DENDR-DESTRP) 	/ SEE IF IT IS A START OF
	SNA 			/ ++++
	JMP	DELFP 		/ PRINTER CONTROL
	TAD	(DESTRP-DESTRR) / CHECK FOR START OF RULER
	SNA 			/ ++++
	JMP	DELRP
	TAD	(DESTRR)
	ISZ	DELFLT 		/ OK
	JMP I	DELFLT
DELFP,	TAD	(DESTRP)
	ISZ	DEPRNT 		/ SET PRINTER FLAG
	JMP I	DELFLT
DELRP,	TAD	(DESTRR)
	ISZ	DERULE 		/ SET RULER FLAG
	JMP I	DELFLT
DELEP,	DCA	DEPRNT
	TAD	(DENDP)
	JMP I	DELFLT
DELER,	DCA	DERULE
	TAD	(DENDR) 	/ RETURN VALUE
	JMP I	DELFLT
DELRTN,	MQA
	TAD	(DENDR) 	/ GET ORIGINAL VALUE
	JMP I	DELFLT
DERULE,	0
DEPRNT,	0

/
/	DECKTK - WILL SEARCH IN THE BUFFER FIELD STARTING WITH THE ADDRESS
/	IN X2 FOR THE STRING MATCH WHOSE STARTING ADDRESS IS IN THE NEXT LOCATION
/	AFTER THE CALL TO THIS ROUTINE
/
DECKTK,	XX
DECKL1,	CLA
	TAD I	DECKTK 		/ GET THE ADDRESS OF THE COMPARE STRING
	DCA	DECKTM
DECKL2,	CDFBUF
	TAD I	X2
	CDFMYF
/
	AND	P177 		/ GET ONLY 7 BITS
	SNA 			/ ++++
	JMP	DECKEN 		/ END OF SEARCH STRING
	CIA 			/ ++++
	TAD I	DECKTM 		/ COMPARETO DELIMITER STRING
	SZA CLA 		/ ++++
	JMP	DECKL1 		/ IFNOT EQUAL START AGAIN
	ISZ	DECKTM 		/ INCREMENT THE POINTER
	TAD I	DECKTM
	SZA CLA 		/ ++++
	JMP	DECKL2 		/ RETURN IF ZERO
	ISZ	DECKTK 		/ SKIP 2 IF OK
DECKEN,	ISZ	DECKTK 		/ SKIP ONE IF END OF STRING
	JMP I	DECKTK
DECKTM,	0

/
/	DEFNUM - CONVERTS THE ASCII STRING STARTING AT THE ADDRESS
/	IN THE BUFFER FIELD IN X2 TO BINARY.
/
DEFNUM,	XX
	CLA
	DCA	DEFNM 		/ CLEAR THE TEMP FOR THE NUMBER
DEFNL1,	CDFBUF
	TAD I	X2 		/ GET HTE NEXT CHARACTER
	CDFMYF
/
	AND	P177
	TAD	(-72) 		/ COMPARE IT TO A NUMBER
	SMA 			/ ++++
	JMP	DEFNDN 		/ IF NOT A NUMBER DONE
	TAD	(12)
	SPA 			/ ++++
	JMP	DEFNDN
	DCA	DEFNMT 		/ STORE THE VALUE
	TAD	DEFNM 		/ MULTIPLY BY 10
	CLL RTL
	TAD	DEFNM
	CLL RAL
	TAD	DEFNMT
	DCA	DEFNM
	JMP	DEFNL1
DEFNDN,	CLA
	TAD	DEFNM
	SZA 			/ ++++
	ISZ	DEFNUM 		/ SKIP IF ANYTHING WAS FOUND
	JMP I	DEFNUM
DEFNM,	0
DEFNMT,	0

/
/	THE ROUTINE WILL SEND THE CHARACTER IN THE AC TO THE SCREEN
/
DELDIS,	XX
	JMP	DELDI2
DELDI1,	CIF 0 			/ ++++
	JWAIT
DELDI2,	CIF 0 			/ ++++
	TTYOU
	JMP	DELDI1
	CLA
	JMP I	DELDIS

/
/	DECLBF - SETS THE BUFFER AREA DEBUFR TO ZEROS
/
DECLBF,	XX
	CLA
	TAD	(DEBUFR-1) 	/ SET THE STARTING ADDRESS
	DCA	X3
	TAD	(DELIMB) 	/ SET THE COUNTER
	DCA	DECLBT
DELLBL,	CDFBUF
	DCA I	X3
	CDFMYF
	ISZ	DECLBT
	JMP	DELLBL
	JMP I	DECLBF

DECLBT,	0
/--------------------
	PAGE

/
/The following code is loaded into the start of the comm buffer. This	/A021
/code is executed when comm (AX/DX/CX) is finished and returning to	/A021
/Main Menu. The buffer pointers (in the sys COMM code) are reset to	/A021
/their origonal values.						/A021
/
/	 THIS CODE MUST BE SELF CONTAINED AND MUST BE			/A021
/	      ASSEMBLED AT THE START OF A PAGE....			/A021
/
C3CODE,	XX			/ The entry point.			/A021
	CLA			/					/A021
	RDF			/ Get caller's field, make us x-field	/A021
	TAD	CU3CDI		/  callable.				/A021
	DCA	COMXXX		/ Set return CDI.			/A021
	CIF	60		/ Hold interrupts.			/A023
COMSYS,	CDFSYS			/ Map sys field.			/A021
	TAD	COMSYS		/ Reset buffer CDFs			/A021
	DCA I	CU3BF1		/  one,					/A021
	TAD	COMSYS		/   ...					/A021
	DCA I	CU3BF2		/    two,				/A021
	TAD	COMSYS		/     and				/A021
	DCA I	CU3BF3		/      three.				/A021
	TAD	CU3BUF		/ Reset sys buffer pointer.		/A021
	DCA I	CU3IGT		/  ...					/A021
	TAD	CU3BUF		/   both of them.			/A021
	DCA I	CU3IPT		/    ...				/A021
	DCA I	CU3ICT		/ ZAP input buffer count.		/A021
	CDFTFL			/ Finally, Zap buffer size check./A021	/C029
	TAD	CU3TSZ		/  (check is done in the TSTFUL routine)/A021
	DCA I	CU3MAX		/   ...					/A021
	TAD	M21		/ and then reset the XOF point to 16	/A021
	DCA I	CU3XOF		/  chars from the end of the buffer.	/A021
COMXXX,	XX			/ return CIF CDF TO GO HERE.		/A021
	JMP I	C3CODE		/ Now we can return to Main Menu.	/A021

CU3CDI,	CIF CDF 0		/ CIF CDF for return.			/A021
CU3BF1,	CDFBF1			/ Address of 1st CDF to patch.		/A021
CU3BF2,	CDFBF2			/ Address of 2nd CDF to patch.		/A021
CU3BF3,	CDFBF3			/ Address of 3rd CDF to patch.		/A021
CU3IGT,	H2IGET			/ Address of 1st buffer pointer.	/A021
CU3IPT,	H2IPUT			/ Address of 2nd buffer pointer.	/A021
CU3BUF,	H2IBUF			/ Address of sys buffer.		/A021
CU3ICT,	H2ICNT			/ Address of count word.		/A021
CU3TSZ,	-H2ISIZ			/ Max buffer size (for TSTFUL check).	/A021
CU3MAX,	H2IMAX			/ Loc of check word (in TSTFUL).	/A021
M21,	-21			/ XOF point is reset to 16 chars from end/A021
CU3XOF,	H2XOFP			/ Address of loc which holds XOF pointer/A021

BUFSTR=4000+.-C3CODE		/ Define start of Alternate buffer.	/A021
BUFEND=7777	/Last location of buffer (ring pointer location).	/A022
BUFSIZ=BUFEND-BUFSTR	/ max number of chars allowed into alternate buf/A022

/
/	MESSAGES
/
DEDCNM,	
	IFDEF ENGLSH <
	TEXT '^P-- &ENTRIES IN THE INDEX DOCUMENT FOR !D.^D --^P'
	>
	IFDEF SPANISH <
	TEXT '^P-- &ANOTACIONES EN EL \MNDICE DE DOCS. PARA !D.^D --^P'
	>
	IFDEF DUTCH <
	TEXT '^P-- &NAAM OF NAMEN VAN DOCUMENT !D.^D IN DE INDEX --^P'
	>
	IFDEF ITALIAN <
	TEXT "^P-- &NOME DOCUMENTO CORRISPONDENTE ALL'INDICE !D.^D --^P"
	> 
	IFDEF V30NOR <
	TEXT '^P-- OPPLYSNINGER OM !D.^D I DOK.-FORTEGNELSEN --^P'
	>
	IFDEF V30SWE <
	TEXT '^P-- &INF\VRD TEXT I INNEH\ELLSDOKUMENTET TILL !D.^D --^P'
	>

/
DELNMS,	
	IFDEF ENGLSH <
	TEXT '^P!E        ^P-- &BEGINNING OF THE DOCUMENT TO BE DELETED --^P'
	>
	IFDEF SPANISH <
	TEXT '^P!E        ^P-- &COMIENZO DEL DOC. QUE SE HA DE BORRAR --^P'
	>
	IFDEF DUTCH <
	TEXT '^P!E        ^P-- &BEGIN VAN TE WISSEN DOCUMENT --^P'
	>
	IFDEF ITALIAN <
	TEXT "^P!E        ^P-- &INIZIO DEL DOCUMENTO DA CANCELLARE --^P"
	>								/a041
	IFDEF V30NOR <
	TEXT '^P!E ^P-- &BEGYNNELSEN AV DOKUMENTET SOM SKAL FJERNES --^P'
	>
	IFDEF V30SWE <
	TEXT '^P!E ^P-- &B\VRJAN AV DOKUMENTET SKA RADERAS --^P'
	>


/
CU3OVL,	XX 			/ SETS UP OVERLAY CHAIN INFO
	TAD I	T1		/ Get pointer to load info.
	DCA	X1		/ SAVE IN INDEX REG.
	AC7775 			/ ++++
	DCA	T1 		/ SET TO COPY THREE WORDS
	TAD	(MUBUF+MNONUM-1)/ ++++
	DCA	X0 		/ TO MENU AREA
/
CUPSO1,	TAD I	X1		/ GET NEXT WORD TO LOAD.
	CDFMNU 			/ CHANGE TO MENU FIELD
	DCA I	X0 		/ STORE NEXT WORD IN MENU AREA
	CDFMYF 			/ CHANGE BACK TO MY FIELD
/
	ISZ	T1 		/ ++++
	JMP	CUPSO1 		/ LOOP FOR ALL WORDS
	JMP I	CU3OVL 		/ THEN RETURN TO CALLER

CU3COE,	CDFMNU
	DCA I	(MUBUF+MNTMP1) 	/ CLEAR VALUE FOR CORRECT MESSAGE
	CDFMYF
	CIFMNU
	JMS I	MNUCAL
		DLMAD7
	JMP	CU3CMX		/ Then return to caller.

CU3TBL,	LOADAX-1		/ 1 = AX				/A023
	LOADDX-1		/ 2 = DX				/A023
	XX			/ 3 = printer.				/A023
	LOADCX-1		/ 4 = CX				/A023
	LOADMC-1		/ 5 = MAG-CARD				/A023
	LOADLO-1		/ 6 = LOGIN processor.			/A023
	LOADPH-1		/ 7 = PHONE utility			/A028
/--------------------
	PAGE
/ CU3COM - CALLS THE CORRECT OVERLAY FOR THE COMMUNICATIONS PACKAGE CALLED
/	IT FIRST SETS THE LINE SETTINGS BEFORE THE OVERLAY IS BROUGHT IN.
/	THIS ROUTINE ONLY SETS THE OPTIONS THAT CAN BE SET BY MORE THAN ONE
/	USER AS IN THE 102 WHICH EVER USER IS USING THE COMMUNICATIONS THE
/	LINE HAS TO BE CHANGED TO THEIR SPECIFICATION.  IF THE CHANGES CAN
/	BE DONE AT THE TIME OF CHANGE LINE THOSE SPECIFIC TO THE 78 THEY ARE
/	DONE IN CU3OPT.
/
/
CU3COM,	XX
	CLA
	CDFSYS 			/ SEE IF COMMUNICATIONS LINE IS IN USE.
	TAD I	(CMADSX)
	CDFMYF
	SZA CLA 		/ ++++
	JMP	CU3COE 		/ IF NOT ZERO POST ERROR
	CDFMNU 			/ LINE FREE SO TAKE IT
	TAD I	(MUBUF+MNTMP1) 	/ 0= CX;1 = AX;2 = DX
	SZA 			/ ++++
	JMP	CU3CO1
	AC0004 			/ IF 0 THEN CX BUT COULD BE STANDARD OR MAGCRD
	TAD I	(MUBUF+MNCMTP) 	/ 0= STANDARD;1 = MAG CARD I
CU3CO1,	CDFSYS 			/ ++++
	DCA I	(CMADSX) 	/ ++++

    IFNDEF CONDOR < / -------------------------------------------------	/a0018

/ now set the comm line to the users defined values
	CDFMYF			/NOT SURE IF NECESSARY FOR IFNDEF CONDOR/M037

	CIFSYS			/ 					/M0011
	H2INIT			/INIT APPROPRIATE HOST APPROPRIATELY.	/M0011
/ end ifndef condor -------------------------------------------------	/a0018 >

	CDFMNU
	TAD I	(MUBUF+MNPRTB)	/ GET TM MODE FOR CX.
	RTL			/ MOVE TM MODE TO BITS 0,1		/M014
/D035	RAL			/  ...					/M014
/D035	AND	(3)		/ ISOLATE IT.				/M014
	RTL			/ TM IS NOW 3 BITS			/A035
	AND	(7)		/					/A035
	DCA I	(MUBUF+CXTMOD)	/ IN THE MENU AREA.
/ ----------------------------------------------------------------------/A021
	IFDEF VT125R	<	/TEST FOR (CMADSX=4 OR 6 AND TM =125	/A024
				/TO BYPASS SETTING UP XPANDED BUFFER	/A024
/
/MOVED HERE VERSION 37.........
/
	AC7775			/GET -3					/A024
	TAD I	(MUBUF+CXTMOD)	/GET TERMINAL MODE			/A024
	SZA CLA			/SKIP IF VT125 MODE			/A024
	JMP	SETBUF		/LOAD FLD 6 IF NOT VT125(IS FOR GRAFIX /A024
	CDFSYS								/A024
	TAD I	(CMADSX)	/SEE IF CD DX ETC.			/A024
	TAD	(-4		/CHECK FOR CX				/A024
	SNA			/SKIP IF NOT CX				/A024
	JMP	GINTST		/FOR CX TEST IF GRFX IN CPMEM YET	/A024
	TAD	(-2		/CHECK IF LOGON PROCESS			/A024
	SPA CLA			/SKIP IF  LOGON OR AD(PHONE) 		/C039
	JMP	SETBUF		/RESUME IN LINE CODE			/A024
	DCA I	(CMADSX)	/CLEAR COMM SW				/A037
	AC0006			/MESSAGE NUMBER				/A037
	JMP	CU3COE		/BYPASS FOR LOGON			/C037
		>		/END IFDEF VT125R			/A024

SETBUF,	TAD	(BUFSTR)	/ Set up new larger COMM buffer		/M024
	DCA	T1		/ The new buffer resides in field 5 during
CU3LP,	CDF	60		/ AX, DX, and CX.
CU3SU1,	DCA I	T1		/ Init buffer values to 0
	ISZ	T1		/ The buffer is the balance of the field.
	JMP	CU3SU1		/ Loop to zap balance of the buffer.
	TAD	(BUFSTR)	/ Set ring pointer at end of buffer
	DCA I	(BUFEND)	/  to point to start of buffer.
				/
	TAD	(COMXIT-1)	/ get start of buffer pointer.
	DCA	X0		/ set up to load from real buffer.
	TAD	(C3CODE-1)	/ Copy exit code to start of buffer area.
	DCA	X1		/  ...
	TAD	(4000-BUFSTR)	/ Get negative # of words to copy.
	DCA	T1		/  ...
CU3SU2,	CDFMYF			/ Map our field.
	TAD I	X1		/ Get word of exit routine.
	CDF	60		/ Map buffer field.
	DCA I	X0		/ Stuff buffer.
	ISZ	T1		/ Loop on buffer size.
	JMP	CU3SU2		/  ...
	IOF			/ disable interrupts for a short while.
	CDFSYS			/ Map sys field (real buffer field).
	TAD I	(H2ICNT)	/ get count of characters in current buffer.
	SNA			/ Skip if there is something to do.
	 JMP	CU3NTM		/ Jmp if nothing to move.
	CIA			/ compute negative of amount to move.
	DCA	T1		/ save ISZy count.
	TAD I	(H2IGET)	/ get input character pointer.
CU3WRP,	DCA	T2		/ (re)init our input char pointer.
CU3MVL,	TAD I	T2		/ Get character from real ring buffer.
	SPA			/ Skip if not ring pointer.
	 JMP	CU3WRP		/ Jmp to wrap buffer pointer.
	CDF	60		/ Map new buffer field.
	DCA I	X0		/ Move character to it's new buffer.
	ISZ	T2		/ Bump input pointer.
	CDFSYS			/ Back to sys field.
	ISZ	T1		/ Loop on input buffer size.
	JMP	CU3MVL		/  ...
CU3NTM,	TAD	(BUFSTR)	/ Get start of buffer pointer.
	DCA I	(H2IGET)	/ Set 'rupt handler pointer.
	TAD	 CU3LP		/ Now Patch the CDF's to the buffer field.
	DCA I	(CDFBF1)	/  one,
	TAD	 CU3LP		/   ...
	DCA I	(CDFBF2)	/   two,
	TAD	 CU3LP		/    and
	DCA I	(CDFBF3)	/     three.
	ISZ	X0		/ Get pointer to next available posn.
	TAD	X0		/ Get next avail pointer.
	DCA I	(H2IPUT)	/ Set 'rupt handler for that one too.
	CDFTFL		/ Finally, inform TSTFUL routine of new size.	/C029
	TAD	(-BUFSIZ)	/  ...
	DCA I	(H2IMAX)	/   ...
	TAD	(-2001)		/ and lastly, reset the XOF point to be
	DCA I	(H2XOFP)	/  about half way into buffer.
	ION			/ Finally, we can re-enable 'rupts.
/ ----------------------------------------------------------------------/A021
CU3BYP,	CDFMYF			/ WITHOUT ISZ WILL RETURN TO MAINMENU	/M024
	ISZ	CU3COX 		/ SET RETURN FOR CHAIN TO COMMUNICATIONS OVERLAY
/ --------------------------------------------------------------------------
	CDFSYS			/ See who we reserved COMM line for...	/A023
	TAD I	(CMADSX)	/  ...					/A023
	CDFMYF			/ Back to our field.			/A023
	TAD	(CU3TBL-1)	/ Compute index into LOAD TABLE.	/A023
	DCA	T1		/  save pointer.			/A023
	JMS	CU3OVL		/ Load OVRLAY info.			/A023
CU3CMX,	JMP I	CU3COM

/--------------------
	PAGE

IFDEF	VT125R	<		/FOR VT125				/A024
	/CONTROL PANEL REQUEST DEFINITIONS				/A024
	SKPGRB=6150		/SKIP IF GRAPHICS BOARD PRESENT(DMIII)	/A038
	PRQ3=6236							/A024
	CP2MM=5000		/PANEL REQUEST OP CODES			/A024
	MM2CP=4000		/FOR BLOCK MEM TRANSFERS		/A024
	RCPFLD=7		/PANEL FLD FOR STORING REGIS		/A024
	PCPFLD=6		/PANEL FLD FOR STORING PRIM		/A024
	ACPFLD=5		/ALFA BITS CTRL PANEL FIELD		/A024
	REGFLD=6211		/REGIS FIELD				/C032
	PRMFLD=6251		/PRIM FIELD				/C032
	PRGFLD=6261		/PRIM-REGIS COMBINATION FIELD=6		/C032
/HERE IF LOADING CX IN VT125 MODE					/A024
GINTST,								/C038
	CDFMNU							/A038
	AC2000			/2000 BIT = DMIII		/A038
	AND I	(MUBUF+MNOPTN)					/A038
	CDFMYF							/A038
	SNA CLA			/= DMIII?			/A038
	JMP	GINSTU		/NOT A DMIII			/A038
	SKPGRB			/SKIP IF GRAPHICS BOARD PRESENT	/A038
	JMP	NOBORD		/NOT PRESENT			/A038
	CLA			/IS PRESENT-SKPGRB READ STATUS	/A038
	JMP	PRTFLD		/CONTINUE			/A038
GINSTU,								/A038
/D038	CDFMYF			/NEED TO MIND OUR OWN BUSINESS		/A024
	CLA OSR			/WILL RETURN AC10 =0 IF GRFX HRDWR IN	/A024
	AND	(2)		/AC10= 1 IF GRFX HRDWR NOT INSTALLED	/A024
	SZA CLA			/SKIP TO CONTINUE TEST FOR SOFTWARE IN	/A024
	JMP	NOBORD		/GRFX BOARD IS NOT PRESENT GO TO GOLD M	/A024
PRTFLD,	CDFPRT			/PRINTER FIELD				/A029
	TAD I	(PRSTTS)	/PRINTER STATUS WORD			/A029
	CDFMYF								/A029
	SZA CLA			/PRINTER IN USE				/A029
	JMP	NOPRT		/PRINTER IN USE ILEGAL IN VT125 MODE	/A029
	JMS	CLEARQ		/TEMP PATCH LOC				/A029
/D037	JMP	GRREAD		/NO  LOAD GRAPHICS			/A029
/D029	TAD	(PRBOTM		/TEMP PATCH LOC				/A029
/D029	DCA	CLRPTR		/TEMP PATCH LOC				/A029
/D029	TAD	(-2000		/TEMP PATCH LOC				/A029
/D029	DCA	CLRCNT		/TEMP PATCH LOC				/A029
/D029PRTFLD,	CDFPRT			/TEMP PATCH LOC				/A029
/D029	DCA I	CLRPTR		/TEMP PATCH LOC				/A029
/D029	ISZ	CLRPTR		/TEMP SET TO NEXT			/A029
/D029
/D029	ISZ	CLRCNT		/TEMP PATCH LOC				/A029
/D029	JMP	PRTFLD+1		/TEMP PATCH LOC				/A029
/D029	CDFMYF			/TEMP PATCH LOC				/A029
/D029	NOP			/TEMP PATCH LOC				/A029
/D029	NOP			/TEMP PATCH LOC				/A029
/D029CLRPTR,	0		/TEMP POINTER LOC			/A029
/D029CLRCNT,	-1000			/TEMP POINTER LOC			/A029
/D029	PRQ3			/USE PANEL REQUESTS TO SEE IF GRFX IN	/A024
/D029	CP2MM+40+RCPFLD		/XFER TO MYFLD (4) FROM REGIS CP FLD	/A024
/D029	0200			/SOURCE ADR (IN CP MEM)			/A024
/D029	DEBUFR			/DESTINATION ADR (IN MM)		/A024
/D029	-10			/8 WORDS IS MORE THAN ENOUGH FOR POS ID /A024
/D029	7777			/TERMINATOR				/A024
/D029	TAD	(-3057)		/IS OCT CODE AT 0200 OF REGIS		/A024
/D029	TAD	DEBUFR		/IS LOC 0200 OF CP REGIS		/A024
/D029	SZA CLA			/NOT LOADED YET IF UNEQUAL		/A024
/D029	JMP	GRREAD		/BETTER READ AND LOAD ALL 3 IF 1 NOT OK	/A024
/D029	TAD	(1564)		/IS A NEG RDF INSTRUCTION		/A024
/D029	TAD	DEBUFR+2	/CORRESPONDING LOC IN READ BUFFER	/A024
/D029	SZA CLA			/NOT LOADED YET IF UNEQUAL		/A024
/D029	JMP	GRREAD		/BETTER READ AND LOAD ALL 3 IF 1 NOT OK	/A024
/D029	PRQ3			/PANEL REQUEST				/A024
/D029	CP2MM+40+PCPFLD		/TO MY FLD (4) FROM PRIM CPFLD		/A024
/D029	0200			/SOURCE ADR (IN CP MEM)			/A024
/D029	DEBUFR			/MAY AS WELL USE THIS BUFFER		/A024
/D029	-10			/NEG WORD COUNT				/A024
/D029	7777			/TERMINATOR				/A024
/D029	CLA CLL			/NEVER TRUST A COMPUTER YOU CAN'T SEE	/A024
/D029	TAD	(-3066)		/NEG VALUE OF INSTR. AT 201 OF PRIM CODE/A024
/D029	TAD	DEBUFR+1	/CORRESPONDING LOC IN BUFFER		/A024
/D029	SZA CLA			/NOT LOADED YET IF UNEQUAL		/A024
/D029	JMP	GRREAD		/BETTER READ AND LOAD ALL 3 IF 1 NOT OK	/A024
/D029	TAD	(-1233)		/3RD INSTR OF PRIM			/A024
/D029	TAD	DEBUFR+3	/CORRESPONDING LOC IN BUFFER		/A024
/D029	SZA CLA			/NOT LOADED YET IF UNEQUAL		/A024
/D029	JMP	GRREAD		/BETTER READ AND LOAD ALL 3 IF 1 NOT OK	/A024
/D029	PRQ3			/PANEL REQUEST				/A024
/D029	CP2MM+40+ACPFLD		/TO MY FLD FROM ALFA BITS FLD OF CPMEM	/A024
/D029	0200			/MAY AS WELL BE CONSISTENT		/A024
/D029	DEBUFR			/IF I CANT BE LOGICAL			/A024
/D029	-10			/MINUS # OF WORDS TO MOVE		/A024
/D029	7777			/TERMINATOR				/A024
/D029	CLA CLL			/WHO KNOWS 				/A024
/D029	TAD	(-104)		/NEG VALUE OF CHAR EXPECTED HERE	/A026
/D029	TAD	DEBUFR+1	/CORRESPONDING LOC IN BUFFER		/A024
/D029	SZA CLA			/NOT LOADED YET IF UNEQUAL		/A024
/D029	JMP	GRREAD		/BETTER READ AND LOAD ALL 3 IF 1 NOT OK	/A024
/D029	TAD	(-202)		/NEG VALUE OF CHAR EXPECTED HERE	/A026
/D029	TAD	DEBUFR+3	/CORRESPONDING LOC IN BUFFER		/A024
/D029	SNA CLA			/IF THIS = THEN PANEL MEM IS ALREADY IN	/A024
/D029	JMP	CU3BYP		/RETURN TO MAINLINE CODE		/A024
/HERE TO LOAD GRAPHICS CODE AND CONSTANTS INTO PANEL MEM FOR
/SUSEQUENT LOAD BY CX							/A024
GRREAD,	CDIMNU			/GET READY TO PUT UP ACTIVATION MSG	/A024
	DCA I	(MUBUF+MNTMP2	/AC IS STILL 0 				/A024
	CDFMYF			/NEED TO CALL FROM OWN FLD		/A024
	JMS I	MNUCAL		/GO PUT UP MSG TO ASK FOR DRIVE #	/A024
	DLM125								/A024
GOTNUM,	CDFMNU			/NEED TO GET DRIVE # ENTERED		/A024
	TAD I	(MUBUF+MNTMP3)	/WHAT IS IT				/A024
MYFLD,	CDFMYF			/BACK HERE				/A024
	SPA			/- IS FROM GOLD MENU			/A024
	JMP	CU3GMX		/LEAVE CU3				/A024
	DCA	QUQBLK+RXQDRV	/PLUG IT IN				/A024
	DCA	QUQBLK+RXQRS1	/SET BLOCK COUNT(0=1 BLOCK)		/C030
	TAD	MYFLD		/SET UP POINTER TO THIS MEM FIELD(BUFFR)/A024
	DCA	QUQBLK+RXQBFD	/PUT IT IN QBLK				/A024
	TAD	(DEBUFR)	/GET POINTER TO BUFFER ADR		/a024
	DCA	QUQBLK+RXQBAD	/PUT IT IN QBLK				/A024
	TAD	(4000+RXEDN	/GET AND SET DENSITY			/A024
	DCA	QUQBLK+RXQFNC	/FUNCTION CODE				/A024
	JMS	QURX		/DO IT					/A024
	SPA CLA			/+ AC MEANS NO ERROR			/A024
	JMP	GRREAD		/GO DEAL WITH DENSITY ERROR		/A024
	TAD	(RXERD+4000)	/GET READY TO READ ALLOCATION BLOCK	/A024
	DCA	QUQBLK+RXQFNC	/READ FUNCTION				/A024
	TAD	(2)		/GET HEADER BLOCK #			/A024
	DCA	QUQBLK+RXQBLK	/SET BLOCK #				/A024
	JMS	QURX		/REQUEST THE READ			/A024
	SPA CLA			/+AC MEANS NO ERRORS			/A024
	JMP	GRREAD		/ALL I CAN THINK OF IS TO START OVER	/A024
/NOW WE'RE GOING TO VERIFY THAT THE CORRECT VOLUME HAS BEEN MOUNTED	/A024
	TAD	DEBUFR+2	/SECOND WORD STARTS ID			/A024
	TAD	VTID1		/START OF ID CONSTANT			/A024
	SZA CLA			/SKIP IF OK				/A024
	JMP	INSERR		/OTHERWISE PUT UP ERROR MSG		/A024
	TAD	DEBUFR+4	/CK MORE TO EXCLUDE RANDOM BAD LUCK	/A024
	TAD	VTID3		/3RD WORD OF ID CONSTANT		/A024
	SZA CLA			/SKIP IF OK				/M032
	JMP	INSERR		/INSERTED WRONG VOLUME			/M032
	TAD	DEBUFR+11	/WORD 9 MUST BE 1 FOR FEATURE DISKETTE	/M032
	JMP	INLINE		/JUST CONTINUES IN LINE ON NEXT PAGE	/A024
VTID1,	-7061			/NEG CONSTANT FOR WP			/M027
VTID3,	-6555			/NEG CONSTANT FOR TL			/M027

CU3GMX,	AC7775			/GET -3					/A029
	CDFMNU								/A029
	TAD I	(MUBUF+CXTMOD)	/GET TERMINAL MODE			/A029
	CDFMYF								/A029
	SZA CLA			/SKIP IF VT125 MODE			/A029
	JMP	CU3GMY		/IGNNORE RELOAD FOR NON 125 MODE	/A029
	DCA	QUQBLK+RXQDRV	/SET BRIVE TO SYSTEM			/C030
	TAD	(DLFD1		/START BLOCK NUMBER			/A029
	DCA	QUQBLK+RXQBLK						/A029
	TAD	(-DSFD1		/BLOCK COUNT				/A029
	DCA	QUQBLK+RXQRS1						/A029
	TAD	PRTFLD		/PRINTER FIELD				/A029
	DCA	QUQBLK+RXQBFD	/PUT IT IN QBLK				/A029
	TAD	(PRBOTM		/START OF BUFFER			/A029
	DCA	QUQBLK+RXQBAD	/PUT IT IN QBLK				/A029
	TAD	(RXERD		/NO RETURN MUST REBOOT			/A029
	DCA	QUQBLK+RXQFNC	/FUNCTION CODE				/A029
	JMS	QURX		/DO IT					/A024
	SPA CLA			/+ AC MEANS NO ERROR			/A024
	JMP	CU3GMX		/REPEAT				/A029
	JMS	SETPG0		/RESTORE PAGE 0 FOR PRINTER		/A031
	TAD	(PRJOB		/STATUS BLOCK POINTER			/A029
	CIFSYS								/A029
	JSTRT			/RESTART JOB				/A029
CU3GMY,								/A024
	CDFSYS			/SYSTEM FLD				/A024
	DCA I	(CMADSX		/MAKE COMM LINE AVAILABLE AGAIN		/A024
	CDFMYF			/BACK HERE BEFORE WE GO ANYWHERE ELSE	/a024
	JMP	CU3CMX		/NOW EXIT FROM CU3			/A024
/
/    MOVED VER---037---
/
LOADLO,	30;200;CIF 30		/ Load info for LOGON processor.	/A023
LOADPH,	30;202;CIF 30		/ PHONE utility entry point - WPLOG	/A028
	
/-------------------
	PAGE

INLINE,
	IAC			/WILL BE 0 IF WAS -1			/A024
	SZA CLA			/SKIP IF OK				/A024
	JMP	INSERR		/PROBABLY WAS DOC DISKETTE		/A024
	TAD (-BLDDY^100-BLDMO)	/SYSTEM CONSTANT FOR BUILD DAY & MONTH	/A025
	TAD	DEBUFR+7	/LOOK AT DATE ON FEATURE DISKETTE	/A025
	SZA CLA			/SKIP IF RIGHT DATE			/A025
	JMP	INSERR		/REPEAT INSERT MSG FOR ANOTHER CHANCE	/A025
	TAD	(-BLDYR)	/SAME DEAL FOR YEAR			/A025
	TAD	DEBUFR+10	/MUST BE RIGHT YEAR ALSO		/A025
	SZA CLA			/SKIP IF MATCH OK			/A025
	JMP	INSERR		/PUT UP INSERT MSG AGAIN		/A025
	CIFMNU			/GO TO MENU FLD TO			/A024
	JMS I	IOACAL		/PUT UP STANDBY MSG			/A024
	0
	PRGMSG			/'INSTALLATION IN PROGRESS etc.'	/A024
	0100			/POSITION TO ERASE ALL BUT TOP LINE	/A024
	1520			/LINE AND COL FOR DISP			/A024
/NOW WE'RE GOING TO GET READY AND READ THE INSERTED VOLUME		/A024
/**********
/LOAD ALPHA BITS  INTO FIELD 5 PANEL MEM..
/...USE REGIS FIELD 5 MAIN MEM AS TEMP AREA
/***********
	TAD	DESADR		/POINTER				/A030
	DCA	QUQBLK+RXQBAD	/SET BUFFER ADDRESS			/A030
	TAD	(ACPFLD^10+1+MM2CP	/INSTRUCTION TO LOAD FLD(PRNTR)	/C030
	DCA	MM2CPM		/PLUG IT IN				/A024
	TAD	(DLPALF		/POINTER TO BLOCK NUM			/A029
	DCA	QUQBLK+RXQBLK	/SET IT					/A029
	TAD	(-DSPALF	/BLOCK COUNT				/A029
	DCA	QUQBLK+RXQRS1	/SET IT					/A029
	TAD	PRTFLD		/PRINT FIELD...=FIELD 1(TEMP		)/A029
	DCA	QUQBLK+RXQBFD	/SET IT					/A029
	JMS	QURX		/READ IT				/A029
	SPA CLA			/ERROR?					/A029
	JMP	GRREAD		/YES RETRY IT				/A029
	TAD	(-DSPALF^400	/NUMBER OF BLOCKS TIMES NUM WORDS IN BLK/A029
	DCA	DESCNT		/SET COUNT				/A029
	JMS	SETPAN		/SET TO PANEL MEMORY			/A029
/*******
/LOAD REGIS TO FIELD 1							/A032
/LOAD PRIM TO FIELD  5							/A032
/LOAD REGIS /PRIM PARTIAL FIELDS TO FIELD 6				/A032
/
/********
	TAD	(PRGFLD		/REGIS/PRIM COMBO FIELD = FIELD 1	/A032
	DCA	QUQBLK+RXQBFD	/SET IT					/A032
	TAD	(DLPRM1		/DISK BLOCK # OF BEGINING OF GRFX STUFF /A032
	DCA	QUQBLK+RXQBLK	/INTO Q BLOCK				/A024
	TAD	(-DSPRM1-DSRGS1-DSPRM2	/BLOCK COUNT			/A033
	DCA	QUQBLK+RXQRS1	/SET IT					/A032
	DCA	QUQBLK+RXQBAD	/BUFFER ADDRESS				/A032
	JMS	QURX		/READ IT				/A032
	SPA CLA			/ERROR?					/A032
	JMP	GRREAD		/YES RETRY IT				/A032
/********
/LOAD REGIS CODE
/********
	TAD	(REGFLD		/REGIS FIELD = FIELD 5			/A029
	DCA	QUQBLK+RXQBFD	/SET IT					/A029
	TAD	(DLORGS		/DISK BLOCK # OF BEGINING OF GRFX STUFF /C029
	DCA	QUQBLK+RXQBLK	/INTO Q BLOCK				/A024
	TAD	(-DSORGS	/BLOCK COUNT				/A029
	DCA	QUQBLK+RXQRS1	/SET IT					/A029
	DCA	QUQBLK+RXQBAD	/BUFFER ADDRESS				/A029
	JMS	QURX		/READ IT				/A029
	SPA CLA			/ERROR?					/A029
	JMP	GRREAD		/YES RETRY IT				/A029
/*******
/LOAD PRIM CODE INTO FIELD 6 MAIN MEMORY
/********
	TAD	(DLOPRM		/POINTER TO BLOCK NUM			/A029
	DCA	QUQBLK+RXQBLK	/SET IT					/A029
	TAD	(-DSOPRM	/BLOCK COUNT				/A029
	DCA	QUQBLK+RXQRS1	/SET IT					/A029
	DCA	QUQBLK+RXQBAD	/BUFFER ADDRESS				/A029
	TAD	(PRMFLD		/PRIM FIELD...=FIELD 6			/A029
	DCA	QUQBLK+RXQBFD	/SET IT					/A029
	JMS	QURX		/READ IT				/A029
	SPA CLA			/ERROR?					/A029
	JMP	GRREAD		/YES RETRY IT				/A029
RSKIP2,
	TAD	QUQBLK+RXQDRV	/RETRIEVE DRIVE #			/A024
	SZA CLA			/SKIP IF JUST READ FROM DRIVE 0		/A024
	JMP	CU3BYP		/BYPASS THE COMM BUFFER MOVE TO FLD 6	/A024
PROMPT,	CIFMNU			/PROMPT TO REPLACE SYSTEM DISK		/A024
	JMS I	IOACAL		/CANT USE MENU BLOCK CAUSE SYSTEM ON 0	/A024
	0
	SYDISK			/ADR OF MSG TO REPLACE SYS IN 0		/A024
	0100			/POSITION TO ERASE ALL BUT TOP LINE	/A024
	1105			/POSITION & LET USER KNOW WE'RE DONE	/C040
	1305			/POSITION FOR 2ND LINE OF PROMPT	/A024
	JMP	SYPAP2		/MERGE BELOW				/A024
SYPAP1,	CIFSYS			/SYS IS STILL RESIDENT			/A024
	JWAIT			/WAIT A WHILE				/A024
SYPAP2,	CIFSYS			/BAK TO SYS AGAIN			/A024
	XLTIN			/GET AN INPUT CHAR			/A024
	JMP	SYPAP1		/LOOP AND WAIT IF NONE			/A024
	TAD	(-EDNWLN)	/RETURN TYPED?				/A024
	SZA CLA			/SKIP IF YES. 				/A024
	JMP	PROMPT		/NO. BETTER TELL USER AGAIN		/A024
	JMP	CU3BYP		/CONTINUE LOADING CX			/A024

INSERR,	AC0001			/FLAG FOR INSERTION ERROR		/A024
INSER2,	CDIMNU								/A024
	DCA I	(MUBUF+MNTMP2	/MAKE AVAIL TO MENU CODE		/A024
	CDFMYF			/MENU NEEDS TO KNOW WHICH FLD CALLED	/A024
	JMS I	MNUCAL		/GO PUT UP MSG				/A024
	DLM125			/NAME OF MENU BLOCK WE'RE USING		/A024
	JMP	GOTNUM		/IF WE COME BACK HERE WE HAVE A NEW #	/A024

SETPAN,	0			/SET PANEL MEM FROM MAIN		/A029
	PRQ3			/PANEL REQUEST #3			/A024
MM2CPM,	ACPFLD^10+1+MM2CP	/54 IS TO CPMEM FLD 5 FROM MM FLD 4	/C029
DESADR,								/M030
	0			/SOURCE ADDRESS				/C029
	0			/DESTINATION ADRESS IN CP MEM		/C030
DESCNT,	-400^DSPALF		/WORD COUNT FOR MOVE			/A024
	7777			/TERMINATOR				/A024
	JMP I	SETPAN							/A029


/----------------------
	PAGE

/
/	SET TO MODIFY NOP TO SKIP FLABUZ CALL IN WP2CMF			/A034
/
/THIS ROUTINE EXECUTES TWO FUNCTIONS					/A029
/THE FIRST FUNCTION CALLS THE PRINTER JOB TO PRINT A FF			/A029
/THIS IS A TEMP FUNCTION USED TO EMULATE A FUNCTION NOW BEING DEVELOPED	/A029
/THE REAL FUNCTION WILL BE A CALL TO THE PRINTER TO KILL ITSELF		/A029
/BY CHANGING THE CODE PUT INTO PRTACT FROM A 1(FF) TO A -1(KILL SELF)	/A029
/....AND DELETING THE TEMP CODE WHICH KILLS THE PRINTER JOB, THE	/A029
/.....REAL CALL CAN BE TESTED....					/A029
/
/BY PUTTING BOTH FUNCTIONS INTO CODE THIS WAY THE NEW GRAPHICS LOAD	/A029
/...INTO THE PRINTER FIELD CAN BE TESTED WITHOUT WAITING UNTIL 		/A029
/...BOTH THE NEW REGIS GRAPHICS AND KILLING SELF FUNCTION CAN BE TESTED	/A029
/
/THIS FUNCTION WILL ACTUALLY CALL THE PRINTER JOB TO KILL ITSELF WHEN	/A029
/...WHEN IN VT125 MODE....						/A029
/
CLEARQ,	0							/A029
	AC7777		/SET CODE TO -1=PRINTER KILL SELF		/A029
			/....CODE TO BE SET TO -1 FOR KILL SELF	/A029
			/........WHEN READY			/A029
	CDFPRT		/SET TO PRINTER FIELD			/A029
	DCA I	PRACTP	/SET CODE				/A029
	CDFMYF							/A029
CLEAR1,	CIFSYS		/NOT DONE.. SET TO SWAP OUT		/A029
	JSWAP		/DO IT					/A029
	CDFPRT		/PRINTER FIELD				/A029
	TAD I	PRACTP	/GET CODE				/A029
	CDFMYF							/A029
	SZA CLA		/IS PRINTER DONE?			/A029
	JMP	CLEAR1	/NO.  REPEAT				/A029
CLEAR4,	TAD	FLASKP	/CX GRAPHICS BYPASS CALL FLABUZ IN WP2CMF/C034
	JMS	SETFLA		/SET IT				/A034
	JMP I	CLEARQ		/RET					/A029
FLASKP,	SKP		/SKIP OVER FLASH BUZ CALL		/A034
PRACTP,	PRACTN		/POINTER TO PRINTER ACTION WORD		/A029
			/...SIMULATE CLOBBERING OF PREINTER FIELD/A029
			/...WITH NEW REGIS CODE.		/A029
/THE  FOLLOWING CODE IS TEMP CODE USED TO ACTUALLY KILL PRINTER JOB	/A029
/...WHEN THE FUNCTIONALITY IS PUT INTO THE PRINTER IT CAN BE DELETED	/A029
/...AND THE CODE 1 CHANGED TO -1 TO EXECUTE IT(SEE CLEARQ+1)		/A029
/
/D029	TAD	TPTR1		/LOAD POINTER TO PRJOB			/A029
/D029	CDFSYS			/SYS FIELD IS WHERE JOB STATUS BLOCKS LIVE/A029
/D029CLEAR6,	DCA	TPTR2		/SAVE IT				/A029
/D029	TAD I	TPTR2		/GET POINTER TO NEXT BLOCK		/A029
/D029	CIA			/NEGATE					/A029
/D029	TAD	TPTR1		/DOES IT POINT TO PRJOB			/A029
/D029	SNA CLA								/A029
/D029	JMP	CLEAR8		/YES WE FOUND IT			/A029
/D029	TAD I	TPTR2		/GET PTR TO NEXT			/A029
/D029	JMP	CLEAR6		/REPEAT NEXT				/A029
/D029CLEAR8,	TAD I	TPTR1		/GET POINTER IN PRJOB STATUS BLOCK	/A029
/D029	DCA I	TPTR2		/SET IT IN BLOCK POINTING TO PRJOB	/A029
/D029	DCA I	TPTR1		/CLR PNTR IN STAT BLK. (MUST FOR JSTRT)	/A029
/D029	CDFMYF								/A029
/D029	JMP I	CLEARQ		/RET					/A029
SETFLA,	0	/SET/CLEAR FLASH BUZ CALL			/A034
	CDFMNU		/WP2CMF FIELD					/A034
	DCA I	SETLOC	/SET IT						/A034
	CDFMYF								/A034
	JMP I	SETFLA	/RETURN						/A034
SETLOC,	TIMDS3	/						/A034
/D029PTR1,	PRJOB			/TEMP POINTER1				/A029
/D029TPTR2,	PRJOB			/TEMP POINTER2				/A029

/-------------------

NOPRT,	TAD	NOPPTR		/LOAD POINTER TO ERR MESSAGE		/A029
	SKP			/SET IT AND DO IT			/A029
NOBORD,	TAD	NOBPTR		/NO BOARD MESSAGE			/A029
	DCA	PRTPTR		/SET POINTER				/A029
	CIFMNU			/NEED TO BE IN MENU FLD			/A024
	JMS I	IOACAL		/GO TO THE TTY I/O ROUTINE		/A024
	0			/DON'T WANT TO WRITE OWN I/O		/A024
	PRTMSG			/CONTROL STRING TO USE FOR MESSAGE	/A040
	0100			/POSITION T0 2ND LINE BEFORE ERASING	/A024
	1505			/POSITION FOR MESSAGE			/A024
PRTPTR,	NOBMSG			/MESSAGE THAT GRFX HARDWARE ISN'T IN	/A024
	1705			/PRESS RETURN AFTER READING MESSAGE	/A024
	RETMSG			/MESSAGE PRESS RETURN TO RECALL MENU	/A040
	CDIMNU			/MENU BLOCK IS EASIER TO WAIT IN	/A024
	AC0002			/FLAG FOR WHICH MENU PATH TO USE	/A024
	DCA I	IMNTMP		/PUT FLAG WHERE MENU CAN SEE IT	/M026	/A024
	CDFMYF			/MENU NEEDS TO KNOW WHERE WE CAME FROM	/A024
	JMS I	MNUCAL		/GO TO IT				/A024
	DLM125			/NAME OF MENU BLOCK TO DO		/A024
	JMP I	IU3GMX		/TAKE GOLD MENU EXIT			/A024
IU3GMX,	CU3GMY			/DONT WANT A LINK IN MIDDLE OF MSG/A024	/C029
IMNTMP,	MUBUF+MNTMP2		/PUT FLAG WHERE MENU CAN SEE IT		/A026

NOPPTR,	PRTBSY			/MESSAGE POINTER'PRINTER BUSY'		/A029
NOBPTR,	NOBMSG			/POINTER 'NO GRAPHICS BOARD'		/A029
/-------------
SYDISK,
	IFDEF ENGLISH <
	TEXT '^P!E^P^CG&REPLACE THE SYSTEM DISKETTE IN DRIVE 0 '>	/C040
	IFDEF SPANISH <
	TEXT '^P!E^P^CG&COLOQUE EL DISKETTE SISTEMA EN LA UNI. 0 '>	/C040
	IFDEF DUTCH <
	TEXT '^P!E^P^CG&ZET DE SYSTEEMDISKETTE WEER IN AANDRIJVER 0 '>	/C040
	IFDEF ITALIAN <
	TEXT "^P!E^P^CG&METTERE DISCO SISTEMA NELL'UNIT\A 0 " >
	IFDEF V30NOR <
	TEXT '^P!E^P^CG&SETT SYSTEMDISKETTEN TILBAKE I STASJON 0  '>	/A042
	IFDEF V30SWE <
	TEXT '^P!E^P^CG&BYT UT SYSTEMDISKETTEN I ENHET 0'>
	
	*.-1


SYDIS2,
	IFDEF ENGLSH	<TEXT '^PAND PRESS !&RETURN'>			/A024
	IFDEF SPANISH	<TEXT '^PY PULSE !&RET.'>			/A024
	IFDEF DUTCH	<TEXT '^PDRUK OP !&RETURN'>			/A024
	IFDEF ITALIAN	<TEXT "^PE PREMERE !&RITORNO">
	IFDEF V30NOR	<TEXT '^POG TRYKK !&RETUR'>			/A042
	IFDEF V30SWE	<TEXT '^POCH TRYCK P\E RETUR'>		

PRGMSG,
	IFDEF ENGLSH	<
	TEXT '^P!E^P&INSTALLATION IN PROGRESS -- &PLEASE WAIT...'>	/A024
	IFDEF SPANISH	<
	TEXT '^P!E^P&INSTALACION EN CURSO -- &ESPERE...'>	/A024
	IFDEF DUTCH	<
	TEXT '^P!E^P&BEZIG MET INSTELLEREN -- &EVEN GEDULD.'>	/A024
	IFDEF ITALIAN	<
	TEXT "^P!E^P&INSTALLAZIONE IN CORSO -- &PREGO ATTENDERE...">
	IFDEF V30NOR <
	TEXT '^P!E^P&INSTALLASAJON P\EG\ER -- &VENT'>
	IFDEF V30SWE <
	TEXT '^P!E^P&INSTALLATION P\EG\ER - &V\DNTA EN STUND...'>

PRTMSG,	TEXT '^P!E^P^S^P^S^CG'	/PRINT TWO MESSAGES AND RING THE BELL	/A040
PRTBSY,
	IFDEF ENGLSH	<TEXT '&GRAPHICS CAN NOT BE USED WHILE PRINTING'>/C040
	IFDEF SPANISH	<
	TEXT '&IMPOSIBLE USAR GR\AFICOS CUANDO SE EST\A IMPRIM.'>
	IFDEF DUTCH	<TEXT '&GRAPHICS NIET MOGELIJK TIJDENS AFDRUKKEN'>/C040
	IFDEF ITALIAN	<
	TEXT "&IMPOSSIBILE UTILIZZARE &GRAFICA DURANTE LA STAMPA">
	IFDEF V30NOR <TEXT 'GRAFIKK KAN IKKE BRUKES UNDER UTSKRIVING'>	/A042
	IFDEF V30SWE <
	TEXT '&DU KAN INTE ANV\DNDA GRAFIKFUNKTIONEN N\DR UTSKRIFT P\EG\ER'>

NOBMSG,
	IFDEF ENGLSH	<
	TEXT '&GRAPHICS HARDWARE MUST BE PRESENT WHEN !&TM=&GRAPHICS'>	/C040
	IFDEF SPANISH	<
TEXT '&EL HARDWARE GR\AFICOS HA DE ESTAR PRESENTE CUANDO !&TM=&GR\AFICOS'>	/C040
	IFDEF DUTCH	<
	TEXT '!&TI=&GRAPHICS VEREIST EEN GRAFISCHE KAART'>	/C040
	IFDEF ITALIAN	<
	TEXT "&OPZIONE &GRAFICA NON PRESENTE SE !&TT=&GRAFICO">
	IFDEF V30NOR <
	TEXT '&MASKINUTSTYR FOR GRAFIKK M\E V\FRE TILKOBLET N\ER !&TM=&GRAFIKK'>
	IFDEF V30SWE <
	TEXT' &GRAFIKKORTET M\ESTE VARA INSTALLERAT N\DR!&TM=&GRAFIK'>

RETMSG,
	IFDEF ENGLSH	<
	TEXT '&PRESS !&RETURN TO RECALL THE &MAIN &MENU'>		/C040
	IFDEF SPANISH	<
	TEXT '&PULSE !&RET. PARA VOLVER AL &MEN\Z &PRINC.'>		/C040
	IFDEF DUTCH	<
	TEXT '&DRUK OP !&RETURN OM TERUG TE GAAN NAAR HET &HOOFDMENU'>		/C040
	IFDEF ITALIAN	<
	TEXT "&PREMERE !&RITORNO PER TORNARE AL &MENU &PRINCIPALE">
			>	/END IFDEF VT125R			/A024
	IFDEF V30NOR <
	TEXT '&TRYKK P\E !&RETUR FOR \E F\E &HOVEDMENYEN'>		/A042
	IFDEF V30SWE <
	TEXT '&TILLBAKA TILL HUVUDMENYN: TRYCK P\E RETUR'>

DELMSG,	TEXT '![(&^S^A![(&^S'	/ CONTROL STRING FOR GRAPHICS DISPLAY	/A040

/A044vvvvvA044vvvvvA044vvvvvA044vvvvvA044vvvvvA044vvvvvA044vvvvvA044

/
/	DECKST - CHECK FOR START OF DEAD
/
INT8BT=62			/ EIGHT BIT INTRODUCER
DECKST,	TAD	(40-ECSTOV)	/ IS THIS A START-OF-DEAD CHAR
	SZA			/ SKIP IF SO
	JMP	DECKL3		/ ELSE IGNORE CONTROL CHARACTER
/
	JMS GETNXT		/ IF S-O-D CHECK THE NEXT 2 CHARS FOR A
				/ MNC. IGNORING ALL ELSE
/
	TAD	(-ECSPC)	/ CHECK 2ND CHAR
	SZA			/ SKIP IF ITS OK
	JMP	DENOTS		/ ELSE ITS NOT AN 8 BIT CHARACTER
/
	JMS	GETNXT
/
	TAD	(-INT8BT)	/ CHECK FOR 8 BIT INTRODUCER
	SZA			/ SKIP IF OK
	JMP	DENOTI		/ ELSE ITS NOT AN 8 BIT CHARACTER
/
	JMS	GETNXT		/ GET THE 8 BIT CHARACTER
/
	TAD	(200)		/ MAKE IT REALY 8 BIT
	JMP	DEDSOU		/ AND OUTPUT IT
/
DENOTI,	TAD	(INT8BT-ECSPC)	/ REPLACE INTRODUCED VALUE
DENOTS,	TAD	(ECSPC-40)	/ REPLACE SPACE VALUE
	SPA			/ SKIP IF PRINTABLE
	JMP	DECKL3		/ ELSE IGNORE
	TAD	(40)
	JMP	DEDSOU		/ O/P CHARACATER
/
GETNXT,	XX
	CDFBUF			/ GET A CHARACTER
	TAD I	X2
	CDFMYF
	AND	P177		/ AND MASK OFF ATTS
	JMP I	GETNXT

/A044^^^^^A044^^^^^A044^^^^^A044^^^^^A044^^^^^A044^^^^^A044^^^^^A044

	PAGE

/-----------------


