Trailing-Edge
-
PDP-10 Archives
-
BB-M836B-BM
-
tools/sed/sedsym.mac
There are 13 other files named sedsym.mac in the archive. Click here to see a list.
UNIVERSAL SEDSYM - SYMBOLS USED BY THE SED EDITOR AND ITS TERMINAL TABLES
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.
;THE ACTUAL CRT EDITOR PROGRAM IS IN SED.MAC
CUSTVR==0 ;DEC DEVELOPMENT
HALVER==1 ;MAJOR VERSION
HALMVR==2 ;MINOR VERSION
HALEVR==530 ;EDIT NUMBER
TOPS10==0 ;ON IF TOPS10; OFF IF TOPS20
FTIMD== 0 ;ADD INSERT-MODE WORDS TO TERMINAL OUTPUT TABLE
NEWTAB==1 ;SET UP NEW KEYBOARD ARRANGEMENT TABLE
FTJOUR==0 ;ASSEMBLE JOURNALING CODE
FTTST== 0 ;NEW CODE THAT'S NOT READY TO RELEASE
FTDDT== 0 ;DEBUG - PUT SYMBOLS IN HIGHSEG
;TOPS-10 SPECIFIC SWITCHES (MEANINGFUL ONLY IF TOPS10==1 ABOVE)
FTKA10==0 ;ON IF PROCESSOR IS A KA-10
FTTMPC==1 ;TRY TO WRITE nnnSED.TMP TO TMPCOR (24 WORDS)
FTSFD== 1 ;SFD SUPPORT DESIRED
SFDLVL==5 ;MAXIMUM SUPPORTED SFD LEVEL
IFN FTSFD,<LUKLEN==5> ;LENGTH OF THE LOOKUP BLOCK
IFE FTSFD,<LUKLEN==16>
;TOPS-20 SPECIFIC SWITCHES (MEANINGFUL ONLY IF TOPS10==0 ABOVE)
FTSTSN==0 ;SET UP "SED" IN TOPS-20'S SUBSYSTEM TABLE
FTECHO==0 ;LET MONITOR ECHO PRINTING CHARACTERS WHEN IT CAN
;OTHER SWITCHES
FTNIHO==0 ;NIH HACKS RELATED TO I/O (ACH)
FTNIH== 0 ;OTHER NIH HACKS (ACH)
;EDITOR PARAMETERS (CAN BE DIDDLED IF DESIRED)
STKSIZ==20 ;SIZE OF PUSH-DOWN STACK
MAXSIZ==^D1200 ;MAXIMUM FILE SIZE (BLOCKS) THAT CAN BE EDITED
PCBSIZ==600 ;SIZE OF PICK AND CLOSE BUFFER
PARBLN==40 ;SIZE OF PARAMETER BUFFER
NOBYTE==140 ;LENGTH OF LOOK-AHEAD WHEN SEARCHING FOR NULLS
SQZVAL==100 ;NUMBER OF DELETE COMMANDS BETWEEN SQUEEZES
XBFNUM==50 ;NUMBER OF EXECUTE BUFFERS (NOT MORE THAN 64 DECIMAL)
XCFSIZ==XBFNUM*3 ;SIZE OF EXECUTE BUFFER FREE SPACE
IFN TOPS10,<TYPSIZ==40>
IFE TOPS10,<
IFN FTECHO,<TYPSIZ==200> ;SIZE OF TYPE BUFFER
IFE FTECHO,<TYPSIZ==40>
>
JRNSIZ==26 ;SIZE OF JOURNAL BUFFER
IFN TOPS10,< ;LENGTH OF ALL THE FILESPECS
IFN FTSFD,<SPCSIZ==14+4+LUKLEN+4+SFDLVL>
IFE FTSFD,<SPCSIZ==14+4+LUKLEN>
>
IFE TOPS10,<SPCSIZ==14>
;AC DEFINITIONS
T0=0 ;USED HERE AND THERE ONLY WHEN ABSOLUTELY NEEDED
T1=1 ;THE USUAL SCRATCH ACS
T2=2
T3=3
T4=4
F=5 ;FLAGS IN BOTH HALVES
TM=7 ;USER'S TERMINAL INDEX
TY=10 ;POINTER INTO TYPE BUFFER
SL=11 ;OFFSET FROM LEFT MARGIN (SET BY SLIDES)
DO=12 ;COMMAND THAT USER TYPED
PT=13 ;HOLDS VARIOUS POINTERS
EN=14 ;POINTER TO END OF BUFFER IN USE
RW=15 ;ROW CURSOR IS ON
CM=16 ;COLUMN CURSOR IS ON
P=17 ;STACK POINTER
;FLAGS IN LH OF F
FLG==1 ;TEMPORARY FLAG - EACH ROUTINE MAY SET, AND MUST CLEAR
ENT==2 ;ENTER HAS BEEN TYPED
XPL==4 ;LINPTR IS INVALID
XPC==10 ;CHRPTR IS INVALID
XPB==20 ;BOTPTR IS INVALID
FNC==40 ;FENCE IS ON THE SCREEN
CCH==100 ;NEXT CHARACTER SHOULD BE A CONTROL CHARACTER
INT==200 ;AT SOFTWARE INTERRUPT LEVEL (TOPS20)
CWT==400 ;CHARACTER ALREADY TYPED AND WAITING
CHG==1000 ;FILE HAS BEEN MODIFIED
SCN==2000 ;IN SCAN MODE
WRH==4000 ;FILL HOLE (FROM MAKSPC) WITH CONTENTS OF PICK BUFFER
LFF==10000 ;LOOKING FOR A LINEFEED (DISPLAY ROUTINES)
ERF==20000 ;JUST HAD AN ERROR
INS==40000 ;IF POINTING BEYOND LINE OR FILE, INSERT LINES OR SPACES
SMF==100000 ;FILE AND ALTERNATE FILE ARE THE SAME
FBL==200000 ;BOTTOM LINE OF SCREEN IS FRAGGED - REWRITE
PCM==400000 ;MARK HAS BEEN MADE (FOR PICK OR CLOSE-LINES)
;FLAGS IN RH OF F
POV==1 ;PICK BUFFER HAS OVERFLOWED
COV==2 ;CLOSE BUFFER HAS OVERFLOWED
RDO==4 ;FILE IS READ-ONLY - NO MODIFICATIONS ALLOWED
CMV==10 ;DOING CURSOR MOVEMENT DURING ENTER
XCT==20 ;WANT TO TAKE COMMANDS FROM THE EXECUTE BUFFER
XBN==40 ;WANT TO PERFORM AN XCT BUFFER AS A COMMAND
XSV==100 ;WANT TO SAVE COMMANDS IN THE EXECUTE BUFFER
CRE==200 ;WANT TO CREATE A FILE, IF NOT FOUND (SETFIL)
IMD==400 ;INSERT MODE TOGGLE FLAG
WTB==1000 ;ON IF WANT WORDWISE TABS
NRC==2000 ;CRLF AT BOTTOM OF SCREEN WILL CAUSE A ROLL
NLC==4000 ;MAKE SEARCHES CASE-INDEPENDENT
GFL==10000 ;FILE SET UP - CHEERY MESSAGE IS NOT IN THE BUFFER
DTB==20000 ;DISPLAY TABS AS PROTECTED I'S AND SPACES
NHP==40000 ;NO HELP IS WANTED - EXTRA ENTERS ARE IGNORED
NCR==100000 ;CR DURING INSERT MODE DOES NOT INSERT CRLF
RST==200000 ;DO NOT RESET NOMINAL AFTER EACH COMMAND EXECUTION
IND==400000 ;WANT TO LOOK INDIRECTLY AT A SET OF FILES
;FLAGS SET BY SWITCHES (PLUS XCT AND XBN). SAVED/RESTORED DURING EXECUTE
SWFLGS==NLC!RST!NRC!RDO!DTB!NHP!NCR!IMD!WTB!XCT!XBN
;FLAGS IN LH OF TM
IFN TOPS10,<
JRO==2 ;JOURNAL FILE IS OPEN
>
IFE TOPS10,<
IFN FTECHO,<
ANM==2 ;A CHARACTER WAS TYPED (NOT A COMMAND)
>>
STB==4 ;SETTABLE TABS ARE IN EFFECT
TIM==10 ;THE TERMINAL IS IN INSERT MODE
JRC==20 ;RECOVERING FROM A JOURNAL FILE
JRW==40 ;WANT TO WRITE A JOURNAL FILE
XCI==100 ;DOING AN EXECUTE INITIALIZE
WDW==200 ;SCREEN IS DIVIDED INTO WINDOWS
HTB==400 ;GOT A TABLE THAT MAKES HIGH CHARACTERS BE COMMANDS
BEP==1000 ;BEEP ON INSERT MODE, DON'T PUT UP MESSAGE
NPG==2000 ;DON'T SET TTY NO PAGE (THUS ^S ^Q ARE XOFF AND XON)
SLW==4000 ;TERMINAL IS SLOW - WRITE ERRORS ON BOTTOM OF SCREEN
NLP==10000 ;SEND NULLS AFTER CURSOR POSITIONING
NEL==20000 ;RESERVE LAST LINE FOR PARMS ETC; DON'T REWRITE FROM FILE
MRK==40000 ;NO PROTECTED FIELDS; THUS, MARK NEEDED ON ENTER
WRP==100000 ;LONG LINES WRAP AROUND TO NEXT LINE OF SCREEN
TBS==200000 ;HARDWARE TABS EXIST (AND ARE PRE-SET)
LSD==400000 ;LINEFEED AND CURSOR DOWN ARE THE SAME CHARACTER
;DEFINITIONS OF WORDS IN TERMINAL OUTPUT TABLE
CUP==0 ;CURSOR UP
CDN==1 ;DOWN
CRG==2 ;RIGHT
CLF==3 ;LEFT
CHM==4 ;HOME
CPG==5 ;CLEAR TO END OF PAGE
CLN==6 ;CLEAR TO END OF LINE
RUP==7 ;ROLL SCREEN UP AND CLEAR NEW LINE
RLD==10 ;ROLL SCREEN DOWN, DITTO
PON==11 ;PROTECT ON
POF==12 ;PROTECT OFF
ILN==13 ;INSERT A BLANK LINE
ISP==14 ;INSERT A SPACE
DLN==15 ;DELETE A LINE
DSP==16 ;DELETE A SPACE
MVB==17 ;MOVE TO BOTTOM OF PAGE
HCP==20 ;HOME AND CLEAR PAGE
PSC==21 ;SEQUENCE TO START CURSOR POSITIONING
PSL==22 ;TYPE OF POSITIONING ALGORITHM TO USE
LPP==23 ;LINES PER PAGE
CPL==24 ;CHARACTERS PER LINE
TCH==25 ;TERMINAL CHARACTERISTICS FLAGS
RTE==26 ;ROUTINE TO CALL WHEN EDITOR IS STARTED
RTX==27 ;ROUTINE TO CALL WHEN EDITOR IS EXITED
NUL==30 ;NUMBER OF NULLS TO OUTPUT,,NULL CHARACTER
ITB==31 ;ADDRESS OF INPUT CHARACTER TABLE
IFE FTIMD,<
MAR==32 ;MARK TO PUT UP ON ENTER (IF NO PROTECTED FIELDS)
>
IFN FTIMD,<
IMO==32 ;SEQUENCE TO TURN INSERT MODE ON
IMF==33 ;SEQUENCE TO TURN INSERT MODE OFF
MAR==34 ;MARK TO PUT UP ON ENTER (IF NO PROTECTED FIELDS)
>
;MACROS TO MAKE KA-10'S HAPPY - SIMULATE DOUBLE MOVES USING MOVES
SALL
IFN FTKA10,<
DEFINE DMOVE(A,B),<
MOVE A,B
MOVE A+1,1+B
>
DEFINE DMOVEM(A,B),<
MOVEM A,B
MOVEM A+1,1+B
>>
;MACROS TO DO THINGS IN THE 10 OR THE 20 WAY
DEFINE SNOOZE(A),< ;SLEEP FOR A WHILE
MOVEI T1,A
IFN TOPS10,<
HIBER T1,
HALT
>
IFE TOPS10,<
DISMS
>>
DEFINE GETCHR,< ;READ A CHARACTER FROM TERMINAL INTO T1
IFN TOPS10,<
MOVE T1,[XWD 2,CHRIN]
TRMOP. T1,
HALT
>
IFE TOPS10,<
PBIN
>>
DEFINE TYPCHA,< ;TYPE OUT THE CHARACTER IN T1
IFN TOPS10,<
IFE FTNIHO,<
OUTCHR T1
>
IFN FTNIHO,<
PUSHJ P,PUTONE
>>
IFE TOPS10,<
PBOUT
>>
DEFINE TYPCHI(A),< ;TYPE OUT THE GIVEN CHARACTER
IFN TOPS10,<
IFE FTNIHO,<
OUTCHR [A]
>
IFN FTNIHO,<
IONEOU [A]
>>
IFE TOPS10,<
MOVEI T1,A
PBOUT
>>
DEFINE GOTINP,< ;SKIP IF THERE'S ANYTHING IN THE INPUT BUFFER
IFN TOPS10,<
MOVE T1,[XWD 2,TSTIN]
TRMOP. T1,
>
IFE TOPS10,<
MOVEI T1,.PRIIN ;BEWARE: T2 GETS FRAGGED
SIBE
JRST .+2
>>
COMMENT \
NAMES OF COMMANDS FOR THE TERMINAL INPUT TABLE
The terminal input table maps sequences of characters arriving
from the terminal into the internal editor commands. The editor
commands are described below. The commands are organized with regard
to their position on the typewriter keyboard, and not alphabetically.
Note: all values pertaining to characters are in octal in this
listing.
INTERNAL "USUAL"
CODE COMMAND SEQUENCE FUNCTION
\
$CURUP== 36 ; CURSOR-UP Move the cursor up
$CURDN== 34 ; CURSOR-DOWN Move the cursor down
$CURLF== 10 ; CURSOR-LEFT ^H Move the cursor to the left
$CURRT== 35 ; CURSOR-RIGHT Move the cursor to the right
$CURHM== 37 ; CURSOR-HOME Move the cursor to the upper left
$RETRN== 15 ; CARRIAGE-RETURN ^M Good ol' ASCII carriage return
$TAB== 11 ; TAB ^I Move cursor to the next tab stop
$BKTAB== 25 ; BACKTAB ^U Move cursor to the previous tab stop
$UPTAB== 52 ; UP-TAB Up-tab (6 cursor-ups)
$DNTAB== 53 ; DOWN-TAB Down-tab (6 cursor-downs)
$LINE== 45 ; LINE Move to beginning or end of line
$BLINE== 57 ; BEGIN-LINE Move to beginning of line
$ELINE== 60 ; END-LINE Move to end of line
$RLFWP== 31 ; ROLL-FORW-PAGES ^Y Move window forward some pages
$RLFWL== 24 ; ROLL-FORW-LINES ^T Move window forward some lines
$RLBKP== 21 ; ROLL-BACK-PAGES ^Q Move window back some pages
$RLBKL== 27 ; ROLL-BACK-LINES ^W Move window back some lines
$SLDLF== 13 ; SLIDE-LEFT ^K Move viewing window to the left
$SLDRT== 14 ; SLIDE-RIGHT ^L Move viewing window to the right
$GOTO== 20 ; PERCENT-GOTO ^P Move window to a percent of the line
$INSSP== 1 ; INSERT-SPACES ^A Add some spaces at the cursor
$DELSP== 23 ; DELETE-SPACES ^S Remove some characters from a line
$INSLN== 4 ; INSERT-LINES ^D Add some blank lines at the cursor
$DELLN== 6 ; DELETE-LINES ^F Remove some lines at the cursor
$PICK== 26 ; PICK ^V Load buffer with text from the file
$PUT== 7 ; PUT ^G Add text to the file
$ERSLN== 50 ; ERASE-LINE ^J Erase from cursor to end of the line
$CLRLN== 12 ; CLEAR-LINE ^J Erase the line below the cursor
$DELCH== 42 ; DELETE-PREV-CHAR Delete char to left of cursor
$ERSWD== 61 ; ERASE-WORD Erase previous word
$SRCFW== 22 ; SEARCH-FORWARD ^R Search from cursor to end of file
$SRCBK== 5 ; SEARCH-BACK ^E Search from cursor to start of file
$SUBST== 63 ; SUBSTITUTE Search for a string & substitute another
$SETFI== 2 ; SET-FILE ^B Set up a new file for editing
$EXIT== 32 ; EXIT ^Z Save file and exit
$ABORT== 3 ; ABORT ^C Exit, forgetting changes
$SAVE== 55 ; SAVE-FILE Save file without exiting
$ENTER== 33 ; ENTER ESCAPE Set up an argument for a command
$RECAL== 40 ; RECALL Recall latest argument
$MARK== 44 ; MARK Mark position for PICK or CLOSE
$SWTCH== 16 ; SWITCH ^N Set operating switches, etc.
$ENTCC== 17 ; ENTER-CTRL-CHAR ^O Make the next char typed a ctrl chr
$RESET== 0 ; RESET RUBOUT Rewrite cursor, line, or screen
$INMOD== 41 ; INSERT-MODE Insert/replace toggle
$RLTAB== 43 ; REAL-TAB Insert a real tab (Same as E-C-C I)
$CASE== 46 ; CASE Change case of letter at cursor
$WINDW== 47 ; WINDOW Set or clear windowing
$REWRT== 54 ; REWRITE Rewrite screen (Same as $^RESET)
$HELP== 56 ; HELP Give help (Same as ENTER ENTER)
$PUSH== 62 ; PUSH Push to EXEC (TOPS-20 only)
$EXEC== 30 ; EXECUTE ^X Execute a sequence of commands
$ERROR== 64 ; ERROR Define an illegal command
$TBSET== 51 ; TAB SET/CLEAR Set or clear settable tabs
END