$auto$=-2
.enabl lc
;15-aug-80 for Conroy C runtime
	.enabl lc
	.globl sfacts	;entry for facts output
	.globl 	lkill	;line kill
	.globl 	scner2	;error	message	screen mode fixup
	.globl 	scner1	;error	message	screen mode fixup
	.mcall dir$,callr
	tab	=	11
	ceop	=	'J
lf:     .asciz /Left= /
rt:     .asciz / Right= /
ind:    .asciz / Indent= /
spc:    .asciz / Spacing= /
jst:    .asciz / Justify= /
fil:	.asciz /file: /
dt:	.asciz /   .= /
d$:	.asciz /   $= /
tp:	.asciz /    tmp= /
	.even
fword:  .word lf,rt,ind,spc,jst
lkill:
	TST smode		;IS smode NE #0
	BEQ e8.1	;Not if EQ
	mov R0,-(sp)
MOV #15,R0
	CALL TTYCC
MOV #esc,R0
	CALL TTYCC
MOV #ceol,R0
	CALL TTYCC
MOV #esc,R0
	CALL TTYCC
MOV #'A,R0
	CALL TTYCC
JSR PC,TTYNLL
	mov (sp)+,R0
e8.1=.			; 
e8.3=.
	rts pc
scner2:
	TST smode		;IS smode = #0
	BNE e8.4	;Not if NE
	JSR PC,ttynl
	    callr ttyskp
	JMP e8.7
e8.4=.			; 
MOV #ESC,R0
	CALL TTYCC
MOV #'Y,R0
	CALL TTYCC
	MOV #bottom-1,R0
	ADD #31.,R0
	CALL TTYCC
	MOV #1,R0
	ADD #31.,R0
	CALL TTYCC
MOV #esc,R0
	CALL TTYCC
MOV #ceol,R0
	CALL TTYCC
JSR PC,TTYNLL
MOV #ESC,R0
	CALL TTYCC
MOV #'Y,R0
	CALL TTYCC
	MOV #bottom-2,R0
	ADD #31.,R0
	CALL TTYCC
	MOV #1,R0
	ADD #31.,R0
	CALL TTYCC
JSR PC,TTYNLL
	    callr ttyskp
e8.7=.			; 
e8.6=.
scner1:
	TST smode		;IS smode NE #0
	BEQ e8.8	;Not if EQ
MOV #ESC,R0
	CALL TTYCC
MOV #'Y,R0
	CALL TTYCC
	MOV #bottom,R0
	ADD #31.,R0
	CALL TTYCC
	MOV #30.,R0
	ADD #31.,R0
	CALL TTYCC
e8.8=.			; 
e8.10=.
	rts pc
sfacts:
	JSR PC,fixscn
MOV #ESC,R0
	CALL TTYCC
MOV #'Y,R0
	CALL TTYCC
	MOV #bottom-1,R0
	ADD #31.,R0
	CALL TTYCC
	MOV #20.,R0
	ADD #31.,R0
	CALL TTYCC
	JSR PC,fillfacts
MOV #ESC,R0
	CALL TTYCC
MOV #'Y,R0
	CALL TTYCC
	MOV #bottom,R0
	ADD #31.,R0
	CALL TTYCC
	MOV #20.,R0
	ADD #31.,R0
	CALL TTYCC
	mov #fil,r0			;string "	file: "
	JSR PC,ttystr
	mov #sfn,r0			;the file	name
	JSR PC,ttystr
	mov #dt,r0			;string " .= "
	JSR PC,ttystr
	mov dot,r1
	sub zero,r1			;decimal value of	dot
	asr r1
	JSR PC,ttynum
	mov #d$,r0			;string " $= "
	JSR PC,ttystr
	mov dol,r1			;decimal value of dollar
	sub zero,r1
	asr r1
	JSR PC,ttynum
	mov #tp,r0			;string " tmp= "
	JSR PC,ttystr
	mov $tptr,r1			;tmp pointer value
	JSR PC,ttynum
MOV #ESC,R0
	CALL TTYCC
MOV #'Y,R0
	CALL TTYCC
	MOV #bottom-1,R0
	ADD #31.,R0
	CALL TTYCC
	MOV #1.,R0
	ADD #31.,R0
	CALL TTYCC
JSR PC,TTYNLL
	rts pc
fillfacts:
	JSR PC,saval
	mov #fparms,r3
	MOV #fword,r2	;Init loop index
e8.11=.
	CMP r2,#fword+8.	;done loop?
	BHI e8.12	;yes if HI
           mov (r2),r0
	JSR PC,ttystr
           mov (r3)+,r1
	JSR PC,ttynum
	ADD #2,r2
	JMP e8.11		;back to top
e8.12=.
JSR PC,TTYNLL
	rts pc
	.end
