Google
 

Trailing-Edge - PDP-10 Archives - BB-M836A-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==410	;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
FTTST== 0	;NEW CODE THAT'S NOT READY TO RELEASE
FTDDT== 0	;DEBUG - PUT SYMBOLS IN HIGHSEG

;TOPS-10 SPECIFIC SWITCHES (MEANINGLESS IF TOPS10==0 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==4	;MAXIMUM SUPPORTED SFD LEVEL
IFN FTSFD,<LUKLEN==5>	;LENGTH OF THE LOOKUP BLOCK
IFE FTSFD,<LUKLEN==16>

;TOPS-20 SPECIFIC SWITCHES (MEANINGLESS IF TOPS10==1 ABOVE)

FTSTSN==0	;SET UP "SED" IN TOPS-20'S SUBSYSTEM TABLE
FTECHO==0	;LET MONITOR ECHO PRINTING CHARACTERS WHEN IT CAN
		;(NOTE: THIS HAS A COUPLE OF GLITCHES NOW)

;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
NOBYTE==140		;LENGTH OF LOOK-AHEAD WHEN SEARCHING FOR NULLS
SQZVAL==100		;NUMBER OF DELETE COMMANDS BETWEEN SQUEEZES
XBFNUM==40		;NUMBER OF EXECUTE BUFFERS
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==24	;SIZE OF JOURNAL BUFFER

IFN TOPS10,<	;LENGTH OF ALL THE FILESPECS
IFN FTSFD,<SPCSIZ==13+4+LUKLEN+4+SFDLVL>
IFE FTSFD,<SPCSIZ==13+4+LUKLEN>
>
IFE TOPS10,<SPCSIZ==13>

;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 FTECHO,<
ANM==10		;A CHARACTER WAS TYPED (NOT A COMMAND)
>
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
>>
	END