CRTRUB.MAC;777/-BF=CRTRUB.VGN;1
-24
RSX=1
I$$SOB=1
I$$DIV=1
-174,176
50$:	.BYTE	2,176,214

60$:	.BYTE	4,15,176,217,15
-221
	CMPB	2(R4),#0200	; HAZELTINE 1500 THINKS IT'S A VT05
	BEQ	40$
-286,290
50$:	.WORD	24.,24.,24.,24.	;TABLE OF VERTICAL SIZES
60$:	.WORD	80.,80.,80.,80.	;TABLE OF HORIZONTAL SIZES

.ENDC	;NE	WATCH
-309,313
	.WORD	4		;<CTRL/N><LINE #><4 FILL'S><COLUMN #>

; FIXSEQ - CLEAN UP MODES (IF ANY).

FIXSEQ::.WORD	10$,10$,20$,30$ ;CLEAN UP MODES (IF ANY)
-328
30$:	.BYTE	176,18.,176,23.,176,25.,200 ; HOME AND CLEAR
-339,339
30$:	.BYTE	176,18.,200
-353,353
30$:	.BYTE	176,15.,200
-359,364
EOSSEQ::.WORD	10$,10$,30$,20$ ;ERASE FROM CURSOR TO END OF SCREEN

10$:	.BYTE	033,'J,200	;ERASE FROM CURSOR TO END OF SCREEN

20$:	.BYTE	176,23.,200
30$:	.BYTE	033,'[,'J,200
-369,369
SCUSEQ::.WORD	10$,10$,10$,20$
-371
; HAZELTINE- DOWN, INSERT (=SCROLL BOTTOM DOWN), HOME, DELETE (=SCR UP)
;	THEN RE-ADDRESS CURSOR TO LINE 18----- SCROLL REGION
;	MUST BE LAST 6 LINES

20$:	.BYTE	176,11.,176,26.,176,18.,176,19.
	.BYTE	176,21,140,161
	.BYTE	0,0,0,0		; NULLS FOR TIMING
	.BYTE	0,0,0,0		; NULLS FOR TIMING
	.BYTE	200
-379,379
SCDSEQ::.WORD	10$,10$,20$,30$ ;SCROLL SCREEN DOWN
-383
30$:	.BYTE	176,26.		; INSERT LINE (SHIFT SCREEN DOWN)
	.byte	176,21,140,161,176,24.
	.BYTE	176,18.		; HOME
	.BYTE	0,0,0,0		; NULLS FOR TIMING
	.BYTE	200
-389,389
GONSEQ::.WORD	10$,10$,20$,30$ ;TURN ON GRAPHICS MODE
-394
30$:	.BYTE	176,31.,200
-399,399
GOFSEQ::.WORD	10$,10$,20$,30$ ;TURN OFF GRAPHICS MODE
-404
30$:	.BYTE	176,25.,200
-409,411
MONSEQ::.WORD	NULL,NULL,10$,30$ ;TURN ON MARK'D REGION MODE

10$:	.BYTE	033,'[,'7,'M+40,200 ;SET REVERSE VIDEO ATTRIBUTE
30$:	.BYTE	176,31.,200
-417,419
MOFSEQ::.WORD	NULL,NULL,10$,30$ ;TURN OFF MARK'D REGION MODE

10$:	.BYTE	033,'[,'M+40,200 ;CLEAR ALL ATTRIBUTES
30$:	.BYTE	176,25.,200
-474,475
	.BYTE	175		; curly bracket
	.BYTE	'.		; dots
-488,488
CONSEQ::.WORD	NULL,10$,20$,30$ ;TURN ON CURSOR CHARACTER ATTRIBUTES
-495
30$:	.BYTE	176,31.,200
-500,500
COFSEQ::.WORD	NULL,10$,20$,30$ ;TURN OFF CURSOR CHARACTER ATTRIBUTES
-509
30$:	.BYTE	176,25.,200
-584,586
DIRECT::MOV	R2,-(SP)	; SAVE/RESTORE COL #
	CALL	1$
	TST	R1		;HZL NEEDING FILL?
	BLE	70$		;NOPE
	MOV	#190$,R3	;YEP, SET FILLER SEQUENCE
	JSR	PC,DOTYPE	; AND GO DO IT
70$:	MOV	(SP)+,R2
	RETURN

1$:	MOV	R1,-(SP)	;SAVE R1
	MOV	CRTYPE(R5),R1	;GET THE SCOPE TYPE
	SUB	#4,R1		;VT52=-4, VT100(VT52)=-2, VT100(ANSI)=0, HZL=2
-620,627
; ** ADDED---HAZELTINE, SWAP X & Y
	TST	R1
	BLE	65$
	MOV	R2,-(SP)
	MOV	R0,R2
	MOV	(SP)+,R0
	ADD	#0100,R0
	ADD	#0100,R2
65$:
	JSR	PC,90$		;NO, ADJUST AND OUTPUT LINE NUMBER (ROW)
	MOV	R2,R0		;NOW SET COLUMN NUMBER
80$:	MOV	(SP)+,R1	;RESTORE R1
90$:	ADD	#40,R0		;ADJUST LINE (ROW) OR COLUMN NUMBER
	CMP	R0,#0176
	BLO	GOTYPE
	SUB	#0140,R0
-649,649
150$:	.WORD	200$,200$,'B-40,215$
-658,658
	.WORD	2; <1+1+4+1>/1	;<^N><L><0><0><0><0><C> VS. N*(<^X/BS>)
-668,668
215$:	.BYTE	176,11.,200	; HZL CURSOR DOWN

220$:	.BYTE	176,12.,200	;HZL CURSOR UP
-672,672
240$:	.BYTE	16.,200		;HZL CURSOR RIGHT
-682,682
280$:	.BYTE	176,17.,200
-704,704
SETSCR::CMP	#6,CRTYPE(R5)
	BEQ	HZLSC

	MOV	#10$,R3		;SET SEQUENCE TO START THE OPERATION
-730
;**********
HZLSC:	TST	R1		; TOP PART OF SCREEN
	BNE	10$
	JMP	SCRHOM

10$:	MOV	R1,R0
	MOV	#-1,PRELIN+RWSIZE(R5)
	CLR	R2
	CALL	DIRECT
	MOV	#EOLSEQ,R3
	CALL	DOTYPE
	JMP	TYPEBC		; FLUSH IT OUT NOW
-780
	BIS	#ET$NCH,R0	; DON'T ECHO. IT'S TOO SLOW.
-805,805
80$:	BIC	#^C<177>,R0	;TRIM CHARACTER TO 7 BITS
/
