/	KERMIT-12 PATCH FILE
	XLIST	OFF
	IFNDEF	OFF	<OFF=	1>
	IFNDEF	ON	<ON=	0>
	XLIST	ON

/	INDEPENDENT SOURCE FILE TO ALLOW CUSTOMIZATION OF KERMIT-12.

/	LAST EDIT:	06-SEP-1990	11:00:00	CJL

/	THIS FILE IS PROVIDED TO USERS OF KERMIT-12 TO ALLOW CUSTOMIZED VERSIONS TO BE
/	LOCALLY CREATED WITHOUT MODIFYING THE MAIN SOURCE (K12MIT.PAL).

/	CREATING KERMIT-12 FROM THE STANDARD DISTRIBUTION (AND THIS FILE).

/	KERMIT-12 IS DISTRIBUTED IN SEVERAL  FILES  WHICH  CAN  BE  USED  TO  CREATE A
/	RUNNING KERMIT-12 VIA SEVERAL METHODS.   THE  MOST  DIRECT  METHOD  IS TO JUST
/	ASSEMBLE  THE MAIN SOURCE (K12MIT.PAL) POSSIBLY AUGMENTED  BY  A  HEADER  FILE
/	CONTAINING  CUSTOMIZING PARAMETERS (PARAM.PAL), OR TO MODIFY AND  ASSEMBLE THE
/	MAIN SOURCE FILE TO PRODUCE A CUSTOMIZED RESULT.   THIS  ALSO ALLOWS FOR LOCAL
/	CHANGES TO THE SOURCE ITSELF IF NECESSARY.  THE MAIN  SOURCE  FILE  IS  RATHER
/	LARGE AND MIGHT BE DIFFICULT TO ASSEMBLE, ETC.  ON SMALL  SYSTEMS.  MOST USERS
/	OF  KERMIT-12  WILL  FIND THE STANDARD ASSEMBLY PARAMETERS SUITING THEIR LOCAL
/	REQUIREMENTS, AS  MOST USER-PREFERENCE ITEMS ARE CUSTOMIZABLE VIA THIS METHOD.
/	THE USER OF  A SMALLER SYSTEM IS ENCOURAGED TO ACQUIRE KERMIT-12 FROM A LARGER
/	SYSTEM VIA DIRECT MEDIA  COPY;    AN  ACCURATE LISTING OF KERMIT-12 WITH LOCAL
/	CUSTOMIZATION COULD THEN BE AVAILABLE.

/	SINCE IT IS NOT ALWAYS  POSSIBLE  FOR  SMALLER  INDEPENDENT  USERS  TO ACQUIRE
/	KERMIT-12  FROM OTHER INSTALLATIONS, THIS FILE  (K12PCH.PAL)  WAS  CREATED  TO
/	HANDLE  MOST  PARAMETER  SETTINGS.    VIRTUALLY  ALL  OF  THE  USER-PREFERENCE
/	PARAMETERS, ETC.  HAVE BEEN DUPLICATED HERE TO  ALLOW  INDEPENDENT ASSEMBLY OF
/	THIS FILE WHICH IS SMALL ENOUGH TO ALLOW ASSEMBLY ON MODEST SYSTEMS.

/	NOTE:  USING THE METHOD DESCRIBED BELOW ASSUMES THAT  ALL  CHANGES REQUIRED BY
/	THE USER HAVE  BEEN  UPDATED  WITHIN  K12PCH.PAL  (THIS  FILE), OR PLACED IN A
/	SEPARATE FILE (PARAM.PAL).   SEE  THE  ASSEMBLY  PARAMETERS  SECTION  FOR  ANY
/	CUSTOMIZING INFORMATION.

/	THE STANDARD DISTRIBUTION OF KERMIT-12 INCLUDES A CORE-IMAGE COPY OF K12MIT.SV
/	WITH ALL STANDARD  DEFAULT VALUES SET.  IT IS AVAILABLE AS K12MIT.ENC WHICH IS
/	A "PRINTABLE" ENCODED VERSION  OF  THE SAVE IMAGE.  ASSEMBLING AND RUNNING THE
/	DECODING PROGRAM K12DEC.PAL CAN PRODUCE K12MIT.SV FROM K12MIT.ENC.

/	ASSUMING THE AVAILABILITY OF K12MIT.SV  AND  K12PCH.PAL  ON THE DEFAULT DEVICE
/	DSK:, THE FOLLLOWING CAN BE USED TO CREATE THE RUNNING KERMIT-12:

/	.PAL K12PCH<PARAM,K12PCH/E/F/W	ASSEMBLE CUSTOMIZED PATCH FILE.

/	.LOAD K12MIT.SV/I$K12PCH$	LOAD  IMAGE FILE K12MIT.SV WITH /I SWITCH SET.
/					$ INDICATES  USING  <ESC>  TO  TERMINATE LINE.
/					K12PCH.BN IS LOADED  OVER  K12MIT TO PATCH THE
/					BINARY TO THE DESIRED LOCAL VERSION.

/	.SAVE DEV KERMIT=1		SAVE RUNNING VERSION ON  ANY  AVAILABLE DEVICE
/					DEV (PREFERABLY SYS).

/	.R KERMIT  OR  RUN DEV KERMIT	RUNNING VERSION NOW CAN BE INVOKED.
/	ASSEMBLY PARAMETERS.

/	NOTE:  EDIT NUMBERS PLACED  ON  VARIOUS  SECTIONS  OF  THIS  FILE REFER TO THE
/	CORRESPONDING EDIT NUMBERS WITHIN K12MIT.PAL.  SEE THE K12MIT.PAL EDIT HISTORY
/	FOR FURTHER INFORMATION.

