	.TITLE	INIT
	.IDENT	/BL1.0/
	.if ndf	$VMS
	.if df rt11
	.mcall	.date
	.endc
	.if ndf	rt11
	.MCALL	GTIM$S
	.endc
	.endc
;
;	Routine to initialize all the variables
;	and the FLAG set up routines
;
;
	.CONST
CLRTAB:	.WORDA	FOTBF
	.WORDA	TTLBF
	.WORDA	STLBF
	.WORDA	INXBF
	.WORDA	IFBF	; Buffers to clear
	.WORDA	TXDBF
	.WORDA	IBUF1
	.WORDA	ESCBF
	.WORDA	0
;
;	This is a list of variables that have SW.DIS set
;
DISTAB:	.WORDA	$PERSW
	.WORDA	$HSPSW
	.WORDA	$KEEPT
	.WORDA	$CONT
	.WORDA	0	; Bytes to set to SW.DIS
;
;	DEFAULT FLAG TABLE
;		+FL.DIS = Flag disabled
;
FLTAB:	.WORDA	UNDSC		; FLAG ACCEPT
	.WORDA	bra+FL.DIS	; FLAG CAPITALIZE ENABLE
	.WORDA	ampers		; UNDERLINE SWITCH
	.WORDA	BCKSL		; LOWERCASE SWITCH
	.WORDA	circum		; UPPERCASE SHIFT SWITCH
	.WORDA	pound		; QUOTED SPACE SWITCH
	.WORDA	perct+FL.DIS	; OVERSTRIKE FLAG ENABLE
	.WORDA	ket+FL.DIS	; INDEX FLAG ENABLE
	.WORDA	ket+FL.DIS	; subindex flag enable
	.WORDA	equal+FL.DIS	; FLAG HYPHENATE
	.WORDA	plus+FL.DIS	; Period flag
	.WORDA	<FL.DIS>	; ESCAPE FLAG	
	.WORDA	dolar+FL.DIS	; substitute flag
	.WORDA	bar+FL.DIS	; break flag
	.WORDA	<FL.DIS>	; Special flag switch
	.WORDA	lbrace+FL.DIS	; Equation flag
	.WORDA	TAB		; Tabs flag
	.WORDA	PD		; Control flag	
;
;	Addresses of flags
;
FLADD:	.WORDA	$AFLSW
	.WORDA	$CFLSW
	.WORDA	$UFLSW
	.WORDA	$LFLSW
	.WORDA	$SFLSW
	.WORDA	$QFLSW
	.WORDA	$OFLSW
	.WORDA	$IFLSW
	.WORDA	$SIFSW
	.WORDA	$HFLSW
	.WORDA	$PFLSW		;Period flag
	.WORDA	$EFLSW		; Escape flag
	.WORDA	$SBFSW
	.WORDA	$BRFSW
	.WORDA	$SPFSW		; Special flag switch
	.WORDA	$EQFSW		; Equation flag address
	.WORDA	$TBFSW		; Tab flag \
	.WORDA	$NFLSW		; Control  /  These must be last 2 entries!!
;
;	Dispatch value for FLAG
;
FLCHR:
NFLAG=<FLCHR-fladd>/$WORDL		; Number of flags
AFL=.-FLCHR
	.BYTE	GC.AFL
CFL=.-FLCHR
	.BYTE	GC.CFL
UFL=.-FLCHR
	.BYTE	GC.UFL
LFL=.-FLCHR
	.BYTE	GC.LFL
SFL=.-FLCHR
	.BYTE	GC.SFL
QFL=.-FLCHR
	.BYTE	GC.QFL
OFL=.-FLCHR
	.BYTE	GC.OFL
IFL=.-FLCHR
	.BYTE	GC.IFL
	.BYTE	GC.IFL
HFL=.-FLCHR
	.BYTE	GC.HFL
PFL=.-FLCHR
	.byte	GC.PFL		; Period flag
EFL=.-FLCHR
	.BYTE	GC.EFL
SBF=.-FLCHR
	.BYTE	GC.SUB
BRF=.-FLCHR
	.BYTE	GC.BRK
	.BYTE	GC.SPF
	.BYTE	GC.EQ1
TBF=.-FLCHR
	.BYTE	GC.TAB
	.BYTE	GC.MSC
	.BYTE	0
;
;	Table of default hyphenation punctuation
;
DEFPUN:	.ASCIZ	<NXS>0 /\.,()"@0
;
;	Default period puctuation
;
	.ASCIZ	/.;:?!/
;
;	Default equation flags
;
EQTAB:	.ASCIZ	/{}/
	.even
;
;	DEFAULT ESCAPE TABLE
;
;	The table consists of:
;		byte 1 = char count = n
;		byte 2+3 = escape key characters
;		bytes 4-n = escape controls
;		bytes n-m = escape sequence
;
ESTAB:
;		--- Diablo default ---
	.IF DF	$DIAB
	$DIABL	= 1
	.ASCII	<6>/^>/<ES.VSP>/<-1><ESC>/D/	; 1/2 UP SHIFT
	.ASCII	<6>/^</<ES.VSP>/<1><ESC>/U/	; 1/2 DOWN SHIFT
	.ASCII	<6>/^(/<ES.VSP>/<-2><ESC><LF>	; Shift up by 1
	.ASCII	<5>/^)/<ES.VSP>/<2><LF>		; Shift down by 1
	.ASCII	<6>/^!/<ES.LCK>><0><ESC>/3/	; START GRAPHICS MODE
	.ASCII	<6>/\!/<ES.LCK><^o200><ESC>/4/	; STOP GRAPHICS MODE
	.byte	0
	.ENDC
;		--- Florida Data OSP-130 ---
	.IF DF	$FLORD
	$DIABL	= 1
	.ASCII	<6>/^>/<ES.VSP><-1><ESC>/D/	; 1/2 UP SHIFT
	.ASCII	<6>/^</<ES.VSP><1><ESC>/U/	; 1/2 DOWN SHIFT
	.ASCII	<6>/^(/<ES.VSP><-2><ESC><LF>	; Shift up by 1
	.ASCII	<5>/^)/<ES.VSP><2><LF>		; Shift down by 1
	.ASCII	<6>/^1/<0><ESC>/I/<2>		; SELECT FONT #1
	.ASCII	<6>/^2/<0><ESC>/I/<3>		; FONT 2
	.ASCII	<6>/^3/<0><ESC>/I/<4>		; FONT 3
	.ASCII	<6>/^4/<0><ESC>/I/<5>		; FONT 4
	.ASCII	<6>/^5/<0><ESC>/I/<6>		; FONT 5
	.ASCII	<6>/^8/<0><ESC>/I/<9.>		; FONT 8
	.ASCII	<6>/^*/<ES.CHR!ES.LCK!ES.CHR><0><ESC>/W/ ; BEGIN SHADOW PRINT
	.ASCII	<6>/\*/<ES.LCK!ES.CHR><^o200><ESC>/&/	; END SHADOW/BOLD PRINT
	.ASCII	<6>/^=/<ES.HSP!ES.PSP!ES.LCK!ES.CHR><0><2><^o16> ; SO BEGIN ELONGATED
	.ASCII	<6>/\=/<ES.HSP!ES.PSP!ES.LCK!ES.CHR><^o200><1><^o17>	; SI END ELONGATED
	.byte	0
	.ENDC
