Trailing-Edge
-
PDP-10 Archives
-
bb-j710b-bm_tops20_v41_tools
-
tools/sed/sedh19.mac
There are 2 other files named sedh19.mac in the archive. Click here to see a list.
TITLE SEDH19 - EDITOR TERMINAL DEFINITIONS FOR THE ZENITH H19
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,SEDH19
; .LOAD/RE SEDH19,SED
; .SS SED
SEARCH SEDSYM
IFE TOPS10,<SEARCH MONSYM>
EXTERN CPOPJ,PUTTYP,PUTSTG,PUTSQ1,PUTNUM,TRMNAM,TYPBUF
EXTERN CHOME,CDOWN,CRIGHT
INTERN TERMNL
;(NO FTFAST HERE)
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) 33,"B" ; DOWN
BYTE (7) 33,"C" ; RIGHT
BYTE (7) 33,"D" ; 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) 33,"I" ;ROLL DOWN AND CLEAR LINE
BYTE (7) 33,"p" ;PROTECT ON (CPOPJ IF NONE)
BYTE (7) 33,"q" ;PROTECT OFF (CPOPJ IF NONE)
BYTE (7) 33,"L" ;INSERT LINE (0 IF NONE)
BYTE (7) 33,"@"," ",33,"O" ;INSERT SPACE (0 IF NONE)
BYTE (7) 33,"M" ;DELETE LINE (0 IF NONE)
BYTE (7) 33,"N" ;DELETE SPACE (0 IF NONE)
BYTE (7) 33,"Y","7"," " ;MOVE TO BOTTOM
BYTE (7) 33,"E" ;HOME AND CLEAR ENTIRE PAGE
POSCHR ;ROUTINE TO POSITION TO CHARACTER
POSLIN ;ROUTINE TO POSITION TO START OF LINE
^D24 ;LINES PER PAGE
^D80 ;CHARACTERS PER LINE
NPG!TBS ;TERMINAL-DEPENDENT FLAGS (KEEP TTY PAGE)
TENTRY ;ROUTINE TO CALL ON ENTRY
TEXIT ;ROUTINE TO CALL ON EXIT
0,,0 ;NUMBER OF NULLS TO OUTPUT,,NULL CHARACTER
ITABLE ;ADDRESS OF INPUT CHARACTER TABLE
;TERMINAL INPUT TABLE - TELLS WHAT CONTROL CHARACTERS OR SEQUENCES
;INVOKE WHICH COMMANDS
0 ;COMMAND FOR RUBOUT (RESET)
ITABLE: EXP 40, 0, 2, 3, 0, 0, 0, 0 ;NOTHING SPECIAL
EXP 42,11, 0, 0,13,15,25,17
EXP 20, 0,14, 0, 0, 0,16, 0
EXP 30, 0,32
-23,,ISUBTB
EXP 34,35,36,37
;SUBTABLES FOR ESCAPE
ISUBTB: 41,,"P" ;ESC P == INSERT-MODE (BLUE)
37,,"H" ;ESC H == HOME
36,,"A" ;ESC A == UP
34,,"B" ;ESC B == DOWN
35,,"C" ;ESC C == RIGHT
10,,"D" ;ESC D == LEFT
07,,"Q" ;ESC Q == PUT (RED)
01,,"@" ;ESC @ == OPEN SPACES
04,,"L" ;ESC L == INSERT LINES
06,,"M" ;ESC M == DELETE LINES
12,,"J" ;ESC J == ERASE LINE
26,,"R" ;ESC R == PICK (WHITE)
23,,"N" ;ESC N == CLOSE SPACES
SCHSUB,,"S" ;ESC S == LOOK FURTHER (F1)
LNESUB,,"T" ;ESC T == LOOK FURTHER (F2)
PGESUB,,"U" ;ESC U == LOOK FURTHER (F3)
BAKSUB,,"V" ;ESC V == LOOK FURTHER (F4)
FRWSUB,,"W" ;ESC W == LOOK FURTHER (F5)
IAZE19,,"?" ;ESC ? == LOOK FURTHER
IAZE19: 33,,"M" ;ESC ? M == ENTER (ENT)
40,,"n" ;ESC ? N == RECALL (.)
42,,"y" ;ESC ? Y == DEL-CHAR (SDC)
43,,"p" ;ESC ? P == REAL-TAB (0)
44,,"u" ;ESC ? U == MARK (S5)
45,,"q" ;ESC ? Q == LINE (S1)
46,,"r" ;ESC ? R == CASE (S2)
0
SCHSUB: SCHTBL,,33 ;ESC S ESC == LOOK FURTHER
0
SCHTBL: 05,,"V" ;ESC S ESC V == SEARCH-BACK
22,,"W" ;ESC S ESC W == SEARCH-FORWARD
0
LNESUB: LNETBL,,33 ;ESC T ESC == LOOK FURTHER
0
LNETBL: 24,,"W" ;ESC T ESC W == ROLL-FORW-LINES (F2,F5)
27,,"V" ;ESC T ESC V == ROLL-BACK-LINES (F2,F4)
0
PGESUB: PGETBL,,33 ;ESC U ESC == LOOK FURTHER
0
PGETBL: 21,,"V" ;ESC U ESC V == ROLL-BACK-PAGES (F3,F4)
31,,"W" ;ESC U ESC W == ROLL-FORW-PAGES (F3,F5)
0
BAKSUB: BAKTBL,,33 ;ESC V ESC == LOOK FURTHER
0
BAKTBL: 21,,"U" ;ESC V ESC U == ROLL-BACK-PAGES (F4,F3)
27,,"T" ;ESC V ESC T == ROLL-BACK-LINES (F4,F2)
05,,"S" ;ESC V ESC S == SEARCH-BACK (F4,F1)
0
FRWSUB: FRWTBL,,33 ;ESC W ESC == LOOK FURTHER
0
FRWTBL: 22,,"S" ;ESC W ESC S == SEARCH-FORWARD (F5,F1)
24,,"T" ;ESC W ESC T == ROLL-FORW-LINES (F5,F2)
31,,"U" ;ESC W ESC U == ROLL-FORW-PAGES (F5,F3)
0
;ROUTINE CALLED ON ENTRY: SET UP KEYPAD IN APPLICATION MODE
TENTRY: HRROI T1,[BYTE (7) 33,"x","1",33,"Y",70,40,33,"p",0]
IFN TOPS10,<
OUTSTR @T1
>
IFE TOPS10,<
PSOUT
>
HRROI T1,[ASCIZ / SEARCH LINE PAGE BACK FORWARD CLEAR INSERT PUT PICK /]
IFN TOPS10,<
OUTSTR @T1
>
IFE TOPS10,<
PSOUT
>
MOVE T1,[BYTE (7) 33,"=",33,"t",33,"q",33,"H",0]
PUSHJ P,PUTSQ1
JRST PUTTYP
;SUBROUTINE CALLED ON EXIT: RESTORE KEYPAD TO NON-APPLICATION MODE
TEXIT: MOVE T1,[BYTE (7) 33,"Z"]
PUSHJ P,PUTSQ1
JRST PUTTYP
;POSITIONING ALGORITHMS
POSCHR: 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 0
IDPB T1,TY
POPJ P, ;DONE
END