/	SEVERAL PARAMETERS MUST BE CHANGED WITHIN THIS FILE (K12PCH.PAL) (OR PASSED TO
/	THE ASSEMBLER VIA A SHORT FILE INSERTED  INTO  THE  ASSEMBLY STREAM BEFORE THE
/	MAIN FILE):

/	SETTING  KEY= [RECEIVE IOT CODE FOR  CONSOLE  KEYBOARD]  DEFINES  THE  CONSOLE
/	KEYBOARD IOT CODE (DEFAULT IS 03).

/	SETTING  TTY=  [TRANSMIT  IOT CODE FOR CONSOLE  OUTPUT]  CHANGES  THE  CONSOLE
/	PRINTER IOT CODE (DEFAULT IS 04).

/	THE FOLLOWING DEFINITIONS ARE  ESSENTIALLY  FOR  KL8-TYPE DEVICES ONLY, AS THE
/	CODE DEMANDS KL8 HARDWARE COMPATIBILITY.    MODELS  OTHER  THAN PDP-8 (SUCH AS
/	DECMATE) GENERALLY EITHER PLACE RESTRICTIONS ON  AVAILABLE  INTERFACES  (OTHER
/	SOFTWARE DESIGNATES A SERIAL INTERFACE AS A  LOGICAL  PRINTER  PORT;  DECMATES
/	SUPPORT A FIRMWARE "PRINT SCREEN" KEY WHICH ENFORCES  THIS.),  OR  DON'T ALLOW
/	USABLE PLUG-IN OPTIONS.

/	IGNORING BUILT-IN DECMATE SUPPORT, THE FOLLOWING PARAMETERS ARE ACTIVE:

/	SETTING DEV30=	1	CREATES DEVICE 30/31 REMOTE LINE IOTS.

/	SETTING DEV40=	1	CREATES DEVICE 40/41 REMOTE LINE IOTS.

/	SETTING LEDERLE=1	CREATES DEVICE 43/44 REMOTE LINE  IOTS  (AND  A CUSTOM
/				HEADER).

/	SETTING ORIGNAL=1	CREATES  DEVICE  33/34  REMOTE  LINE  IOTS   (ORIGINAL
/				SETTINGS).

/	SETTING SPRINT= 1	CREATES DEVICE 32/33 REMOTE LINE IOTS (SERIAL  PRINTER
/				PORT).

/	SETTING USER=	1	CREATES DEVICE XX/XY REMOTE LINE IOTS.

/	IF NONE OF THESE ARE SET, THEN DEV40=1 APPLIES BY DEFAULT.



/	SETTING USER=	1	REQUIRES THE USER TO DEFINE TWO ADDITIONAL VALUES:

/		XX=	[RECEIVE IOT DEVICE CODE] (DEFAULT IS 40).

/		XY=	[TRANSMIT IOT DEVICE CODE] (DEFAULT IS 41).
/	SETTING SPRINT= 1	INHIBITS THE BUILT-IN CHECK FOR DECMATE  OPERATION AND
/				USES    THE    SERIAL  PRINTER  PORT  FOUND  ON    ALL
/				WPS-8-CONFIGURED    PDP-8/E,  PDP-8/A  CONFIGURATIONS,
/				VT-78,  AND  ALL DECMATES (VT-278,  DECMATE  II,  III,
/				III+) FOR REMOTE COMMUNICATIONS.

/	THE  USE OF THE SERIAL PRINTER PORT FOR REMOTE COMMUNICATIONS PURPOSES MAY  BE
/	PROBLEMATIC DUE TO CONSIDERATIONS SUCH AS THE RS-232 CONNECTION TO THE PRINTER
/	IS A  MODEM  (DCE), RATHER THAN A TERMINAL (DTE) (DECMATE II, ETC.  REQUIRES A
/	GENDER CHANGER.), OR  THE SOFTWARE DESIGNATION OF THE PORT AS BEING ALLEDGEDLY
/	*ONLY* FOR A PRINTER,  SUCH AS WHEN CERTAIN SYSTEMS SUPPORT THE "PRINT SCREEN"
/	KEY AS A SCREEN DUMP  TO  THE  SERIAL PRINTER PORT, ETC.  THESE ISSUES ARE NOT
/	RELEVANT TO KERMIT-12 OPERATION, AS THE "PRINT SCREEN" KEY IS NOT SUPPORTED BY
/	KERMIT-12 IN THIS CONFIGURATION AS SUCH (FUTURE  VERSIONS  COULD  REDEFINE THE
/	"PRINT SCREEN" KEY TO SUCH FUNCTIONS AS DUMP SCREEN TO A FILE, ETC.).

/	SETTING BRATE= NN	SETS THE DEFAULT BAUD RATE (FOR  SYSTEMS  THAT SUPPORT
/				THIS  FEATURE)  FROM  A  TABLE  OF  VALUES  (0-15)  AS
/				FOLLOWS:

/				NN		BAUD RATE

/				00		50
/				01		75
/				02		110
/				03		134.5
/				04		150
/				05		300
/				06		600
/				07		1200
/				08		1800
/				09		2000
/				10		2400
/				11		3600
/				12		4800
/				13		7200
/				14		9600
/				15		19200

/	SETTING ESCAPE=	NNNN	SETS THE DEFAULT ESCAPE CHARACTER TO NNNN.

/	SETTING FLOW=	1	ENABLES FLOW-CONTROL BY DEFAULT.
/	SETTING FLOW=	0	DISABLES FLOW-CONTROL BY DEFAULT.

