Google
 

Trailing-Edge - PDP-10 Archives - TRAFFIC-20_V4_840514 - traffic-source/clear.mac
There are no other files named clear.mac in the archive.
	TITLE	CLEAR
	SEARCH	MACSYM,MONSYM

;
;This little program is designed to clear the terminal after a TRAFFIC-20
;program has been aborted with ^C. It is unsupported, but may be placed
;in SYS: and run by typing CLEAR. The default operation is for a normal
;VT100 in average user mode.
;
;The following assembly parameters may be used to alter the operation to
;suite your normal terminal settings.
;

	IFNDEF %VT52,<%VT52=0>		;%VT52 = 0 - clear a VT100
					;%VT52 = 1 - clear a VT52
	IFNDEF %AWRP,<%AWRP=1>		;%AWRP = 0 - Leave autowrap off
					;%AWRP = 1 - Switch autowrap on
	IFNDEF %NVID,<%NVID=1>		;%NVID = 0 - Leave screen in whatever
					;	video state it is
					;%NVID = 1 - Switch to normal video
	IFNDEF %CL80,<%CL80=1>		;%CL80 = 0 - Leave screen in 80 or 132
					;%CL80 = 1 - Switch to 80 column mode

START:
	MOVEI	1,.PRIOU
	RFCOC
	TRZ	3,1B19			;ALLOW ESCAPES THROUGH
	SFCOC
	MOVEI	1,.PRIOU
IFE %VT52,<
	HRROI	2,[BYTE	(7)33,"[","H",33,"["
		   BYTE	(7)"J",33,"[","0","m"
		   BYTE	(7)33,"[","1",";","2"
		   BYTE	(7)"4","r",33,"(","B"
IFN %CL80,<
		   BYTE (7)33,"[","?","3","l"
>
IFN %NVID,<
		   BYTE (7)33,"[","?","5","l"
>
IFN %AWRP,<
		   BYTE (7)33,"[","?","7","h"
>
		   BYTE	(7)0,0,0,0,0]
>
IFN %VT52,<
	HRROI	2,[BYTE (7)33,"H",33,"J",0]
>
	SETZ	3,
	SOUT				;SEND THE STRING
	 ERJMP	.+1
	MOVEI	1,.PRIOU
	MOVE	2,[146120,,175102]	;WIDTH = 80, LENGTH = 24, ECHOS ON
	STPAR
	SFMOD
	DMOVE	2,[52531,,553125	;STANDARD CCOC BITS
		  252525,,652400]
	SFCOC
	HALTF

	END	START