Trailing-Edge
-
PDP-10 Archives
-
BB-M836B-BM
-
tools/sed/sedm2a.mac
There are 2 other files named sedm2a.mac in the archive. Click here to see a list.
TITLE SEDM2A - MIME2A 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: .LOAD SEDM2A,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: OVM2A ;ADDRESS OF THE TERMINAL TABLE TO USE
OVM2A: 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
BYTE (7) 33,"S","J" ;PROTECT ON (START REVERSE VIDEO)
BYTE (7) 33,"S","@" ;PROTECT OFF (END REVERSE VIDEO)
BYTE (7) "A"-100 ;INSERT LINE
BYTE (7) "O"-100," ",7 ;INSERT SPACE
BYTE (7) "W"-100 ;DELETE LINE
BYTE (7) "N"-100 ;DELETE SPACE
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,<
SLW!TBS ;FLAGS (SHORT MESSAGES,HARD TABS)
>
IFN FTFAST,<
SLW!TBS!NPG ;FLAGS (SHORT MSG, 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 10,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 34,35,36,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 B AND N, B TO ESCAPE-1k, AND N TO ESCAPE-2k.
0 ;COMMAND FOR RUBOUT (RESET)
IVT52: EXP 40,21, 1, 3, 4, 5, 6, 7 ;NOTHING SPECIAL
EXP 10,11,50,13,14,15,23,17
EXP 20, 0,22, 0,24,25,26,27
EXP 30,31,32
-SIZ.IS,,I.VT52 ;ESCAPE NEEDS A SUBTABLE
EXP 34,35,36,37
>
I.VT52: 36,,"A" ;ESCAPE A == UP
34,,"B" ;ESCAPE B == DOWN
35,,"C" ;ESCAPE C == RIGHT
10,,"D" ;ESCAPE D == LEFT
33,,"P" ;ESCAPE P == ENTER
40,,"Q" ;ESCAPE Q == RECALL
37,,"R" ;ESCAPE R == HOME
IAVT52,,"?" ;ESCAPE ? == CHECK SOME MORE
SIZ.IS==.-I.VT52
IAVT52: 41,,"M" ;ESCAPE ? M == INSERT-MODE
42,,"n" ;ESCAPE ? n == DELETE-CHARACTER
43,,"p" ;ESCAPE ? p == REAL TAB
44,,"w" ;ESCAPE ? w == MARK
45,,"x" ;ESCAPE ? x == LINE
46,,"y" ;ESCAPE ? y == CASE
IFN FTFAST,<
02,,"q" ;ESCAPE ? q == SET-FILE
16,,"r" ;ESCAPE ? r == SWITCH
>
47,,"s" ;ESCAPE ? s == WINDOW
0
;ROUTINE CALLED ON ENTRY: SET UP KEYPAD IN APPLICATION MODE
TENTRY: MOVE T1,[BYTE (7) 33,"="]
PUSHJ P,PUTSQ1
MOVE T1,[BYTE (7) 33,"S","@"]
PUSHJ P,PUTSQ1 ; SET UP DEFAULT VIDEO ATTRIBUTES
MOVE T1,[BYTE (7) 33,";"]
PUSHJ P,PUTSQ1 ; SET UP MIME2A IN JUMP SCROLL MODE
JRST PUTTYP
;ROUTINE CALLED ON EXIT: RESTORE KEYPAD TO NON-APPLICATION MODE
TEXIT: MOVE T1,[BYTE (7) 33,">",33,":"]
PUSHJ P,PUTSQ1 ; RESET MIME2A TO SMOOTH SCROLL MODE
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