/	SETTING FMODE=	0177	SETS THE DEFAULT FILE MODE TO ASCII.
/	SETTING FMODE=	4377	SETS THE DEFAULT FILE MODE TO BINARY.
/	SETTING GENMSG=	0	CAUSES  NO  BINARY  TO BE GENERATED WHERE 'LCLMSG'  IS
/				DEFINED.  THIS ALLOWS THE PARAMETER FILE (PARAM.PA) OR
/				SUBSEQUENT OVERLAY  BY  K12PCH.BN  TO DEFINE THE LOCAL
/				HEADER MESSAGE.   THIS  PARAMETER  SHOULD  NOT  BE SET
/				UNLESS ONE OF THESE  METHODS  IS USED, ELSE THE HEADER
/				MESSAGE  WILL  BE UNDEFINED.   (NOTE:    IF  K12PCH.BN
/				GENERATES  A  HEADER MESSAGE, THEN THIS  PARAMETER  IS
/				UNIMPORTANT,  AS  K12PCH.BN  OVERLAYS  THE  BINARY  OF
/				K12MIT.)
/	SETTING GENMSG=	1	CAUSES A HEADER MESSAGE TO BE GENERATED.  THE CONTENTS
/				OF  THE  MESSAGE  ARE  CREATED BY SETTING LEDERLE=1 OR
/				UMSG=1.    IF EITHER IS ZERO, A DEFAULT (NULL) MESSAGE
/				WILL BE GENERATED.

/	SETTING ICLOSE=	1	ENSURES A  <^Z>  AT  <EOF>  OF  ASCII  INPUT  FILES BY
/				DEFAULT.
/	SETTING ICLOSE=	0	CLOSES ASCII INPUT FILES AS RECEIVED BY DEFAULT.

/	SETTING INIECHO=0	CAUSES A FULL-DUPLEX  CONNECT MODE STATE WITH NO LOCAL
/				CHARACTER ECHOING BY DEFAULT.
/	SETTING INIECHO=1	CAUSES A HALF-DUPLEX CONNECT  MODE  STATE  WITH  LOCAL
/				ECHO OF ALL CONSOLE CHARACTERS BY DEFAULT.

/	SETTING LOWER=	0	ALLOWS LOWER-CASE CONSOLE OUTPUT BY DEFAULT.
/	SETTING LOWER=	-40	FOLDS  LOWER-CASE  CONSOLE  OUTPUT  TO  UPPER-CASE  BY
/				DEFAULT.

/	SETTING OCLOSE=	0	PREVENTS  DEFAULT SENDING OF <^Z> AT  <EOF>  OF  ASCII
/				FILES.
/	SETTING OCLOSE=	1	CAUSES  <^Z> TO BE SENT AT <EOF>  OF  ASCII  FILES  BY
/				DEFAULT.

/	SETTING PORT=	0	CAUSES THE DP-278 PORT 0 TO BE USED  IF  KERMIT-12  IS
/				RUN ON A DECMATE 1 (ASSUMING SPRINT=0).
/	SETTING PORT=	1	CAUSES  THE DP-278 PORT 1 TO BE USED IF  KERMIT-12  IS
/				RUN ON A DECMATE 1 (ASSUMING SPRINT=0).

/	SETTING RETCNT=	NNNN	SETS THE PACKET RETRY COUNT TO NNNN BY DEFAULT.

/	SETTING UMSG=	0	PREVENTS THE  LOCAL  USER  HEADER  MESSAGE  FROM BEING
/				GENERATED.
/	SETTING UMSG=	1	CAUSES THE LOCAL  USER HEADER MESSAGE TO BE GENERATED.
/				THE PARAMETER GENMSG=1 IS  REQUIRED  TO  BE  SET.  THE
/				SOURCE MUST BE MODIFIED LOCALLY  TO CHANGE THE MESSAGE
/				TEXT FROM "INSERT LOCAL USER MESSAGE  HERE!,"  AS THIS
/				IS THE DEFAULT CONTENTS.
/	PASSING SHORT PARAMETER FILES.

/	WHEN INSERTING A SHORT USER MODIFICATION FILE IN THE INPUT STREAM  (PARAM.PAL)
/	THE FOLLOWING SHOULD BE NOTED:

/	ALWAYS  PUT  THE  SHORT  PARAMETER  FILE  (CONTAINING EQUATED SYMBOLS SUCH  AS
/	USER=1, ETC.) IN FRONT OF K12PCH.PAL.

/	IF TTY:  IS USED FOR DIRECT TYPE-IN OF THESE  PARAMETERS, THE INFORMATION NEED
/	ONLY BE TYPED ENDING WITH <^Z> DURING PASS 1.  SUBSEQUENT  PASSES  REQUIRE THE
/	ENDING <^Z> ONLY.  IF THIS METHOD IS USED, A LISTING WITHOUT  THE  USER  INPUT
/	WHICH  DID THE CUSTOMIZING OF KERMIT-12 CAN BE CREATED.  NOTE:  IF  BINARY  IS
/	GENERATED BY THE CONTENTS OF THE PARAMETER FILE (SUCH AS USE OF THE LOCAL TEXT
/	MESSAGE,  ETC.),  THE  INFORMATION MUST BE TYPED IN DURING PASS 2.  THE PASS 3
/	LISTING MAY  CONTAIN  THE INFORMATION IF SO DESIRED, REQUIRING A REPETITION OF
/	THE INPUT.   PASS  1  INPUT  OF  THE INFORMATION IS EFFECTIVELY IGNORED, AS NO
/	DEFINITIONS ARE CREATED ('LCLMSG' IS DEFINED ELSEWHERE, ETC.).

