Trailing-Edge
-
PDP-10 Archives
-
bb-j710b-bm_tops20_v41_tools
-
tools/sed/seda3a.mac
There are 13 other files named seda3a.mac in the archive. Click here to see a list.
TITLE SEDA3A - EDITOR TERMINAL DEFINITION PROGRAM FOR THE ADM-3A
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 SEDSYM,SEDA3A,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
AUTONL==0 ;SET THIS IF TERMINAL HAS THE AUTONL SWITCH SET ON
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) 13 ;CURSOR UP
BYTE (7) 12 ; DOWN
BYTE (7) 14 ; RIGHT
BYTE (7) 10 ; LEFT
BYTE (7) 36 ; HOME
0 ;CLEAR TO END OF PAGE
0 ;CLEAR TO END OF LINE
BYTE (7) 12 ;ROLL UP AND CLEAR LINE
0 ;ROLL DOWN AND CLEAR LINE
0 ;PROTECT ON (NONE)
0 ;PROTECT OFF (NONE)
0 ;INSERT LINE (NONE)
0 ;INSERT SPACE (NONE)
0 ;DELETE LINE (NONE)
0 ;DELETE SPACE (NONE)
BYTE (7) 33,"=","7"," " ;MOVE TO BOTTOM
BYTE (7) 36,32 ;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,<
IFE AUTONL,<
MRK!LSD!SLW ;TERMINAL-DEPENDENT FLAGS (MARK, LF=DOWN)
>
IFN AUTONL,<
WRP!MRK!LSD!SLW ;TERMINAL-DEPENDENT FLAGS (WRAP, MARK, LF=DOWN)
>>
IFN FTFAST,<
IFE AUTONL,<
MRK!LSD!NPG!SLW ;TERMINAL-DEPENDENT FLAGS (KEEP TTY PAGE)
>
IFN AUTONL,<
WRP!MRK!LSD!NPG!SLW ;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
"~" ;MARK TO INSERT ON ENTER
;TERMINAL INPUT TABLE - TELLS WHAT CONTROL CHARACTERS OR SEQUENCES
;INVOKE WHICH COMMANDS
IFE FTFAST,<
0 ;CODE FOR RUBOUT (0==RESET)
ITABLE: EXP 33, 1, 2, 3, 4, 5, 6, 7 ;NOTHING SPECIAL
EXP 10,11,34,36,35,15,16,17
EXP 20,21,22,23,24,25,26,27
EXP 30,31,32
-SIZ.IS,,ISUBTB ;ESCAPE NEEDS A SUBTABLE (FOR EXAMPLE)
EXP 34,35,37,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-F, AND N TO ESCAPE-S.
0 ;COMMAND FOR RUBOUT (RESET)
ITABLE: EXP 33,21, 1, 3, 4, 5, 6, 7 ;NOTHING SPECIAL
EXP 10,11,34,36,35,15,23,17
EXP 20, 0,22, 0,24,25,26,27
EXP 30,31,32
-SIZ.IS,,ISUBTB
EXP 34,35,37,37
>
;SUBTABLE. PUT THE MOST FREQUENTLY-USED SEQUENCES FIRST
;ENTER IS PROBABLY THE MOST COMMON OF ALL
ISUBTB: $ENTER,,33 ;ESCAPE ESCAPE == ENTER
$CURHM,,"H" ;ESCAPE H == HOME
$CURHM,,"h" ;ESCAPE h == HOME
$DELCH,,"D" ;ESCAPE D == DELETE-CHARACTER
$DELCH,,"d" ;ESCAPE d == DELETE-CHARACTER
$INMOD,,"I" ;ESCAPE I == INSERT-MODE
$INMOD,,"i" ;ESCAPE i == INSERT-MODE
$RLTAB,,"T" ;ESCAPE T == REAL-TAB
$RLTAB,,"t" ;ESCAPE t == REAL-TAB
$MARK,,"M" ;ESCAPE M == MARK
$MARK,,"m" ;ESCAPE m == MARK
$RECAL,,"E" ;ESCAPE E == RECALL
$RECAL,,"e" ;ESCAPE e == RECALL
$CASE,,"C" ;ESCAPE C == CASE
$CASE,,"c" ;ESCAPE c == CASE
$SLDLF,,"L" ;ESCAPE L == SLIDE-LEFT
$SLDLF,,"l" ;ESCAPE l == SLIDE-LEFT
$SLDRT,,"R" ;ESCAPE R == SLIDE-RIGHT
$SLDRT,,"r" ;ESCAPE r == SLIDE-RIGHT
$WINDW,,"W" ;ESCAPE W == WINDOW
$WINDW,,"w" ;ESCAPE w == WINDOW
$SUBST,,"X" ;ESCAPE X == SUBSTITUTE
$SUBST,,"x" ;ESCAPE x == SUBSTITUTE
$BLINE,,"<" ;ESCAPE < == GO TO START OF LINE
$ELINE,,">" ;ESCAPE > == GO TO END OF LINE
$ERSLN,,"F" ;ESCAPE F == ERASE TO EOL
$ERSLN,,"f" ;ESCAPE f == ERASE TO EOL
$UPTAB,,"K" ;ESCAPE K == UP TAB
$UPTAB,,"k" ;ESCAPE k == UP TAB
$DNTAB,,"J" ;ESCAPE J == DOWN TAB
$DNTAB,,"j" ;ESCAPE j == DOWN TAB
$REWRT,,"Q" ;ESCAPE Q == REDRAW SCREEN
$REWRT,,"q" ;ESCAPE q == REDRAW SCREEN
$SAVE,,"Z" ;ESCAPE Z == SAVE FILE
$SAVE,,"z" ;ESCAPE z == SAVE FILE
$HELP,,"?" ;ESCAPE ? == HELP
$ERSWD,,"U" ;ESCAPE U == ERASE PREVIOUS WORD
$ERSWD,,"u" ;ESCAPE u == ERASE PREVIOUS WORD
IFN FTFAST,<
$SETFI,,"F" ;ESCAPE F == SET-FILE
$SETFI,,"f" ;ESCAPE f == SET-FILE
$SWTCH,,"S" ;ESCAPE S == SWITCH
$SWTCH,,"s" ;ESCAPE s == SWITCH
>
SIZ.IS=.-ISUBTB
;POSITIONING ALGORITHMS
POSCUR: MOVE T1,[BYTE (7) 33,"="]
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,"="]
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