Trailing-Edge
-
PDP-10 Archives
-
BB-M836B-BM
-
tools/sed/sedv52.mac
There are 2 other files named sedv52.mac in the archive. Click here to see a list.
TITLE SEDV52 - VT52 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,1982 BY DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
;LOAD THE EDITOR BY: .LOAD SEDSYM,SEDV52,SED
; .SS SED
SEARCH SEDSYM
IFE TOPS10,<SEARCH MONSYM>
EXTERN CPOPJ,PUTSQ1,PUTTYP,PUTNUM,TRMNAM
INTERN TERMNL
FTFAST==1 ;SET THIS IF TERMINAL SENDS OUT XON-XOFF'S
TERMNL: OVT52 ;ADDRESS OF THE TERMINAL TABLE TO USE
OVT52: 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 LINE
BYTE (7) 12 ;ROLL UP AND CLEAR LINE
BYTE (7) 33,"I" ;ROLL DOWN AND CLEAR LINE
CPOPJ ;PROTECT ON (NONE FOR A VT52)
CPOPJ ;PROTECT OFF
0 ;INSERT LINE (NONE)
0 ;INSERT SPACE (NONE)
0 ;DELETE LINE (NONE)
0 ;DELETE SPACE (NONE)
BYTE (7) 33,"Y","7"," " ;MOVE TO BOTTOM
BYTE (7) 33,"H",33,"J" ;HOME AND CLEAR PAGE
VT5PSC ;ROUTINE TO POSITION TO CHARACTER
VT5PSL ;ROUTINE TO POSITION TO START OF LINE
^D24 ;LINES PER PAGE
^D80 ;CHARACTERS PER LINE
IFE FTFAST,<
MRK!TBS!SLW ;FLAGS (NO PROTECT, HARD TABS)
>
IFN FTFAST,<
MRK!TBS!NPG!SLW ;FLAGS (NO PROTECT, HARD TABS, KEEP TTY PAGE)
>
TENTRY ;ROUTINE TO CALL ON ENTRY
TEXIT ;ROUTINE TO CALL ON EXIT
0 ;NO NULLS NEEDED
IVT52 ;ADDRESS OF INPUT CHARACTER TABLE
"~" ;MARK TO DISPLAY ON ENTER
IFE FTFAST,<
0 ;COMMAND FOR RUBOUT (RESET)
IVT52: EXP 40, 1, 2, 3, 4, 5, 6, 7 ;NOTHING SPECIAL
EXP 42,11,50,13,14,15,16,17
EXP 20,21,22,23,24,25,26,27
EXP 30,31,32
-SIZ.IS,,I.VT52 ;ESCAPE NEEDS A SUBTABLE
EXP 62,35,63,37
>
IFN FTFAST,<
;THIS TABLE SETS UP THE KEYBOARD ARRANGEMENT FOR WHEN YOU NEED TO KEEP
;TTY PAGE IN EFFECT BECAUSE THE TERMINAL SENDS OUT ITS OWN CONTROL S AND Q'S
;THOSE TWO CHARACTERS CANNOT BE COMMANDS SINCE SED DOES NOT KNOW WHETHER THE
;USER HAS TYPED THEM OR THEY WERE SENT BY THE TERMINAL.
;SO Q GOES TO A, A AND S GO TO K AND L, K TO ESCAPE-L, AND L TO ESCAPE-T
0 ;COMMAND FOR RUBOUT (RESET)
IVT52: EXP 40,21, 2, 3, 4, 5, 6, 7 ;NOTHING SPECIAL
EXP 42,11,50, 1,23,15,16,17
EXP 20, 0,22, 0,24,25,26,27
EXP 30,31,32
-SIZ.IS,,I.VT52 ;ESCAPE NEEDS A SUBTABLE
EXP 62,35,63,37
>
I.VT52: 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
IAVT52,,"?" ;ESCAPE ? == CHECK SOME MORE
IFN FTFAST,<
13,,"L" ;ESCAPE L == SLIDE-LEFT
14,,"T" ;ESCAPE T == SLIDE-RIGHT
>
51,,"S" ;ESCAPE S == SET-TABS
51,,"s" ;ESCAPE s == SET-TABS
SIZ.IS=.-I.VT52
IAVT52: 41,,"M" ;ESCAPE ? M == INSERT-MODE
57,,"t" ;ESCAPE ? t == START-OF-LINE
60,,"v" ;ESCAPE ? v == END-OF-LINE
52,,"x" ;ESCAPE ? x == UP-TAB
53,,"r" ;ESCAPE ? r == DOWN-TAB
61,,"n" ;ESCAPE ? n == ERASE-WORD
43,,"p" ;ESCAPE ? p == REAL-TAB
44,,"w" ;ESCAPE ? w == MARK
46,,"y" ;ESCAPE ? y == CASE
54,,"u" ;ESCAPE ? u == REWRITE SCREEN
47,,"q" ;ESCAPE ? q == WINDOW
56,,"s" ;ESCAPE ? s == HELP
57,,"T" ;ESCAPE ? T == START-OF-LINE
60,,"V" ;ESCAPE ? V == END-OF-LINE
52,,"X" ;ESCAPE ? X == UP-TAB
53,,"R" ;ESCAPE ? R == DOWN-TAB
61,,"N" ;ESCAPE ? N == ERASE-WORD
43,,"P" ;ESCAPE ? P == REAL-TAB
44,,"W" ;ESCAPE ? W == MARK
46,,"Y" ;ESCAPE ? Y == CASE
54,,"U" ;ESCAPE ? U == REWRITE SCREEN
47,,"Q" ;ESCAPE ? Q == WINDOW
56,,"S" ;ESCAPE ? S == HELP
0
;ROUTINE CALLED ON ENTRY: SET UP KEYPAD IN APPLICATION MODE
TENTRY: MOVE T1,[BYTE (7) 33,"="]
PUSHJ P,PUTSQ1
JRST PUTTYP
;ROUTINE CALLED ON EXIT: RESTORE KEYPAD TO NON-APPLICATION MODE
TEXIT: MOVE T1,[BYTE (7) 33,">"]
PUSHJ P,PUTSQ1
JRST PUTTYP
;POSITIONING ALGORITHMS
VT5PSC: 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
VT5PSL: 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