/	EXPERIENCED PDP-8 USERS NEW TO PAL8 VERSION B0 TAKE SPECIAL NOTICE:

/	DUE TO HARDWARE LIMITATIONS OF THE DECMATES, THE KEYBOARD FLAG WILL BE CLEARED
/	DURING PDP-8 PAL8 B0 OPERATION.  THE KL8E TTY:  HANDLER WILL NO LONGER BE ABLE
/	TO BUFFER <^Z> DURING THE ASSEMBLY;  YOU MUST  WAIT UNTIL THE HANDLER ACCESSES
/	THE KEYBOARD ON EACH PASS *THEN* PRESS <^Z> TO CONTINUE THE ASSEMBLY.


/	CREATING A CUSTOM MESSAGE FROM THE PARAMETER FILE.

/	IF  SO  DESIRED,  A CUSTOM LOCAL HEADER MESSAGE MAY BE ADDED BY INSERTING  THE
/	FOLLOWING INTO THE PARAMETER FILE:

/	BUFFLD=	10		/THESE PROBABLY
/	FILBUFF=2000		/WON'T CHANGE!

/	GENMSG=	0		/DON'T GENERATE STANDARD (NULL) MESSAGE
/	UMSG=	0		/DON'T GENERATE STANDARD (DUMMY) USER MESSAGE

/	FIELD	BUFFLD%10	/FIELD FOR TEXT MESSAGE

/	*FILBUFFER		/LOCAL MESSAGE LOADS THERE

/LCLMSG,TEXT	"%^I^NSERT ^L^OCAL ^M^ESSAGE ^H^ERE!%"

/	ZBLOCK	LCLMSG+40-.	/ZERO REST OF MESSAGE AREA

/	TEXT IS IN  UPPER/LOWER-CASE  SIXBIT  WITH  '^'  MEANING SHIFT CASE (INITIALLY
/	LOWER-CASE) AND '%' MEANING <CR>, <LF>.
/	MAINTAINING THIS PATCH FILE.

/	IF ANY CHANGES ARE MADE TO K12MIT.PAL ITSELF WHICH MIGHT AFFECT THIS FILE, THE
/	GLOBAL  TECO MACRO (K12GLB.TEC AKA GLOBAL.TEC) SHOULD BE USED TO  RESOLVE  ALL
/	EXTERNAL  REFERENCES  TO ROUTINES, ETC.  IN K12MIT.PAL.  TO UPDATE  THIS  FILE
/	(K12PCH.PAL), THE FOLLOWING METHOD IS REQUIRED:

/	.PAL ,K12MIT<DEV:K12MIT/E/F/N/W		CREATE "SYMBOLS" LISTING FILE ON DSK:
/	.MUNG K12GLB.TEC,K12PCH			UPDATE THIS FILE ON DSK:

/	N.B., DSK:K12PCH.PAL WILL BE UPDATED *WITH NO BACKUP*.  DSK:EQUATE.TMP WILL BE
/	CREATED AS  AN  ARTIFACT.  IT CONTAINS THE ACTUAL EQUATE STATEMENTS WHICH WERE
/	UPDATED IN K12PCH.PAL.

/	THIS  WILL  MODIFY  THE EQUATED SYMBOLS BELOW IN THE SPECIALLY DELIMITED AREA.
/	ONLY EQUATED SYMBOLS (AND ANY WHITESPACE) SHOULD BE PLACED BETWEEN THE SPECIAL
/	DELIMITERS:  "<CR><LF>//"  WHICH  ARE  USED  BY THE MACRO TO LOCATE THE GLOBAL
/	EQUATES TO UPDATE.

/	AS NEW FEATURES ARE ADDED/(DELETED) IN K12MIT.PAL, THE APPROPRIATE DEFINITIONS
/	AND CONDITIONAL ASSEMBLY PARAMETERS SHOULD  BE  ADDED  TO  BOTH K12MIT.PAL AND
/	K12PCH.PAL FOR CONSISTENCY AND USER FLEXIBILITY.
/	DEFINITIONS.							/017 CJL

/	REMOTE LINE PARAMETERS; SET ONLY ONE AS NECESSARY.		/046 CJL

	IFNDEF	DEV30	<DEV30=	0>		/USE DEVICE 30/31 VALUES
	IFNDEF	DEV40	<DEV40=	0>		/USE DEVICE 40/41 VALUES
	IFNDEF	LEDERLE	<LEDERLE=0>		/USE LEDERLE LABS VALUES
	IFNDEF	ORIGNAL	<ORIGNAL=0>		/USE ORIGINAL VALUES
	IFNDEF	SPRINT	<SPRINT=0>		/USE DEVICE 32/33 VALUES
	IFNDEF	USER	<USER=	0>		/USE USER-DEFINED VALUES

	REMOTE=	DEV30+DEV40+LEDERLE+ORIGNAL	/SET REMOTE LINE IOT CODE
	REMOTE=	REMOTE+SPRINT+USER		/SET REMOTE LINE IOT CODE

	IFZERO	REMOTE	<DEV40=	1>		/DEFAULT TO DEVICE 40/41 VERSION

/	DEV30 PARAMETERS.

	IFNZRO	DEV30			<

	IFNDEF	REC	<REC=	30>		/DEVICE 30 INPUT
	IFNDEF	SEN	<SEN=	31>		/DEVICE 31 OUTPUT

					>

/	DEV40 PARAMETERS (DEFAULT).

	IFNZRO	DEV40			<

	IFNDEF	REC	<REC=	40>		/DEVICE 40 INPUT
	IFNDEF	SEN	<SEN=	41>		/DEVICE 41 OUTPUT

					>

