Google
 

Trailing-Edge - PDP-10 Archives - bb-j710b-bm_tops20_v41_tools - tools/sed/sedt41.mac
There are 2 other files named sedt41.mac in the archive. Click here to see a list.
TITLE	SEDT41 - TELRAY 4041 TERMINAL DEFINITIONS FOR THE EDITOR
SUBTTL	A CHRISTOPHER HALL FECIT

;THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED
;  OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE.
;
;COPYRIGHT (C) 1981 BY DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.

;LOAD THE EDITOR BY: .COMP SED,SEDT41
;		     .LOAD/RE SEDT41,SED
;		     .SS SED

	SEARCH	SEDSYM

	EXTERN	CPOPJ,PUTSEQ,PUTSQ1,PUTNUM,PUTTYP,PUTSTG,TRMNAM
	INTERN	TERMNL

TERMNL:	O4041			;ADDRESS OF THE	TERMINAL TABLE TO USE

;TERMINAL OUTPUT TABLE - SEQUENCES TO MAKE THE TERMINAL DO SPECIAL THINGS
;FILL IN WITH THE CODES FOR YOUR TERMINAL

O4041:	BYTE (7) 33,"A" 	;CURSOR UP
	BYTE (7) 33,"B" 	; DOWN
	BYTE (7) 33,"C" 	; RIGHT
	BYTE (7) 10		; LEFT
	BYTE (7) 33,"H" 	; HOME
	BYTE (7) 33,"J" 	;CLEAR PAGE
	BYTE (7) 33,"K" 	;CLEAR EOL
	BYTE (7) 12		;ROLL UP AND CLEAR LINE
	RD4041			;ROLL DOWN AND CLEAR LINE
	BYTE (7) 37		;PROTECT ON (NONE)
	0			;PROTECT OFF
	BYTE (7) 33,"L"		;INSERT LINE
	BYTE (7) 33,"P"		;INSERT SPACE
	BYTE (7) 33,"M"		;DELETE LINE
	BYTE (7) 33,"Q"		;DELETE SPACE
	BYTE (7) 33,"Y","7 "	;MOVE TO BOTTOM
	BYTE (7) 33,"H",33,"J"	;HOME AND CLEAR PAGE
	POSCUR			;ROUTINE TO POSITION TO CHARACTER
	POSLIN			;ROUTINE TO POSITION TO START OF LINE
	^D24			;LINES PER PAGE
	^D80			;CHARACTERS PER LINE
	MRK!NPG			;FLAGS (no protect and leave page alone)
	CPOPJ			;ROUTINE TO CALL ON ENTRY
	CPOPJ			;ROUTINE TO CALL ON EXIT
	0,,0			;NO NULLS NEEDED
	I4041			;ADDRESS OF INPUT CHARACTER TABLE
	"*"			;MARK TO DISPLAY ON ENTER

;ROLL DOWN AND CLEAR LINE

RD4041:	MOVE	T1,[BYTE (7) 33,"H",33,"L"]
	PUSHJ	P,PUTSQ1
	PUSHJ	P,PUTTYP
	MOVEI	T1,^D050	;SLEEP .25 SECONDS
IFN TOPS10,<
	HIBER	T1,
	  JFCL
>
IFE TOPS10,<
	DISMS
>
	POPJ	P,

I4041:	EXP	40,1,24,3,23,32,13,7 ;NOTHING SPECIAL
	EXP	10,11,50,4,6,15,31,25
	EXP	20,0,5,0,27,16,22,14
	EXP	30,21,0,33
	EXP	35,34,36
		-13,,I.4041

I.4041:
	37,,"H" 	;ESCAPE H == HOME
	02,,"F"		;ESCAPE F == SWITCH/SET FILE
	26,,"S"		;ESCAPE S == SWITCH PARAMETERS
	17,,"^"		;ESCAPE C == ENTER CONTROL CHAR
	36,,"A"		;UP
	34,,"B"		;DOWN
	35,,"C"		;RIGHT
	10,,"D"		;LEFT
	33,,"P"		;ENTER
	13,,"R"		;PICK
	07,,"Q"		;PUT
	0

;TERMINAL INPUT TABLE - TELLS WHAT CONTROL CHARACTERS OR SEQUENCES
;INVOKE WHICH COMMANDS

;		0			;CODE FOR RUBOUT (0==RESET)
;I4041:	EXP	40, 1, 2, 3, 4, 5, 6, 7 ;NOTHING SPECIAL
;	EXP	10,11,50,13,14,15,16,17
;	EXP	20,21,22,23,24,25,26,27
;	EXP	30,31,32
;	-7,,ISUBTB			;ESCAPE NEEDS A SUBTABLE
;	EXP		 34,35,36,37

;SUBTABLE. PUT THE MOST FREQUENTLY-USED SEQUENCES FIRST
;ENTER IS PROBABLY THE MOST COMMON OF ALL

;ISUBTB:	33,,"P" 	;ESCAPE P == ENTER
;        37,,"R" 	;ESCAPE R == HOME
;        36,,"A" 	;ESCAPE A == UP
;        34,,"B" 	;ESCAPE B == DOWN
;        35,,"C" 	;ESCAPE C == RIGHT
;        10,,"D" 	;ESCAPE D == LEFT
;        40,,"Q" 	;ESCAPE Q == RECALL

;POSITIONING ALGORITHMS

POSCUR:	MOVE	T1,[BYTE (7) 33,"Y"]
	PUSHJ	P,PUTSQ1	;START IT OFF
	MOVEI	T1,40(RW)	;GET ROW POSITION
	IDPB	T1,TY
	MOVEI	T1,40(CM)	;GET COLUMN POSITION
	IDPB	T1,TY
	POPJ	P,		;DONE

POSLIN:	MOVE	T1,[BYTE (7) 33,"Y"]
	PUSHJ	P,PUTSQ1	;START IT OFF
	MOVEI	T1,40(T4)	;GET ROW POSITION
	IDPB	T1,TY
	MOVEI	T1,40		;MOVE TO COLUMN ZERO
	IDPB	T1,TY
	POPJ	P,

	END