;		--- Hewlett Packard default ---
	.IF DF	$HPLJ			; Hewlett Packard LaserJet Printer
	.ascii	<11.>/^>/<ES.VSP><-1><ESC>/&a-35V/	; 1/2 UP SHIFT
	.ascii	<11.>/^</<ES.VSP><1><ESC>/&a+35V/	; 1/2 DOWN SHIFT
	.ascii	<9.>/^*/<ES.LCK><0><ESC>/(s1B/		; Start Bold
	.ascii	<9.>/\*/<ES.LCK><^o200><ESC>/(s0B/	; End Bold
	.ascii	<9.>|^/|<ES.LCK><0><ESC>/(s1S/		; Start Italics
	.ascii	<9.>|\/|<ES.LCK><^o200><ESC>/(s0S/	; End Italics
	.byte	0
	.ENDC
;		-- LA-50/LA-100 default --
;
	.if df	$la50
	.ascii	<8.>/^*/<ES.CHR!ES.LCK><0><ESC>/[1m/	; Bolding
	.ascii	<8.>/\*/<ES.CHR!ES.LCK><^o200><ESC>/[0m/
	.ascii	<8.>/^&/<ES.CHR!ES.LCK><0><ESC>/[4m/	; Underlining
	.ascii	<8.>/\&/<ES.CHR!ES.LCK><^o200><ESC>/[0m/
	.ascii	<9.>/^~/<ES.CHR!ES.LCK><0><ESC>/[8.m/	; Reverse video
	.ascii	<8.>/\~/<ES.CHR!ES.LCK><^o200><ESC>/[0m/
	.ascii	<9.>/^=/<ES.LCK!ES.PSP!ES.HSP><0><2><ESC>/[5w/	; 5 pitch
	.ascii	<9.>/\=/<ES.LCK!ES.PSP!ES.HSP><^o200><1><ESC>/[0w/; 10 pitch
	.ascii	<6.>/^</<ES.VSP><1><ESC>/K/		; Sub/superscripts
	.ascii	<6.>/^>/<ES.VSP><-1><ESC>/L/
	.ascii	<8.>/^#/<ES.CHR!ES.LCK><0><ESC>/[5m/	; Blink
	.ascii	<8.>/\#/<ES.CHR!ES.LCK><^o200><ESC>/[0m/
	.ascii	<5>/^%/<ES.CHR!ES.LCK><0><14.>		; Graphics 
	.ascii	<5>/\%/<ES.CHR!ES.LCK><^o200><15.>
	.byte	0
	.ENDC
ESEND:	.BYTE	0
LEVTAB:	.BYTE	3,1,LEVSIZ,LEVSIZ+1,LEVSIZ+1
	.byte	4,2,14,2,LEVSIZ		; Default style headers
	.byte	1,LEVSIZ,LEVSIZ		; Default autosubtit,enable lev.
CHTAB:	.BYTE	24.,2,6,-1,-1,0		; Default chapter style
CHPMP:	.ASCIZ	/CHAPTER /		; Chapter header prototype
	.ASCIZ	/APPENDIX /		; Appendix header prototype
	.ASCIZ	/Page /			; Page pre-header
	.EVEN
TIMTB:	.WORDA	HOUIN
	.WORDA	MININ
	.WORDA	SECIN
	.WORDA	DAYIN
	.WORDA	MONIN
	.WORDA	YEAIN
MONTB:	.WORDA	JAN
	.WORDA	FEB
	.WORDA	MAR
	.WORDA	APR
	.WORDA	MAY
	.WORDA	JUN
	.WORDA	JUL
	.WORDA	AUG
	.WORDA	SEP
	.WORDA	OCT
	.WORDA	NOV
	.WORDA	DEC
JAN:	.ASCIZ	/January/
FEB:	.ASCIZ	/February/
MAR:	.ASCIZ	/March/
APR:	.ASCIZ	/April/
MAY:	.ASCIZ	/May/
JUN:	.ASCIZ	/June/
JUL:	.ASCIZ	/July/
AUG:	.ASCIZ	/August/
SEP:	.ASCIZ	/September/
OCT:	.ASCIZ	/October/
NOV:	.ASCIZ	/November/
DEC:	.ASCIZ	/December/
;
;	Table of default up/down escape sequences
;
UPTAB:	.if df $DIABL
	.ASCIZ	<ESC>/D/
	.endc
	.if df	$LA50
	.ASCIZ	<ESC>/L/
	.endc
	.byte	0
DNTAB:	.if df $DIABL
	.ASCIZ	<ESC>/U/
	.endc
	.if df	$LA50
	.ASCIZ	<ESC>/K/
	.endc
	.byte	0
VSTAB:	.if df	$DIABL				; Variable spacing definition
	.if ndf	$12pt
	.BYTE	^o6,^o33,^o37,^o3,^o40,^o33,^o37,13.,0	; Variable sp Diablo 10 pitch
	.endc
	.IF DF	$12pt
	.BYTE	^o5,^o33,^o37,^o3,^o40,^o33,^o37,10.,0	; Variable sp Diablo 12 pitch
	.endc
	.endc
	.even
	.VARS
SUBTAB:	.WORD	DATE-SUBTAB			; Scratch area
DATE:	.WORD	TIME0-SUBTAB
	.ASCIZ	/$DATE/
DATIN:	.ASCIZ	/ 1-Sep-1900/
TIME0:	.BYTE	YEAR-SUBTAB,0
	.ASCIZ	/$TIME/
TIMIN:	.ASCIZ	/00:00:00/
YEAR:	.BYTE	MONTH-SUBTAB,0
	.ASCIZ	/$YEAR/
	.ASCII	/19/
YEAIN:	.ASCIZ	/00/
MONTH:	.BYTE	DAY-SUBTAB,0
	.ASCIZ	/$MONTH/
MONIN:	.ASCIZ	/September/
DAY:	.BYTE	HOUR-SUBTAB,0
	.ASCIZ	/$DAY/
DAYIN:	.ASCIZ	/01/
HOUR:	.BYTE	MINUTE-SUBTAB,0
	.ASCIZ	/$HOURS/
HOUIN:	.ASCIZ	/00/
MINUTE:	.BYTE	SECOND-SUBTAB,0
	.ASCIZ	/$MINUTES/
MININ:	.ASCIZ	/00/
SECOND:	.BYTE	0,0
	.ASCIZ	/$SECONDS/
SECIN:	.ASCIZ	/00/
SECFIN:
	.EVEN
	.if ndf	$VMS
	.if df rt11
timblk:	.WORDA	1		; One subroutine argument
	.WORDA	timin		; Time string address
	.endc
	.if ndf	rt11
DAYTIM:	.BLKW	8.
	.endc
	.endc
	.CODE
;
; **- INIT -Initialize RUNOFF VARIABLES
;-
;
;	First clear whole list of variables
;
INIT::	MOV	#VARBEG,R0	; First variable
10$:	CLR	(R0)+		; Clear variables
	CMP	R0,#VAREND	; Done?
	BLO	10$		; No
	DECB	$FIRPG		; Make this the first page of document
	MOV	#JUSTF+PJUSTF+FILLF,F.1	;Initial FLAGS
;
;	Reset the FLAG characters in character table
;
	MOV	#127.,R0		; NUMBER OF ASCII CHARS
	MOV	#CHWTAB,R1
	MOV	#CHTABL,R2
	MOV	#GCTABL,R3
20$:	MOVB	#1,(R1)+		; All widths are 1
	BICB	#CH.BRK!CH.FLG!CH.UNL!CH.PNC!CH.PER,(R2)	; Clear busy
	BITEQB	#CH.FLC,(R2)+,30$	; NOT A FLAGGABLE CHARACTER?
	MOVB	#GC.MSC,(R3)		; YES CLEAR ANY EXISTING FLAGS
30$:	INC	R3
	SOB	R0,20$			; TILL DONE
;
;	Set permanent bits
;
	BISB	#CH.UNL+CH.BRK,CHTABL+32.	; Set space not underlinable
	BISB	#CH.UNL,CHTABL+NXS	; Set NXS not underlinable
	MOV	#CH.PNC,R2		; Set up punctuation
	MOV	#DEFPUN,R1		; Table
	CALL	TABSET			; set up bits in table
	MOV	#CH.PER,R2		; Set up period designation
	CALL	TABSET
;
;	Setup the FLAG characters
;
	CLR	R1		; Word pointer
	CLR	R0		; Nother pointer (byte)
	MOV	#FLADD,R0	; Flag address table
	MOV	#FLTAB,R1	; Flag table
	MOV	#FLCHR,R2	; Flag chars
50$:	MOV	(R1)+,R3	; Get flag
	MOV	R3,@(R0)+	; Load flag
	BITNE	#FL.DIS,R3,60$	; Flag disabled ?
	ADD	#CHTABL,R3
	BISB	#CH.FLG,(R3)	; Mark char as flag char
	ADD	#GCTABL-CHTABL,R3
	MOVB	(R2),(R3)	; Set up branch to flag char.
60$:	INC	R2
	TSTNEB	(R2),50$	; Not done ?
;
;	ENABLE/DISABLE SWITCHES
;
	MOVB	#-1,$TOCSW	; Totally disable TOC
	MOVB	#SW.TDS,$UNLSW	; UNDERLINING ENABLED/OFF
	MOVB	#SW.TDS+SW.DIS,$CBRSW	; SET CHANGE BAR DISABLED/OFF
	MOVB	#SW.TDS,$HDRSW	; No header on first page
	MOV	#DISTAB,R0	; Disable table
65$:	MOV	(R0)+,R1	; Get entry to disable
	BEQ	66$		; None
	MOVB	#SW.DIS,(R1)	; Disable it
	BR	65$
;
;	Initialize various parameters
;
66$:	MOVB	#BAR,CHBAR	; Change bar character
	MOV	#3,HYPSZ	; Potential savings by hyphenation
	MOV	#2,HYPLO	; Hyphenate after 2 chars only
	MOV	#3,HYPHI	; Hyphenate before 3 chars only
	MOV	#-5,HYPSZ	; Min size char for hyphenation
	MOV	IUL,ULSWT	; Initialize underline mode
	MOV	#HWPLN,LPPG	; Set default hardware page size
	MOV	#INLPG,R0	; Initial lines per page
	ASL	R0		; Now is in half lines
	MOV	R0,PNLPG	; SET permanent length of page
	MOV	R0,NLPG		; SET current length of page
	MOV	#IHSPAC*LINSP,HSPAC; Initial header spacing
	MOV	#ILMRG,PLMRG	; Permanent left margin
	MOV	#IRMRG,PRMRG	; Initial Permanent margin
	MOV	#ILMRG,LMARG	; Initial LEFT margin
	MOV	#IRMRG,RMARG	; Right margin
	MOVB	#-1,CHLAY	; No chapter layout initially
	MOV	#NM.ALP+NM.UC,APNDSP	; appendix display format
	MOV	#NM.ALP+NM.UC,SUBDSP	; subpage display format
	MOV	#1,R0		; Next page number etc.
	MOV	R0,PAGENO	; SET Initial PAGE NUMBER
	MOV	R0,PAGNX	; And next page number
	MOV	R0,SUBNX	; Next subpage
	MOV	R0,CHPNX	; Next chapter
	MOV	R0,APNNX	; Next appendix
	MOV	R0,HUNIT	; Set horiz units
	MOV	R0,PHSP		; Set permanent horiz. spacing
	MOV	R0,LPHSP	; And last permanent
	MOV	R0,PHSPOU	; Set output horiz. spacing
	MOV	R0,CPOS		; Current character position
	MOV	#EQSTK+$WORDL,EQSTK	; Current equation stack pointer
;
;	Set up header level style
;
	MOV	#LEVTAB,R1	; Level default table
	MOV	#LINLV,R0	; Header level data table
	MOV	#13.,R2		; Number of params
70$:	MOVB	(R1)+,(R0)+	; Set levels to default
	SOB	R2,70$		; Set all of em
;
;	Set up default chapter style
;
	MOV	#CHTAB,R1
	MOV	#CHSK1,R0
	MOV	#6,R2
80$:	MOVB	(R1)+,(R0)+
	SOB	R2,80$
	MOV	#LSTK,LSTKP	; Reset stack pointer
	MOV	#CHPMG,R0	; Initialize chapter header
	MOV	#CHPMP,R1	; Header prototype
90$:	MOVB	(R1)+,(R0)+	; Move text
	BNE	90$		; Not null ?
	MOV	#APNMG,R0	; Appendix header
91$:	MOVB	(R1)+,(R0)+	; Move text
	BNE	91$		; Not null ?
	MOV	#PAGHD,R0	; Initialize PAGE HEADING PROTOTYPE
92$:	MOVB	(R1)+,(R0)+	; Move text
	BNE	92$		; Not null ?
	MOV	#ISPNG*LINSP,NSPNG; SET Initial SPACING
	MOV	NSPNG,PSPNG	; And permanent spacing
	MOV	#IPARTP,PARPT	; SET Initial PARAGRAPH PAGE TEST COUNT
	MOV	#IPARTP,PARTT2	; SET Initial PARAGRAPH PAGE TEST COUNT
	MOV	#IPARVS,PARSP	; SET Initial PARAGRAPH SPACING COUNT
	MOV	#IPARIN,PARIND	; Initial PARAGRAPH INDENTING
;
;	Set up tab stops every 8 spaces
;
	MOV	#TABBF,R3	; Tab buffer
	CALL	CLRBF
	MOV	#8.,R4		; SET Initial TAB STOP VALUE
	MOV	#20.,R5		; Number of tabs to set
100$:	MOV	R4,R1		; Then tab stop number
	CALL	PWRD		; Put into table
	ADD	#8.,R4		; ADVANCE TO NEXT TAB STOP
	CLR	R1		; Zero status
	CALL	PBYT		; Into buffer
	SOB	R5,100$		; Continue till done
	MOV	BUFADD,BUFAD	; Input buffer address
	MOV	#-1,HGHPAG
	MOV	#-1,HGHCHP	; hi chapter limit
	MOV	#-1,HGHAPN	; default highest appendix #
	CALL	HDSVST		; Save all header status
	CLRB	$HDSTS		; Set autostatus enabled
;
;	SET BUFFERS TO EMPTY
;
	CALL	ULBSET		; RESET UNDERLINE BUFFER
	MOV	#CLRTAB,R2	; Table of buffers to clear
205$:	MOV	(r2)+,R3	; Buffer to clear
	BEQ	206$		; None ?
	CALL	CLRBF		; Clear it
	BR	205$
206$:	CLRB	SUBSTK		; no substitution in progress
	MOVB	#SUBLEV*$WORDL,SUBSTK+1	; Set up stack
;
;	Set up default escape sequences
;
	MOV	#UPTAB,R0	; Source
	MOV	#UPMOV,R1	; Destination
	CALL	SAVIT
	MOV	#DNTAB,R0	; Source
	MOV	#DNMOV,R1	; Destination
	CALL	SAVIT
	MOV	#VSTAB,R0
	MOV	#VARESC,R1	; Variable spacing escape table
	CALL	SAVIT
	MOV	#ESCTAB,R4
	MOV	#17.,R0		; Number of char to clear
102$:	CLRB	(R4)+		; Clear char
	SOB	R0,102$		; Till done
;
;	Set up default escape sequences
;
	MOV	#ESCBF,R3	; escape table buffer
	MOV	#ESTAB,R2	; default escape sequences
	MOV	#ESCTAB,R4	; Points to escape table
	CLRB	(R4)
101$:	MOVB	(R2)+,R1	; Count ?
	BEQ	109$		; Done ?
	MOV	R1,R5		; Save counter
	CALL	PBYT		; Save in buffer
	DEC	R5
	MOVB	(R2)+,R1	; Get byte first char
	CALL	PBYT		; Save it
	DEC	R5
	MOVB	(R2)+,R1	; Get byte second escape char
	MOVB	R1,(R4)		; Save character
	CALL	PBYT		; Save in buffer
	DEC	R5
	MOVB	(R2)+,R1	; Options character
	CALL	PBYT		; Save it
	BITEQB	R1,#ES.LCK,105$	; Not lock ?
	DEC	R5
	MOVB	(R2)+,R1	; Get lock byte
	BNE	103$		; Already defined ?
	INC	R4		; Point to next empty slot
103$:	ADD	R4,R1
	SUB	#ESCTAB,R1	; Now is offset in table
	CALL	PBYT
105$:	MOVB	(R2)+,R1	; Get 1 char
	CALL	PBYT		; And save it
	SOB	R5,105$		; Continue with rest of escape seq
	CMP	R2,#ESEND	; At end of seq
	BLO	101$		; Not yet
109$:	INC	R4		; Byte at end of table
	CLRB	(R4)
	MOV	INI$SW,$SWTCH	; Initial SWITCH SETTINGS
	.IF DF	$PASS
	BITEQB	#SW.DIS,$OUTSW,210$; First or only pass ?
	RETURN
	.endc
210$:	MOV	#SUBF0,R3	; Clear main subs. buffer
	CALL	CLRBF
	.if ndf	$VMS
;
;	Set up default substitutions
;
	.if df rt11
	mov	#timblk,r5	; Point r5 to time argument block
	call	time		; Call SYSLIB subroutine for ASCII time
;
	mov	#datin,r5		;Point r5 to ascii string address
	.date				;Return system date in r0
;
;	Form ASCII day
;
	mov	r0,r3			;Put date word in r3
	beq	111$			;Invalid date
	ash	#-5.,r3			;Right justify day of month
	bic	#^C<^o37>,r3		;Clear all but lower 5 bits
	clr	r2			;Clear upper 16 bits for divide
	div	#10.,r2			;Divide day of month by ten
	beq	1$			;Day of month less than 10
	add	#'0,r2			;Make tens digit ascii
	movb	r2,(r5)+		;Save ascii number in string
1$:	add	#'0,r3			;Make ones digit ascii
	movb	r3,(r5)+		;Save ascii number in string
	movb	#'-,(r5)+		;Insert dash
;
;	Form ASCII month
;
	mov	r0,r3			;Put date word in r3
	ash	#-9.,r3			;Almost Right justify month of year
	bic	#^C<^o36>,r3		;Clear all but bits 1-4
	mov	montb-2(r3),r2		;Point r2 to ascii month
	mov	r2,r1			;Point r1 to month
	movb	(r2)+,(r5)+		;Save ascii characters in string
	movb	(r2)+,(r5)+		;Save ascii characters in string
	movb	(r2)+,(r5)+		;Save ascii characters in string
	movb	#'-,(r5)+		;Insert dash
;
;	Form ASCII year
;
	mov	r0,r3			;Put date word in r3
	bic	#^C<^o37>,r3		;Clear all but lower 5 bits
	add	#72.,r3			;Form last two digits of year
	clr	r2			;Clear upper 16 bits
	div	#10.,r2			;Divide year by ten
	add	#'0,r2			;Make tens digit ascii
	movb	r2,(r5)+		;Save ascii number in string
	add	#'0,r3			;Make ones digit ascii
	movb	r3,(r5)+		;Save ascii number in string
	clrb	(r5)			;Make string ASCII
	.endc
	.if ndf	RT11
	GTIM$S	#DAYTIM
	MOV	#DATIN,R0	; Location for date
	MOV	#DAYTIM,R1	; Date time table
	CALL	$DAT		; Get date
	CLRB	(R0)+		; Chock with null
	MOV	#TIMIN,R0	; Location for time
	MOV	#3,R2		; Convert to HR:MIN:SEC
	CALL	$TIM		; Convert
	CLRB	(R0)+		; Chock with null
	MOV	DAYTIM+G.TIMO,R1 ; Get month
	ASL	R1		; Byte reference
	BEQ	111$		; Bad month ?
	MOV	MONTB-2(R1),R1	; Points to month
	.endc
	MOV	#MONIN,R0	; Will be month
110$:	MOVB	(R1)+,(R0)+	; Move month
	BNE	110$		; Till all done
111$:	MOV	#TIMIN,R0	; Location of time
	MOV	#TIMTB,R2	; Table of time conversion
120$:	MOV	(R2)+,R1	; Next location to move time to
121$:	MOVB	(R0)+,R3	; Get char
	BEQ	124$		; Done ?
	CMPEQB	R3,#colon,123$	; End of chars ?
	MOVB	R3,(R1)+	; Save char
	BR	121$
123$:	CLRB	(R1)+		; Mark end
	BR	120$
124$:	CLRB	(R1)+		; Mark end
	MOV	#DATIN,R0
	MOV	(R2)+,R1	; Next location to move date to
	MOVB	(R0)+,(R1)+	; Move day
	CLRB	(R1)		; Clear next byte in case
	CMPEQB	(R0),#MINUS,125$	; No more day ?
	MOVB	(R0)+,(R1)+	; Move day
125$:	MOVB	#SPC,(R0)+	; Insert blank
	MOV	(R2)+,R1	; Next location to move date to
	MOVB	(R1)+,(R0)+	; Move month
	MOVB	(R1)+,(R0)+	; Move month
	MOVB	(R1)+,(R0)+	; Move month
	MOVB	#SPC,(R0)+	; Insert blank
	MOV	(R2)+,R1	; Next location to move date to
	MOVB	(R0)+,(R1)+	; Move year
	MOVB	(R0)+,(R1)+	; Move year
	.endc
	.if df $vms
	subl2	#28.,SP		; MAKE ROOM FOR ASCII DATIME
	MOVAL	20(SP),R11	; SAVE LOCATION OF DESCRIPTOR
	MOVL	#20.,(R11)	; DESCRIPTOR STRING SIZE
	MOVL	SP,4(R11)	; AND LOCATION
	$ASCTIM_S	TIMBUF=(R11)
	BISW2	#^X2020,4(SP)	;MAKE 2ND 2 LETTERS LOWER CASE OF MONTH
	MOVB	#SPC,2(SP)	;REPLACE DASH WITH SPACE
	MOVB	#SPC,6(SP)	;REPLACE DASH WITH SPACE
	MOVC3	#11.,(SP),DATIN	;PUT IT IN THE FULL TIME SLOT
	MOVQ	12(SP),TIMIN	;AND ALL OF TIME
	MOVW	9(SP),YEAIN	;LAST 2 DIGITS OF YEAR
;	MOVW	YEAIN,DATIN+7	;ONLY IF YOU ONLY WANT 2 DIGIT YEAR
;	CLRW	DATIN+9		;DITTO
	MOVW	(SP),DAYIN	
	MOVW	12(SP),HOUIN
	MOVW	15(SP),MININ
	MOVW	18(SP),SECIN
	MOVAL	MONTB,R11
	MOVL	#12.,R10
112$:	CMPC3	#3,3(SP),@(R11)+
	BEQL	113$
	SOB	R10,112$
113$:	MOVC3	#9.,@-4(R11),MONIN
	ADDL2	#28.,SP
	.ENDC
	MOV	#SUBF0,R3	; Buffer to put substitution in
	MOV	#SUBTAB,R4	; Buffer to transfer
130$:	MOVB	(R4)+,R1	; Byte to transfer
	CALL	PBYT		; Into substitution buffer
	CMP	R4,#SECFIN	; Done ?
	BLO	130$		; Not yet ?
	CALL	BEGBF		; Back at beginning
	RETURN			; 
;
;	Subroutine to move string (R0) to (R1) stop at zero byte
;
SAVIT:	MOVB	(R0)+,(R1)+	; Move bytes
	BNE	SAVIT		; Non zero byte ?
	RETURN
;
;	Sets up table bits
;
TABSET:	MOVB	(R1)+,R0	; Get next entry
	BNE	10$		; Not last ?
	RETURN
10$:	ADD	#CHTABL,R0
	BISB	R2,(R0)		; Set bit in table
	BR	TABSET		; Continue till done
;
;	FLAGS ACCEPT COMMANDS (QUOTING CHARACTERS)
;
ENACFL:: MOV	#AFL,R5		; ACCEPT FLAG	
	BR	NEWFLG		; GET AND ENABLE IT
DSACFL::MOV	#AFL,R5		; DISABLE ACCEPT FLAG
	BR	KILFLG
 
;
;	FLAGS SPACE COMMANDS    (QUOTED SPACE)
;
ENQFL::	MOV	#QFL,R5		; QUOTED SPACE FLAG
	BR	NEWFLG		; GET AND ENABLE FLAG
DSQFL::	MOV	#QFL,R5		; DISABLE QUOTED SPACE
	BR	KILFLG
;
;	FLAGS UNDERLINE COMMANDS
;
ENUFL::	MOV	#UFL,R5		; UNDERLINE FLAG
	BR	NEWFLG		; GET AND ENABLE NEW FLAG
DSUFL::	MOV	#UFL,R5		; DISABLE UNDERLINE FLAG
	BR	KILFLG
;
;	FLAGS INDEX
;
ENIFL::	MOV	#IFL,R5
	BR	NEWFLG		; ENABLE INDEX FLAG
DSIFL::	MOV	#IFL,R5		; DISABLE INDEX FLAG
	BR	KILFLG
;
;	FLAGS SUBSTITUTE commands
;
ENSBFL:: MOV	#SBF,R5		; substitution flag enable
	BR	NEWFLG
DSSBFL:: MOV	#SBF,R5		; substitutuion flag disable
	BR	KILFLG
;
;	Flags period commands
;
ENPRFL:: MOV	#PFL,R5		; Period flag enable
	BR	NEWFLG
DSPRFL:: MOV	#PFL,R5		; Period flag disable
	BR	KILFLG
;
;	FLAGS OVERSTRIKE COMMANDS
;		When call NEWFLG
;		R5 = Address to put new flag
;
ENOFL::	MOV	#OFL,R5		; ADDRESS TO PUT NEW FLAG
NEWFLG:	CALL	KILFLG		; FIRST KILL OLD FLAG Get R2
	CALL	SKPSP		; Get character into R1
NEWF1:	BCS	10$		; None ?
	MOV	R1,R0
	ADD	#CHTABL,R1
	BITEQB	#CH.FLC,(R1),2$ ; NOT LEGIT FOR FLAG??
	BITEQB	#CH.FLG,(R1),5$ ; CHAR FREE FOR FLAGGING?
	MOV	#25.,R0		; Char already in use as flag
	BR	3$
2$:	MOV	#26.,R0		; Character may not be used as flag
3$:	JMP	ILCMA
5$:	MOVB	R0,(R2)		; SAVE NEW FLAG	
10$:	MOV	#FL.DIS,R4	; ENABLE FLAG BITS
	MOVB	(R2),R0		; flag character
	ADD	#CHTABL,R0	; Points to loc in table
	BISB	#CH.FLG,(R0)	; SET FLAG THIS CHAR
	BIC	R4,(R2)		; CLEAR DISABLE BITS
	TSTNEB	1(R2),20$	; FLAG NOT ENABLED?
	MOVB	(R2),R0		; GET FLAG CHAR
	BEQ	20$		; NONE SO SKIP REST
	ADD	#GCTABL,R0
	ADD	#FLCHR,R5
	MOVB	(R5),(R0)	; Flag code into service table
20$:	RETURN					
DSOFL::	MOV	#OFL,R5		; DISABLE OVERSTRIKE FLAG
;
; input:	R5 is the flag pointer
; output:	R2 is address of flag word  R0,R1 destroyed
;
KILFLG: MOV	R5,R2
	INDXA	R2		; Now is byte pointer
	ADD	#FLADD,R2
	MOV	(R2),R2		; Now have flag address
	MOVB	(R2),R0		; GET OLD FLAG
	BEQ	10$		; NONE
	MOV	R0,R1
	ADD	#GCTABL,R1
	MOVB	#GC.MSC,(R1)	; KILL FLAG IN TABLE
	CMPNEB	R0,#TAB,5$	; Not tab ?
	MOVB	#GC.SPC,(R1)	; Make it space
5$:	ADD	#CHTABL,R0
	BICB	#CH.FLG,(R0)	; SET NO FLAG THIS CHAR
10$:	BIS	#FL.DIS,(R2)	; NOW KILL THE FLAG
	RETURN
;
;	FLAGS CAPITALIZE commands
;
DSCFL::	MOV	#CFL,R5		; DISABLE WORD CAPITALIZE
	BR	KILFLG
ENCFL::	MOV	#CFL,R5		; SET UP FOR NEW FLAG
	CALL	UPCAS		; CLEAR CASE CONVERSION VALUE
	BR	NEWFLG		; SET NEW FLAG	
;
;	FLAGS UPPERCASE COMMANDS
;
ENSFL::	MOV	#SFL,R5		; UPPERCASE SHIFT FLAG
	BR	NEWFLG		; GET FLAG AND SET IT ON
DSSFL::	MOV	#SFL,R5		; DISABLE UPPERCASE FLAG
	BR	KILFLG
;
;	FLAGS BREAK
;
ENBRFL:: MOV	#BRF,R5		; enable break flag
	BR	NEWFLG
DSBRFL:: MOV	#BRF,R5		; disable break flag
	BR	KILFLG
;
;	FLAGS LOWERCASE COMMANDS
;
ENLFL::	MOV	#LFL,R5		; LOWER CASE SHIFT FLAG 
	BR	NEWFLG		; GET FLAG AND SET IT 
DSLFL::	MOV	#LFL,R5		; DISABLE LOWERCASE FLAG		
	BR	KILFLG
;
;	FLAGS ESCAPE
;
ENEFL::	MOV	#EFL,R5		; GGET ESCAPE FLAG
	BR	NEWFLG
DSEFL::	MOV	#EFL,R5		; DISABLE ESCAPE FLAG
	BR	KILFLG
;
;	CONTROL FLAG
;
ENNFL::	CALL	SKPSP		; Get character
	BCS	10$		; None ?
	ADD	#CHTABL,R1
	BITEQB	#CH.FLC,(R1),20$ ; NOT LEGIT FOR FLAG??
	MOVB	R3,$NFLSW	; CONTROL FLAG
10$:	RETURN
20$:	MOV	#26.,R0		; Character may not be used as flag
	JMP	ILCMA
DSNFL::	MOV	#-1,$NFLSW	; DISABLE CONTROL FLAG (NO MORE COMMANDS)
	RETURN
;
;	FLAGS HYPHENATE COMMANDS
;
ENHFL::	MOV	#HFL,R5		; HYPHENATE FLAG
	BR	NEWFLG		; GET NEW FLAG AND ENABLE
DSHFL::	MOV	#HFL,R5		; DISABLE HYPHENATION
	BR	KILFLG
;
;	FLAGS TAB
;
ENTBFL:: MOV	#TBF,R5		; enable TAB flag
	CALL	KILFLG
10$:	CALL	CCIN		; Get next input char
	CMPEQB	R1,#SPC,10$	; Space ?
	CMPEQ	R1,$NFLSW,20$	; Command flag ?
	CMPEQB	R1,#SEMI,20$	; Semicolon
	CMPEQB	R1,#CR,20$	; Carriage return
	CLC			; Char ok
	BR	40$
20$:	CALL	BKSPI		; Backspace over char
30$:	SEC			; Null result
40$:	JMP	NEWF1
DSTBFL:: MOV	#TBF,R5		; disable TAB flag
	JMP	KILFLG
;
;	FLAGS SPECIAL
;
ESPFL::	CALL	SKPSP		; Get character
	BCS	20$		; None ?
	ADD	#CHTABL,R1
	BITEQB	#CH.FLC,(R1),30$ ; NOT LEGIT FOR FLAG??
	BITNEB	#CH.FLG,(R1),40$ ; Char not free for flagging ?
	BISB	#CH.FLG,(R1)		; And set flag allocated
	ADD	#GCTABL-CHTABL,R1
	MOVB	#GC.SPF,(R1)		; Set special flag
	BR	ESPFL		; Look for another
20$:	BIC	#FL.DIS,$SPFSW			; Set special flag enabled
	RETURN
30$:	MOV	#26.,R0		; Char is illegal as flag
	BR	41$
40$:	MOV	#25.,R0		; Char is already flag
41$:	JMP	ILCMA
DSPFL::	CALL	SKPSP		; Get character
	BCS	20$		; None ?
10$:	ADD	#GCTABL,R1
	CMPNEB	(R1),#GC.SPF,30$	; Not already special flag ?
	MOVB	#GC.MSC,(R1)		; Kill special flag
	ADD	#CHTABL-GCTABL,R1
	BICB	#CH.FLG,(R1)		; And set flag free
	CALL	SKPSP		; Get another character
	BCC	10$		; got one ?
	RETURN
20$:	BIS	#FL.DIS,$SPFSW	; Set special flag disabled
	RETURN
30$:	MOV	#34.,R0
	JMP	ILCMA
;
;	FLAGS SUBINDEX commands
;
ENSIFL::CALL	SKPSP		; Get character
	BCS	20$		; None ?
	ADD	#CHTABL,R1
	BITEQB	#CH.FLC,(R1),30$ ; NOT LEGIT FOR FLAG??
	MOVB	R1,$SIFSW
20$:	BIC	#FL.DIS,$SIFSW	; Set subindex flag enabled
	RETURN
30$:	MOV	#26.,R0		; Char is illegal as flag
	JMP	ILCMA
DSSIFL::BIS	#FL.DIS,$SIFSW	; Set subindex  flag disabled
	RETURN

;
;	FLAGS ALL commands
;
ENAFL:: MOV	#FL.ALL,R4	; BITS TO CLEAR
ENAFL1:	MOV	#NFLAG-2,R5	; Kill all flags except for last
	MOV	#FLADD,R2	; Flag address
10$:	BIC	R4,@(R2)+	; NOW KILL THE FLAG
	SOB	R5,10$		; Not done ?
	RETURN
;
;	DISABLE FLAGS ALL or NO FLAGS ALL
;
DSAFL::	MOV	#FL.ALL,R4	; BITS TO SET/RESET
DSAFL1:	MOV	#NFLAG-2,R5	; Kill all flags except for last
	MOV	#FLADD,R2	; Flag address
10$:	BIS	R4,@(R2)+	; NOW KILL THE FLAG
	SOB	R5,10$		; Not done ?
	RETURN			;
;
;	LITERAL command
;
LITRL::	MOV	F.1,LITSV	; SAVE CURRENT FLAGS WORD
	BIS	#LITFG,F.1 	; SET LITERAL FLAG
	MOV	#ELCMD,CMADR	; SET ADDRESS OF EXPECTED COMMAND
	CLR	CMADR+$WORDL
	BIC	#FILLF+JUSTF,F.1 ;TURN OFF FILLING AND JUSTIFYING
	BISB	#^o20,$KEEPL	; Set to keep lines
	MOV	#FL.LIT,R4	; DISABLE FLAGS BITS
	BR	DSAFL1		; KILL THEM
;
;	END LITERAL command
;
ELTRL::	BITEQ	#LITFG,F.1,20$	; Not in literal mode?
	MOV	LITSV,F.1	; RESTORE PREVIOUS FLAGS WORD
	BICB	#^o20,$KEEPL	; Set to not keep lines
	MOV	#FL.LIT,R4	; FLAGS BITS TO CLEAR
	BR	ENAFL1		; ENABLE FLAGS AGAIN
20$:	MOV	#31.,R0		; Literal error
	JMP	ILCMA		; No .LIT commmand
;
;	SAVE	HEADER
;
HDSVST::CALL	SSTATS		; Save status
	MOV	#SW.DIS,R0
	BISB	R0,$TABSW	; Turn off tabs
	BISB	R0,$HDSTS	; Turn off auto header save
	MOV	#HDSTAT,R2	; Address of save buffer
	JMP	SSTAT		; Save status
;
;	ENABLE EQUATION
;
ENEQU::	BICB	R5,$EQUSW		; Enable equations
	CALL	(R4)			; Get equation index
	JMP	50$			; No params
	CMP	R3,#6			; Too big ?
	BHI	EQERR0			; Yes ?
	MOV	R3,EQSPC		; Set equation spacing
50$:	RETURN
;
;	DISABLE EQUATION
;
DSEQU::	BISB	R5,$EQUSW		; Disable equations
	RETURN
;
;	EQUATION/END EQUATION commands
;
BEGEQ::	BISB	R5,$SEQSW		; Enable separated equations
	RETURN
ENDEQ::	BICB	R5,$SEQSW		; Disable separated equations
	RETURN
;
;	FLAGS EQUATION
;
EQERR0:	JMP	ILCM			; Illegal command error
ENEQFL::MOV	#EQTAB,R0		; Equation character table
	BITEQ	#FL.DIS,$EQFSW,50$	; Flags already enabled ?
10$:	MOVB	(R0)+,R1		; First character
	BEQ	20$			; Done ?
	ADD	#CHTABL,R1
	BITNEB	#CH.FLG,(R1),60$	; Already in use ?
	BR	10$			; Try next
20$:	MOV	#EQTAB,R0		; Table again
30$:	MOVB	(R0)+,R1		; Character
	BEQ	40$			; Done ?
	ADD	#CHTABL,R1
	BISB	#CH.FLG,(R1)		; Set it as flag character
	BR	30$
40$:	MOV	#EQTAB,R0		; Now set up first character as trigger
	MOVB	(R0)+,R1		; Left braces
	ADD	#GCTABL,R1
	MOVB	#GC.EQ1,(R1)		; First flag character
	MOVB	(R0),R1			; right braces
	ADD	#GCTABL,R1
	MOVB	#GC.EQ2,(R1)		; second flag character
	BIC	#FL.DIS,$EQFSW
50$:	RETURN
60$:	MOV	#25.,R0			; Error message
	JMP	ILCMA
;
;	NO FLAGS EQUATION command
;
DSEQFL::BITNE	#FL.DIS,$EQFSW,50$	; Flag NOT set ?
	BIS	#FL.DIS,$EQFSW		; Set equation flag off
	MOV	#EQTAB,R0		; Get character table
10$:	MOVB	(R0)+,R1		; Get character
	BEQ	50$			; Done ?
	ADD	#GCTABL,R1
	BICB	#CH.FLG,(R1)	; Reset flag characters
	ADD	#GCTABL-CHTABL,R1
	MOVB	#GC.MSC,(R1)	; And pointers
	BR	10$
50$:	RETURN
;
;	ENABLE/DISABLE FLAGS ACCEPT COMMANDS (QUOTING CHARACTERS)
;
EFACFL:: MOV	#$AFLSW,R5		; ACCEPT FLAG
ENABLF:	BIC	#FL.ALL,(R5)		; GET AND ENABLE IT
	RETURN
DFACFL::MOV	#$AFLSW,R5		; DISABLE ACCEPT FLAG
DISABF:	BIS	#FL.ALL,(R5)		; GET AND DISABLE IT
	RETURN
;
;	ENABLE/DISABLE FLAGS EQUATION
;
EFEQFL:: MOV	#$EQFSW,R5		; EQUATION FLAG
	BR	ENABLF
DFEQFL::MOV	#$EQFSW,R5		; DISABLE EQUATION FLAG
	BR	DISABF
;
;	ENABLE/DISABLE FLAGS period
;
EFPFL:: MOV	#$PFLSW,R5		; Period FLAG
	BR	ENABLF
DFPFL::	MOV	#$PFLSW,R5		; DISABLE period FLAG
	BR	DISABF
;
;	ENABLE/DISABLE FLAGS SPACE COMMANDS    (QUOTED SPACE)
;
EFQFL::	MOV	#$QFLSW,R5		; QUOTED SPACE FLAG
	BR	ENABLF		; GET AND ENABLE FLAG
DFQFL::	MOV	#$QFLSW,R5		; DISABLE QUOTED SPACE
	BR	DISABF
;
;	ENABLE/DISABLE FLAGS UNDERLINE COMMANDS
;
EFUFL::	MOV	#$UFLSW,R5		; UNDERLINE FLAG
	BR	ENABLF			; GET AND ENABLE NEW FLAG
DFUFL::	MOV	#$UFLSW,R5		; DISABLE UNDERLINE FLAG
	BR	DISABF
;
;	ENABLE/DISABLE FLAGS INDEX
;
EFIFL::	MOV	#$IFLSW,R5
	BR	ENABLF			; ENABLE INDEX FLAG
DFIFL::	MOV	#$IFLSW,R5		; DISABLE INDEX FLAG
	BR	DISABF
;
;	ENABLE/DISABLE FLAGS SUBINDEX
;
EFSIFL::MOV	#$SIFSW,R5
	BR	ENABLF			; ENABLE INDEX FLAG
DFSIFL::MOV	#$SIFSW,R5		; DISABLE INDEX FLAG
	BR	DISABF
;
;	ENABLE/DISABLE FLAGS SPECIAL
;
EFSPFL::MOV	#$SPFSW,R5
	BR	ENABLF			; ENABLE SPECIAL FLAG
DFSPFL::MOV	#$SPFSW,R5		; DISABLE SPECIAL FLAG
	BR	DISABF
;
;	ENABLE/DISABLE FLAGS SUBSTITUTE commands
;
EFSBFL:: MOV	#$SBFSW,R5		; substitution flag enable
	BR	ENABLF
DFSBFL:: MOV	#$SBFSW,R5		; substitutuion flag disable
	BR	DISABF
;
;	ENABLE/DISABLE FLAGS TABS
;
EFTBFL::MOV	#$TBFSW,R5
	BR	ENABLF			; ENABLE TABS FLAG
DFTBFL::MOV	#$TBFSW,R5		; DISABLE TABS FLAG
	BR	DISABF
;
;	ENABLE/DISABLE FLAGS OVERSTRIKE COMMANDS
;
EFOFL::	MOV	#$OFLSW,R5		; ADDRESS TO PUT NEW FLAG
	BR	ENABLF			; SET NEW FLAG	
DFOFL::	MOV	#$OFLSW,R5		; DISABLE OVERSTRIKE FLAG
	BR	DISABF
;
;	ENABLE/DISABLE FLAGS CAPITALIZE commands
;
DFCFL::	MOV	#$CFLSW,R5		; DISABLE WORD CAPITALIZE
	BR	DISABF
EFCFL::	MOV	#$CFLSW,R5		; SET UP FOR NEW FLAG
	BR	ENABLF			; SET NEW FLAG	
;
;	ENABLE/DISABLE FLAGS UPPERCASE COMMANDS
;
EFSFL::	MOV	#$SFLSW,R5		; UPPERCASE SHIFT FLAG
	BR	ENABLF			; GET FLAG AND SET IT ON
DFSFL::	MOV	#$SFLSW,R5		; DISABLE UPPERCASE FLAG
	BR	DISABF
;
;	ENABLE/DISABLE FLAGS BREAK
;
EFBRFL:: MOV	#$BRFSW,R5		; enable break flag
	BR	ENABLF
DFBRFL:: MOV	#$BRFSW,R5		; disable break flag
	BR	DISABF
;
;	ENABLE/DISABLE FLAGS LOWERCASE COMMANDS
;
EFLFL::	MOV	#$LFLSW,R5		; LOWER CASE SHIFT FLAG 
	BR	ENABLF			; GET FLAG AND SET IT 
DFLFL::	MOV	#$LFLSW,R5		; DISABLE LOWERCASE FLAG
	BR	DISABF
;
;	ENABLE/DISABLE FLAGS ESCAPE
;
EFEFL::	MOV	#$EFLSW,R5		; GGET ESCAPE FLAG
	BR	ENABLF
DFEFL::	MOV	#$EFLSW,R5		; DISABLE ESCAPE FLAG
	BR	DISABF
;
;	ENABLE/DISABLE FLAGS HYPHENATE COMMANDS
;
EFHFL::	MOV	#$HFLSW,R5		; HYPHENATE FLAG
	BR	ENABLF			; GET NEW FLAG AND ENABLE
DFHFL::	MOV	#$HFLSW,R5		; DISABLE HYPHENATION
	BR	DISABF
	.END