/	LEDERLE PARAMETERS.						/038 CJL

	IFNZRO	LEDERLE			<

	IFNDEF	REC	<REC=	43>		/DEVICE 43 INPUT
	IFNDEF	SEN	<SEN=	44>		/DEVICE 44 OUTPUT
	IFNDEF	GENMSG	<GENMSG=1>		/GENERATE LOCAL HEADER MESSAGE
	IFNDEF	UMSG	<UMSG=	0>		/DON'T GENERATE USER MESSAGE

					>

/	ORIGNAL PARAMETERS.

	IFNZRO	ORIGNAL			<

	IFNDEF	REC	<REC=	33>		/DEVICE 33 INPUT
	IFNDEF	SEN	<SEN=	34>		/DEVICE 34 OUTPUT

					>
/	SPRINT PARAMETERS.						/046 CJL

	IFNZRO	SPRINT			<

	IFNDEF	REC	<REC=	32>		/DEVICE 32 INPUT
	IFNDEF	SEN	<SEN=	33>		/DEVICE 33 OUTPUT

					>

/	USER PARAMETERS.

	IFNZRO	USER			<

	IFNDEF	XX	<XX=	40>		/DEFAULT TO DEVICE 40
	IFNDEF	XY	<XY=	41>		/DEFAULT TO DEVICE 41
	IFNDEF	REC	<REC=	XX>		/DEVICE XX INPUT
	IFNDEF	SEN	<SEN=	XY>		/DEVICE XY OUTPUT
	IFNDEF	GENMSG	<GENMSG=1>		/GENERATE LOCAL HEADER MESSAGE
	IFNDEF	UMSG	<UMSG=	1>		/GENERATE USER MESSAGE

					>

/	REMOTE LINE IOT DEFINITIONS.

/	RECEIVE DEFINITIONS.

	RKRBIOT=REC^10+6006			/READ REMOTE, CLEAR FLAG
	RKSFIOT=REC^10+6001			/SKIP ON REMOTE INPUT FLAG

/	TRANSMIT DEFINITIONS.

	RSBIOT=	SEN^10+6003			/SET BAUD RATE FROM AC[8-11]
	RTLSIOT=SEN^10+6006			/TRANSMIT CHARACTER, CLEAR FLAG
	RTSFIOT=SEN^10+6001			/SKIP ON TRANSMIT FLAG

/	CONSOLE TTY: DEFINITIONS.					/017 CJL

/	KEYBOARD DEFINITIONS.						/017 CJL

	IFNDEF	KEY	<KEY=	03>	/KEYBOARD DEVICE CODE

	KCCIOT=	KEY^10+6002		/CLEAR CONSOLE KEYBOARD FLAG, AC
	KRBIOT=	KEY^10+6006		/READ CONSOLE KEYBOARD BUFFER, CLEAR FLAG
	KRSIOT=	KEY^10+6004		/READ CONSOLE KEYBOARD BUFFER STATIC
	KSFIOT=	KEY^10+6001		/SKIP ON CONSOLE KEYBOARD FLAG

/	TELEPRINTER DEFINITIONS.					/017 CJL

	IFNDEF	TTY	<TTY=	04>	/TELEPRINTER DEVICE CODE

	TLSIOT=	TTY^10+6006		/PRINT CHARACTER, CLEAR FLAG
	TSFIOT=	TTY^10+6001		/SKIP ON TELEPRINTER FLAG
/	DEFAULT ESCAPE CHARACTER DEFINITION.				/025 CJL

	IFNDEF	ESCAPE	<ESCAPE="]&37>	/DEFAULT IS CONTROL-]

/	DEFAULT LOWER-CASE ENABLE DEFINITION.				/030 CJL

	IFNDEF	LOWER	<LOWER=	0/-40>	/LOWER-CASE IS ALLOWED AS IS
					/CHANGE TO -40 IF LOWER-CASE
					/SHOULD BE FOLDED TO UPPER-CASE

/	DEFAULT RETRY COUNT DEFINITION.					/031 CJL

	IFNDEF	RETCNT	<RETCNT=5>	/DEFAULT IS FIVE RETRIES

/	DEFAULT FILE MODE DEFINITION.					/031 CJL

	IFNDEF	FMODE	<FMODE=	0177>	/DEFAULT IS ASCII FILE MODE
					/4377 IS BINARY FILE MODE

/	DEFAULT FLOW-CONTROL MODE DEFINITION.				/031 CJL

	IFNDEF	FLOW	<FLOW=	1>	/DEFAULT IS FLOW-CONTROL ENABLED

/	DEFAULT ASCII INPUT FILE <^Z> DISPOSITION.			/031 CJL

	IFNDEF	ICLOSE	<ICLOSE=1>	/ENSURE <^Z> AT ASCII <EOF>

/	DEFAULT ASCII OUTPUT FILE <^Z> DISPOSITION.			/031 CJL

	IFNDEF	OCLOSE	<OCLOSE=0>	/<^Z> NOT SENT AT ASCII <EOF>

/	DEFAULT LOCAL MESSAGE GENERATION DEFINITIONS.			/038 CJL

	IFNDEF	GENMSG	<GENMSG=1>	/DEFAULT IS TO GENERATE A MESSAGE
	IFNDEF	UMSG	<UMSG=	0>	/DEFAULT IS NO DUMMY USER MESSAGE
	IFNDEF	LEDERLE	<LEDERLE=0>	/DEFAULT IS NO LEDERLE MESSAGE

/	THE NULL MESSAGE WILL BE GENERATED BY DEFAULT.

