Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-10 - 43,50517/cvt52.mac
There is 1 other file named cvt52.mac in the archive. Click here to see a list.
	TITLE CVT52 CURSER ADDRESSING FOR THE DECSCOPE VT-52

COMMENT /THESE ROUTINES ARE USED FOR CURSOR MOVEMENT ON THE
	DECSCOPE VT-52 ONLY.
/
T1=1	;TEMP ACS
T2=2
J=16	;ARG POINTER
P=17	;PDL POINTER


	ENTRY	CAVT52,CRVT52,CLVT52

CAVT52:	PUSH	P,T1		;SAVE TEMP ACS
	PUSH	P,T2
	MOVE	T1,@(J)		;GET FIRST ARG (LINE)
	SOJ	T1,		;SET UP POSITION
	ADDI	T1,40
	IONEOU	[33]		;TELL TERMINAL COMMAND COMING
	IONEOU	[131]		;DIRECT ADDRESSING COMMAND
	IONEOU	T1		;SET UP LINE
	MOVE	T1,@1(J)	;GET SECOND ARG (COLUMN)
	SOJ	T1,		;SET UP POSITION
	ADDI	T1,40
	IONEOU	T1		;SET UP COLUMN
	POP	P,T2		;RESTORE TEMP ACS
	POP	P,T1
	POPJ	P,		;RETURN

CRVT52:	PUSH	P,T1		;SAVE TEMP ACS
	PUSH	P,T2
	MOVE	T1,@(J)		;GET FIRST ARG (LINE)
	JUMPE	T1,CRVT5A	;THAT'S IT?
	MOVEI	T2,101		;SET FOR UP CURSOR
	SKIPG	T1		;WANT UP CURSOR? YES-SKIP
	MOVEI	T2,102		;SET FOR DOWN CURSOR
	MOVMS	T1		;SET ABSOLUTE VALUE
	IONEOU	[33]		;TELL TERM. COMMAND COMING
	IONEOU	T2		;MOVE CURSOR
	SOJG	T1,.-1		;IS THAT IT? NO-GO AGAIN
CRVT5A:	MOVE	T1,@1(J)	;GET SECOND ARG (COLUMN)
	JUMPE	T1,CRVT5B	;NO COLUMN? GO RETURN
	MOVEI	T2,104		;SET FOR LEFT CURSOR
	SKIPG	T1		;WANT RIGHT CURSOR? NO - SKIP
	MOVEI	T2,103		;SET FOR RIGHT CURSOR
	MOVMS	T1		;SET ABSOLUTE VALUE
	IONEOU	[33]		;TELL TERM. COMMAND COMING
	IONEOU	T2		;MOVE THE CURSOR
	SOJG	T1,.-1		;MORE? YES - GO AGAIN
CRVT5B:	POP	P,T2		;RESTORE TEMP ACS
	POP	P,T1
	POPJ	P,		;RETURN

CLVT52:	OUTSTR	[BYTE(7) 33,110,33,112,0]	;TELL TERM. TO ERASE SCREEN
	POPJ	P,		;RETURN

	END