Trailing-Edge
-
PDP-10 Archives
-
bb-j710b-bm_tops20_v41_tools
-
tools/sed/sedd30.mac
There are 2 other files named sedd30.mac in the archive. Click here to see a list.
TITLE SEDD30 - DATAMEDIA 3000 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,SEDD30
; .LOAD/RE SEDD30,SED
; .SS SED
SEARCH SEDSYM
IFE TOPS10,<SEARCH MONSYM>
EXTERN CPOPJ,PUTTYP,PUTSTG,PUTSQ1,PUTNUM,TRMNAM,TYPBUF
EXTERN CHOME,CDOWN,CRIGHT
INTERN TERMNL
FTFAST==0 ;SET THIS IF TERMINAL SENDS OUT XON-XOFF'S
TERMNL: OTABLE ;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
OTABLE: BYTE (7) 33,"A" ;CURSOR UP
BYTE (7) 12 ; DOWN
BYTE (7) 33,"C" ; RIGHT
BYTE (7) 10 ; LEFT
BYTE (7) 33,"H" ; HOME
BYTE (7) 33,"J" ;CLEAR TO END OF PAGE
BYTE (7) 33,"K" ;CLEAR TO END OF LINE
BYTE (7) 12 ;ROLL UP AND CLEAR LINE
BYTE (7) 0 ;ROLL DOWN AND CLEAR LINE
BYTE (7) 33,"O" ;PROTECT ON (CPOPJ IF NONE)
BYTE (7) 33,"N" ;PROTECT OFF (CPOPJ IF NONE)
BYTE (7) 0 ;INSERT LINE (0 IF NONE)
BYTE (7) 33,"R" ;INSERT SPACE (0 IF NONE)
BYTE (7) 0 ;DELETE LINE (0 IF NONE)
BYTE (7) 0 ;DELETE SPACE (0 IF NONE)
BYTE (7) 33,"Y"," ","7" ;MOVE TO BOTTOM
BYTE (7) 33,"H",33,"J" ;HOME AND CLEAR ENTIRE PAGE
POSCUR ;ROUTINE TO POSITION TO CHARACTER
POSLIN ;ROUTINE TO POSITION TO START OF LINE
^D24 ;LINES PER PAGE
^D80 ;CHARACTERS PER LINE
IFE FTFAST,<
LSD!WRP ;TERMINAL-DEPENDENT FLAGS
>
IFN FTFAST,<
LSD!WRP!NPG ;TERMINAL-DEPENDENT FLAGS (KEEP TTY PAGE)
>
CPOPJ ;ROUTINE TO CALL ON ENTRY
CPOPJ ;ROUTINE TO CALL ON EXIT
0,,0 ;NUMBER OF NULLS TO OUTPUT,,NULL CHARACTER
ITABLE ;ADDRESS OF INPUT CHARACTER TABLE
0 ;MARK TO DISPLAY ON ENTER (OMIT IF MRK NOT SET)
;TERMINAL INPUT TABLE - TELLS WHAT CONTROL CHARACTERS OR SEQUENCES
;INVOKE WHICH COMMANDS
;NOTE: D3000 KEYS NOT USED: PF10=$y<CR> XMIT=$L XMIT-LINE=$T MR=$M
; PRINT=$] ROLL=$V INS-CHAR=$P
IFE FTFAST,<
0 ;CODE FOR RUBOUT (0==RESET)
ITABLE: EXP 40, 1, 2, 3, 4, 5, 6, 7 ;NOTHING SPECIAL
EXP 10,11,12,13,14,15,16,17
EXP 20,21,22,23,24,25,26,27
EXP 30,31,32
-SIZ.IS,,ISUBTB ;ESCAPE NEEDS A SUBTABLE
EXP 35,33,37,36 ;ENTER==CONTROL-]
>
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)
ITABLE: EXP 40,21, 2, 3, 4, 5, 6, 7 ;NOTHING SPECIAL
EXP 10,11,12, 1,23,15,16,17
EXP 20, 0,22, 0,24,25,26,27
EXP 30,31,32
-SIZ.IS,,ISUBTB
EXP 35,33,37,36 ;ENTER==CONTROL-]
>
;SUBTABLE. PUT THE MOST FREQUENTLY-USED SEQUENCES FIRST
;ENTER IS PROBABLY THE MOST COMMON OF ALL
ISUBTB: D3PF1,,"p" ;PF1 == ENTER
35,,"C" ;ESCAPE C == CURSOR-RIGHT
36,,"A" ;ESCAPE A == CURSOR-UP
D3PF2,,"q" ;PF2 == RECALL
D3PF3,,"r" ;PF3 == INSERT-MODE
D3PF4,,"s" ;PF4 == MARK
D3PF5,,"t" ;PF5 == TAB
D3PF6,,"u" ;PF6 == LINE
D3PF7,,"v" ;PF7 == CASE
D3PF8,,"w" ;PF8 == ERASE-CHAR
D3PF9,,"x" ;PF9 == HOME
33,,"E" ;ESCAPE E == ENTER
33,,"e"
41,,"I" ;ESCAPE I == INSERT-MODE
41,,"i"
44,,"M" ;ESCAPE M == MARK
44,,"m"
50,,"K" ;ESCAPE K == ERASE-LINE
50,,"k"
47,,"W" ;ESCAPE W == WINDOW
47,,"w"
IFN FTFAST,<
13,,"L" ;ESCAPE L == SLIDE-LEFT
14,,"R" ;ESCAPE R == SLIDE-RIGHT
13,,"l" ;ESCAPE l == SLIDE-LEFT
14,,"r" ;ESCAPE r == SLIDE-RIGHT
>
SIZ.IS=.-ISUBTB
D3PF1: 33,,0
D3PF2: 40,,0
D3PF3: 41,,0
D3PF4: 44,,0
D3PF5: 43,,0
D3PF6: 45,,0
D3PF7: 46,,0
D3PF8: 42,,0
D3PF9: 37,,0
;SUBROUTINE TO MOVE TO ROW (RW), COLUMN (CM)
POSCUR: MOVE T1,[BYTE (7) 33,"Y"]
PUSHJ P,PUTSQ1 ;START IT OFF
MOVEI T1,40(CM) ;GET COLUMN POSITION
IDPB T1,TY
MOVEI T1,40(RW) ;GET ROW POSITION
IDPB T1,TY
POPJ P, ;DONE
;SUBROUTINE TO MOVE TO START OF LINE (T4)
POSLIN: MOVE T1,[BYTE (7) 33,"Y"]
PUSHJ P,PUTSQ1 ;START IT OFF
MOVEI T1,40 ;MOVE TO COLUMN ZERO
IDPB T1,TY
MOVEI T1,40(T4) ;GET ROW POSITION
IDPB T1,TY
POPJ P,
END