/	ECHO DEFINITION.						/039 CJL

	IFNDEF	INIECHO	<INIECHO=0>	/DEFUALT IS NO LOCAL ECHO

/	DEFAULT DECMATE I PORT DEFINITION.				/050 CJL

	IFNDEF	PORT	<PORT=	0>	/DEFAULT IS PORT ZERO 

/	DEFAULT BAUD RATE DEFINITION.					/050 CJL

	IFNDEF	BRATE	<BRATE=	7>	/DEFAULT IS 1200 BAUD

//	GLOBAL EQUATED SYMBOLS FROM K12MIT.PAL.

	BUFFLD=	0010		/I/O BUFFER FIELD
	CMOUT4=	0712		/REMOTE OUTPUT WRITE
	CONTLS=	5701		/CONSOLE OUTPUT WRITE
	CONTSF=	5677		/CONSOLE OUTPUT TEST
	COUTINI=6601		/CONSOLE OUTPUT WRITE
	DAYMSG=	2145		/DAY MESSAGE
	DIRXR=	0012		/DIRECTORY AUTO-INDEX
	ECHOFLA=5153		/ECHO FLAG
	ESCHAR=	0101		/ESCAPE CHARACTER
	FILBUFF=2000		/FILE BUFFER
	FILMODE=0075		/INTERNAL FILE MODE FLAG
	FLOWFLA=0102		/FLOW CONTROL FLAG
	ICTLZFL=4033		/INPUT <^Z> FLAG
	INMSG2=	2242		/INITIAL MESSAGE
	INMSG3=	2243		/INITIAL MESSAGE
	INREAD=	0640		/REMOTE INPUT READ
	INSKIP=	0636		/REMOTE INPUT SKIP
	KCCZAP=	6501		/CONSOLE INPUT CLEAR
	KCCZP2=	6546		/CONSOLE INPUT CLEAR
	KGTEST=	5250		/CONSOLE INPUT TEST
	KGREAD=	5252		/CONSOLE INPUT READ
	KRSZAP=	6472		/CONSOLE KEYBOARD READ
	KSFLOC=	6470		/CONSOLE KEYBOARD SKIP
	LCLMSG=	2000		/LOCAL USER MESSAGE
	MONMSG=	2246		/MONTH MESSAGE
	MSGFLD=	0010		/TEXT MESSAGE FIELD
	NOWAIT=	0705		/REMOTE OUTPUT SKIP
	OCTLZFL=3762		/OUTPUT <^Z> FLAG
	PRGFLD=	0000		/PROGRAM FIELD
	P7TLS=	6540		/CONSOLE OUTPUT WRITE
	P7TSF=	6536		/CONSOLE OUTPUT TEST
	RATE=	0007		/BAUD RATE
	REMTLS=	5726		/REMOTE OUTPUT WRITE
	REMTSF=	5724		/REMOTE OUTPUT TEST
	RETRY=	0033		/RETRY COUNT
	RININIT=6613		/REMOTE INPUT READ
	RINREAD=5505		/REMOTE INPUT READ
	RINTEST=5503		/REMOTE INPUT TEST
	ROUTINI=6612		/REMOTE OUTPUT WRITE
	UPONLY=	0076		/UPPER-CASE ONLY FLAG
	YEARMSG=2274		/YEAR MESSAGE

//	END OF GLOBAL SYMBOLS FROM K12MIT.PAL
/	EQUATED SYMBOLS.

	NL7777=	CLA CMA		/LOAD AC WITH 7777
/	STATIC DATE CALCULATIONS.					/024 CJL

/	THESE EQUATIONS CAUSE PRINTABLE  TEXT OF THE DATE PARTICULARS, WHICH ARE GIVEN
/	IN OS/8 INTERNAL FORMAT.  PROGRAM MAINTAINENCE REQUIRES THE UPDATE OF VERSION,
/	REVISION, REVDATE, AND REVDGRP.  REVDATE  AND  REVDGRP SHOULD BE OBTAINED FROM
/	THE SYSTEM WHEN RELEASING A NEW VERSION  AFTER  FIRST  CORRECTLY  INVOKING THE
/	SYSTEM DATE COMMAND.

/	VERSION=[ANY NUMBER IN THE RANGE 00-143 (DECIMAL 00-99)]

/	REVISIO=[ANY SIX-BIT ALPHA (A-Z); DO NOT FORGET &77]

/	REVDATE=[THE CONTENTS OF 17666 (DATE WORD)]

/	REVDGRP=[THE CONTENTS OF 07777 (ONLY BITS[3-4] ARE USED)]



	IFNDEF	REVDATE	<REVDATE=4464>	/REVISION DATE (LOCATION 17666)

	IFNDEF	REVDGRP	<REVDGRP=0400>	/REVISION 8 YEAR DATE GROUP (LOCATION 07777)

	IFNDEF	REVISIO	<REVISIO="G&77>	/REVISION OF KERMIT-12

	IFNDEF	VERSION	<VERSION=12>	/VERSION OF KERMIT-12


	DAY=	REVDATE&370%10		/REVISION DAY

	DGROUP=	REVDGRP&600%20		/REVISION DATE GROUP (WHICH 8 YEARS)

	MONTH=	REVDATE&7400%400	/REVISION MONTH

	YEAR=	REVDATE&7+DGROUP+106	/REVISION YEAR (SINCE 1900)
/	PATCHED LOCATIONS.

	FIELD	PRGFLD%10	/OVER MAIN PROGRAM CODE

	*RATE			/OVER BAUD RATE VALUE

RATE,	BRATE			/BAUD RATE VALUE			/050 CJL

	*RETRY			/OVER PACKET ERROR RETRY COUNTER

