Google
 

Trailing-Edge - PDP-10 Archives - SRI_NIC_PERM_SRC_3_19910112 - mm/blankt.mac
There are 5 other files named blankt.mac in the archive. Click here to see a list.
;<MM>BLANKT.SU.2, 22-Apr-83 15:15:58, Edit by MRC
; Configured for Stanford University

	TITLE BLANKT -- blank terminal screen code for mailsystem
	SUBTTL Written by Mark Crispin /MRC 22-Apr-83

	SEARCH MACSYM,MONSYM	; system definitions
	SALL			; suppress macro expansions
	.DIRECTIVE FLBLST	; sane listings for ASCIZ, etc.

;  This module contains code to blank the terminal screen.  This is
; site-dependent and should be edited for each individual site as
; appropriate.

A=:1				; JSYS AC's
B=:2

	.PSECT CODE

$BLANK::SAVEAC <A,B>
	STKVAR <TTYPE,OLDMOD>
	MOVEI A,.PRIOU		; get terminal type index
	GTTYP%
	MOVEM B,TTYPE		; save for later
	CAIGE B,NCLRSC		; more than the number supported?
	 SKIPN CLRSCN(B)	; yes, able to blank on this type?
	  RET			; no, return
	RFMOD%			; get current terminal mode
	MOVEM B,OLDMOD		; save for later
	TRZ B,TT%DAM		; change to binary mode
	SFMOD%
	MOVE B,TTYPE		; get type index back again
	MOVE A,CLRSCN(B)	; get blanking sequence or address
	TXOE A,.LHALF		; was it an address (LH=0)?
	 HRROI A,CLRSCN(B)	; no, sequence 4 chars or less, set up address
	PSOUT%			; output the sequence
	MOVEI A,.PRIOU		; wait for it to get out
	DOBE%
	SETZ B,			; tell monitor we are at top of page
	SFPOS%
	MOVEI A,^D500		; give terminal a chance to do it
	DISMS%
	MOVEI A,.PRIOU		; restore former terminal mode
	MOVE B,OLDMOD
	SFMOD%
	RET			; now return
DEFINE CLRASCII <BYTE (7) .CHESC,"H",.CHESC,"J",0> ; ASCII screen clear
DEFINE CLRANSI <[BYTE (7) .CHESC,"[","H",.CHESC,"[","J",0]> ; ANSI standard

CLRSCN:	0			; 0 TTY33
	0			; 1 TTY35
	0			; 2 TTY37
	0			; 3 TI
	BYTE (7) .CHCNZ,0	; 4 ADM-3
	BYTE (7) .CHCRB,.CHCCF,0 ; 5 Datamedia 2500
	CLRASCII		; 6 HP2640
	BYTE (7) 176,.CHCBS,0	; 7 Hazeltine 1500
	0			; 8 default
	0			; 9 PTY, NVT (aka "ideal")
	BYTE (7) .CHCRB,.CHCUN,.CHCUN,.CHCUN,0 ;10 VT05
	CLRASCII		; 11 VT50
	0			; 12 LA30
	BYTE (7) .CHCRB,.CHCUN,0 ;13 GT40
	0			; 14 LA36
	CLRASCII		; 15 VT52
	CLRANSI			; 16 VT100
	0			; 17 LA38
	0			; 18 LA120
	0			; 19 TTY43
	BYTE (7) .CHESC,"+",0	; 20 Soroc 120
	BYTE (7) .CHCNE,.CHCNY,0 ; 21 Gillotine
	CLRASCII		; 22 Teleray 1061
	[BYTE (7) .CHCBS,"E","R","A",";",0] ; 23 Tektronix 4025
	BYTE (7) .CHFFD,0	; 24 Ann Arbor
	CLRASCII		; 25 Heath 19
	BYTE (7) .CHESC,"?",.CHESC,.CHCNC,0 ; 26 Concept 100
	BYTE (7) .CHESC,"K",0	; 27 IBM 3101
	BYTE (7) .CHESC,"*",0	; 28 Televideo 912
	0			; 29 Textronix 4023
	BYTE (7) .CHCNY,.CHVTB,0 ; 30 Datamedia 1520
	CLRANSI			; 31 Ann Arbor Ambassador
	BYTE (7) .CHCNP,.CHCNR,.CHCNP,.CHCNV,0 ; 32 DTC 382
	0			; 33 reserved for customer definition
	0			; 34 reserved for customer definition
	CLRANSI			; 35 VT125
	CLRANSI			; 36 VK100 (GIGI)
NCLRSC==.-CLRSCN		; maximum # of terminal types
	END