RETRY,	-RETCNT			/PACKET ERROR RETRY COUNTER		/031 CJL

	*FILMODE		/OVER INTERNAL FILE MODE FLAG

FILMODE,FMODE			/ASCII=0177, BINARY=4377		/019 CJL

	*UPONLY			/OVER UPPER-CASE ONLY FLAG

/	UPPER-CASE ONLY FLAG.						/023 CJL

UPONLY,	LOWER			/0=UPPER/LOWER CASE, -40=UPPER-CASE ONLY/030 CJL

	*ESCHAR			/OVER ESCAPE CHARACTER FOR CONNECT MODE

/	ESCAPE CHARACTER FOR CONNECT MODE.				/025 CJL

ESCHAR,	ESCAPE			/ESCAPE CHARACTER FOR CONNECT MODE	/025 CJL

	*FLOWFLAG		/OVER FLOW CONTROL FLAG

/	FLOW CONTROL FLAG.						/026 CJL

FLOWFLA,FLOW			/0=NO FLOW CONTROL, NON-ZERO=FLOW	/026 CJL
				/CONTROL VIA <^S>/<^Q>
/	I/O PATCHES.

/	REMOTE LINE (NON-CONNECT) PATCHES.

/	INPUT ROUTINE PATCHES.

	*INSKIP			/OVER REMOTE INPUT SKIP

INSKIP,	RKSFIOT			/FLAG UP YET?				/049 CJL

	*INREAD			/OVER REMOTE INPUT READ

INREAD,	RKRBIOT			/GET THE CHARACTER			/049 CJL

/	OUTPUT ROUTINE PATCHES.

	*NOWAIT			/OVER REMOTE OUTPUT SKIP

NOWAIT,	RTSFIOT			/OUTPUT FLAG UP?			/049 CJL

	*CMOUT4			/OVER REMOTE OUTPUT WRITE

CMOUT4,	RTLSIOT			/YES, OUTPUT THE CHARACTER NOW		/049 CJL

/	INITIALIZATION PATCHES.

	*DIRXR			/OVER DECMATE I PORT SELECT

DIRXR,	PORT			/DECMATE I PORT SELECT VALUE		/050 CJL

	*ROUTINITIALIZE		/OVER REMOTE OUTPUT WRITE

ROUTINI,RTLSIOT			/INITIALIZE REMOTE OUTPUT		/046 CJL

	*RININITIALIZE		/OVER REMOTE INPUT READ

RININIT,RKRBIOT			/INITIALIZE REMOTE INPUT		/046 CJL
/	CONSOLE (NON-CONNECT) PATCHES.

/	INPUT ROUTINE PATCHES.

	*KSFLOC			/OVER CONSOLE INPUT ROUTINE

KSFLOC,	KSFIOT			/SKIP ON KEYBOARD FLAG			/023 CJL

	*KRSZAP			/OVER CONSOLE INPUT ROUTINE

KRSZAP,	KRSIOT			/READ KEYBOARD BUFFER			/023 CJL

	*KCCZAP			/OVER CONSOLE INPUT ROUTINE

KCCZAP,	KCCIOT			/CLEAR KEYBOARD FLAG			/023 CJL

	*KCCZP2			/OVER CONSOLE INPUT ROUTINE

KCCZP2,	KCCIOT			/CLEAR KEYBOARD FLAG, AC		/023 CJL

/	OUTPUT ROUTINE PATCHES.

	*P7TSF			/OVER CONSOLE OUTPUT ROUTINE

P7TSF,	TSFIOT			/TEST IF OUTPUT READY			/023 CJL

	*P7TLS			/OVER CONSOLE OUTPUT ROUTINE

P7TLS,	TLSIOT			/OUTPUT THE CHARACTER			/023 CJL

/	INITIALIZATION PATCH.

	*COUTINIALIZE		/OVER CONSOLE INITIALIZE

COUTINI,TLSIOT			/INITIALIZE CONSOLE OUTPUT FLAG		/046 CJL
/	CONNECT ROUTINE PATCHES.

	*KGTEST			/OVER KEYBOARD TEST

KGTEST,	KSFIOT			/SKIP ON KEYBOARD FLAG			/047 CJL

	*KGREAD			/OVER KEYBOARD READ

KGREAD,	KRBIOT			/READ KEYBOARD BUFFER, CLEAR FLAG	/047 CJL

	*CONTSF			/OVER CONSOLE OUTPUT TEST

CONTSF,	TSFIOT			/SKIP ON CONSOLE OUTPUT FLAG		/047 CJL

	*CONTLS			/OVER CONSOLE OUTPUT WRITE

CONTLS,	TLSIOT			/OUTPUT TO CONSOLE			/047 CJL

	*RINTEST		/OVER REMOTE TEST

RINTEST,RKSFIOT			/SKIP ON REMOTE INPUT FLAG		/047 CJL

	*RINREAD		/OVER REMOTE READ

RINREAD,RKRBIOT			/READ REMOTE CHARACTER			/047 CJL

	*REMTSF			/OVER REMOTE OUTPUT TEST

REMTSF,	RTSFIOT			/SKIP ON REMOTE OUTPUT FLAG		/047 CJL

	*REMTLS			/OVER REMOTE OUTPUT WRITE

REMTLS,	RTLSIOT			/OUTPUT TO REMOTE			/047 CJL

/	ADDITIONAL PATCHES.

	*OCTLZFLAG		/OVER ASCII OUTPUT FILE <^Z> FLAG

/	ASCII FILE MODE <^Z> OUTPUT DISPOSITION FLAG.

OCTLZFL,OCLOSE			/ZERO=DON'T SEND <^Z> AT <EOF>,
				/NON-ZERO=SEND <^Z> AT <EOF>

	*ICTLZFLAG		/OVER ASCII INPUT FILE <^Z> FLAG

/	ASCII FILE MODE <^Z> INPUT DISPOSITION FLAG.

ICTLZFL,ICLOSE			/ZERO=DON'T ENSURE <^Z> IN FILE, NON-ZERO=PACK <^Z>
				/IF LAST CHARACTER WASN'T <^Z>

	*ECHOFLAG		/OVER ECHO FLAG

ECHOFLA,INIECHO			/0=DON'T ECHO, NON-ZERO=ECHO
/	ONCE-ONLY TEXT MESSAGES.					/024 CJL

	FIELD	BUFFLD%10		/FILE I/O BUFFER FIELD

	*FILBUFFER			/OVER FILE I/O BUFFER

/	LOCAL PREFERENCE MESSAGE.					/024 CJL

/	USE SOMETHING APPROPRIATE HERE TO CUSTOMIZE KERMIT-12 TO YOUR MACHINE.

/	THIS LOCATION SHOULD BE MAINTAINED SINCE IT IS DOCUMENTED TO BE HERE.

	XLIST	OFF
	IFZERO	GENMSG			<
	XLIST	ON
LCLMSG,	*LCLMSG+40			/EMPTY HOLE FOR USER MESSAGE	/039 CJL

	XLIST	OFF			>
	IFNZRO	GENMSG			<
	IFNZRO	LEDERLE		<
	XLIST	ON
LCLMSG,	TEXT	"%^T^HANKS TO: ^B^ILL ^S^MITH AND ^D^INGER ^M^ILLER%"

	XLIST	OFF		>
	IFNZRO	UMSG		<
	XLIST	ON
LCLMSG,	TEXT	"%^I^NSERT LOCAL USER MESSAGE HERE!%^"

	XLIST	OFF		>
	IFZERO	LEDERLE!UMSG	<
	XLIST	ON
LCLMSG,	TEXT	"^^^^^^^^^^^^^^^^^^^^^^"/DEFAULT IS NO MESSAGE

	XLIST	OFF		>
	IFNZRO	LCLMSG+40-.	<
	XLIST	ON
	ZBLOCK	LCLMSG+40-.		/LEAVE PATCHING SPACE

	XLIST	OFF		>
					>
	XLIST	ON
	*DAYMSG				/OVER DAY OF THE MONTH MESSAGE

DAYMSG,	DAY%12^66+DAY+6060		/DAY MESSAGE

	*INMSG2				/OVER INITIAL MESSAGE

INMSG2,	VERSION%12^66+VERSION+6060	/VERSION DIGITS

	*INMSG3				/OVER INITIAL MESSAGE

INMSG3,	"^^100+REVISION			/REVISION

	*MONMSG				/OVER MONTH MESSAGE

	XLIST	OFF
	IFZERO	MONTH-1		<
	XLIST	ON
MONMSG,	TEXT	"^J^ANUARY ^"		/MONTH MESSAGE
	XLIST	OFF		>
	IFZERO	MONTH-2		<
	XLIST	ON
MONMSG,	TEXT	"^F^EBRUARY "		/MONTH MESSAGE
	XLIST	OFF		>
	IFZERO	MONTH-3		<
	XLIST	ON
MONMSG,	TEXT	"^M^ARCH ^"		/MONTH MESSAGE
	XLIST	OFF		>
	IFZERO	MONTH-4		<
	XLIST	ON
MONMSG,	TEXT	"^A^PRIL ^"		/MONTH MESSAGE
	XLIST	OFF		>
	IFZERO	MONTH-5		<
	XLIST	ON
MONMSG,	TEXT	"^M^AY ^"		/MONTH MESSAGE
	XLIST	OFF		>
	IFZERO	MONTH-6		<
	XLIST	ON
MONMSG,	TEXT	"^J^UNE "		/MONTH MESSAGE
	XLIST	OFF		>
	IFZERO	MONTH-7		<
	XLIST	ON
MONMSG,	TEXT	"^J^ULY "		/MONTH MESSAGE
	XLIST	OFF		>
	IFZERO	MONTH-10	<
	XLIST	ON
MONMSG,	TEXT	"^A^UGUST "		/MONTH MESSAGE
	XLIST	OFF		>
	IFZERO	MONTH-11	<
	XLIST	ON
MONMSG,	TEXT	"^S^EPTEMBER ^"		/MONTH MESSAGE
	XLIST	OFF		>
	IFZERO	MONTH-12	<
	XLIST	ON
MONMSG,	TEXT	"^O^CTOBER ^"		/MONTH MESSAGE
	XLIST	OFF		>
	IFZERO	MONTH-13	<
	XLIST	ON
MONMSG,	TEXT	"^N^OVEMBER "		/MONTH MESSAGE
	XLIST	OFF		>
	IFZERO	MONTH-14	<
	XLIST	ON
MONMSG,	TEXT	"^D^ECEMBER "		/MONTH MESSAGE
	XLIST	OFF		>
	IFNZRO	MONMSG+7-.	<
	XLIST	ON

	ZBLOCK	MONMSG+7-.		/EMPTY SPACE FOR ALIGNMENT

	XLIST	OFF		>
	XLIST	ON

	*YEARMSG			/OVER YEAR MESSAGE

YEARMSG,TEXT	"19"			/YEAR MESSAGE
	YEAR%12^66+YEAR+6060		/YEAR DIGITS

/	END OF PATCH FILE.

	$				/THAT'S ALL FOLK!
