Google
 

Trailing-Edge - PDP-10 Archives - LCG_Integration_Tools_Clearinghouse_T20_v7_30Apr86 - tools/sed2/seditb.mar
There are 5 other files named seditb.mar in the archive. Click here to see a list.
.TITLE SEDITB - SYMBOLIC VALUES FOR SED INPUT TABLE COMMANDS


.MACRO PRMDEF	;Macro to define the general SED parameters

;Define some characters
CR=13		;Carriage return
LF=10		;Line feed

;Editor Parameters (can be diddled if desired)

MAX_FILE_SIZE=2000*512 ;Number of words in maximum size file
PCBSIZ=2048	;Size of pick and close buffer
PARBLN=2048	;Size of parameter buffer
NOBYTE=480	;Length of look-ahead when searching for nulls
SQZVAL=64	;Number of delete commands between squeezes
MRKSIZ=10	;Number of markers allowed
MRKSTL=8	;Length of marker stack
XBFNUM=50	;Number of execute buffers (not more than 64)
XCFSIZ=XBFNUM*30;Size of each execute buffer
TYPSIZ=160	;Size of type buffer
JRNSIZ=100	;Size of journal buffer
SPCSIZ=100	;Size of filespec
.ENDM	PRMDEF

;                     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.  If the ordering seems strange  it  is
;because  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
;manual.

;  INTERNAL                   "USUAL"
;    CODE       COMMAND      SEQUENCE  FUNCTION


.MACRO SEQDEF
$inssp=  ^O1 ; INSERT-SPACES    ^A     add some spaces at the cursor
$setfi=  ^O2 ; SET-FILE         ^B     set up a new file for editing
$abort=  ^O3 ; ABORT            ^C     exit, forgetting changes
$insln=  ^O4 ; INSERT-LINES     ^D     add some blank lines at the cursor
$srcbk=  ^O5 ; SEARCH-BACK      ^E     search from cursor to start of file
$delln=  ^O6 ; DELETE-LINES     ^F     remove some lines at the cursor
$put=    ^O7 ; PUT              ^G     add text to the file
$curlf= ^O10 ; CURSOR-LEFT      ^H     move the cursor to the left
$tab=   ^O11 ; TAB              ^I     move cursor to the next tab stop
$clrln= ^O12 ; CLEAR-LINE       ^J     erase the line below the cursor
$sldlf= ^O13 ; SLIDE-LEFT       ^K     move viewing window to the left
$sldrt= ^O14 ; SLIDE-RIGHT      ^L     move viewing window to the right
$retrn= ^O15 ; CARRIAGE-RETURN  ^M     good ol' ASCII carriage return
$swtch= ^O16 ; SWITCH           ^N     set operating switches, etc.
$entcc= ^O17 ; ENTER-CTRL-CHAR  ^O     make the next char typed a ctrl chr
$goto=  ^O20 ; PERCENT-GOTO     ^P     move window to a percent of the line
$rlbkp= ^O21 ; ROLL-BACK-PAGES  ^Q     move window back some pages
$srcfw= ^O22 ; SEARCH-FORWARD   ^R     search from cursor to end of file
$delsp= ^O23 ; DELETE-SPACES    ^S     remove some characters from a line
$rlfwl= ^O24 ; ROLL-FORW-LINES  ^T     move window forward some lines
$bktab= ^O25 ; BACKTAB          ^U     move cursor to the previous tab stop
$pick=  ^O26 ; PICK             ^V     load buffer with text from the file
$rlbkl= ^O27 ; ROLL-BACK-LINES  ^W     move window back some lines
$exec=  ^O30 ; EXECUTE          ^X     execute a sequence of commands
$rlfwp= ^O31 ; ROLL-FORW-PAGES  ^Y     move window forward some pages
$exit=  ^O32 ; EXIT             ^Z     save file and exit

$enter= ^O33 ; ENTER            ESCAPE set up an argument for a command
$curdn= ^O34 ; CURSOR DOWN      ^\
$currt= ^O35 ; CURSOR RIGHT     ^]
$curup= ^O36 ; CURSOR UP        ^^
$curhm= ^O37 ; CURSOR HOME      ^_

$reset=  ^O0 ; RESET            RUBOUT rewrite cursor, line, or screen
$recal= ^O40 ; RECALL           (NONE) recall latest argument
$inmod= ^O41 ; INSERT-MODE      (NONE) insert/replace toggle
$delch= ^O42 ; DELETE-CHARACTER (none) delete char to left of cursor
$rltab= ^O43 ; REAL-TAB         (none) insert a real tab (same as E-C-C I)
$mark=  ^O44 ; MARK             (none) mark position for PICK or DELETE
$line=  ^O45 ; LINE             (none) move to start or end of line
$case=  ^O46 ; CASE             (none) change case of character at cursor
$windw= ^O47 ; WINDOW           (none) set or clear split-screen window
$ersln= ^O50 ; ERASE-LINE       (none) erase from cursor to end of line
$tbset= ^O51 ; SET/CLEAR-TABS   (none) set/clear tabs
$uptab= ^O52 ; UP-TAB           (none) up-tab (6 cursor ups)
$dntab= ^O53 ; DOWN-TAB         (none) down-tab (6 cursor downs)
$rewrt= ^O54 ; REWRITE-SCREEN   (none) rewrite screen
$save=  ^O55 ; SAVE-FILE        (none) save file
$help=  ^O56 ; HELP             (none) on-line help (same as ENTER ENTER)
$bline= ^O57 ; START-OF-LINE    (none) cursor to start of line
$eline= ^O60 ; END-OF-LINE      (none) cursor to end of line
$erswd= ^O61 ; ERASE-WORD       (none) erase word (like TOPS-10 7.01 ^W)
$push=  ^O62 ; PUSH	        (none) Push to exec
$subst= ^O63 ; SUBSTITUTE	(none) search for a string & substitute another
$error= ^O64 ; ERROR		(none) Define an illegal command
$justi=	^O65 ; JUSTIFY		(none) justify text (fill or nofill)
$markr=	^O66 ; MARKER		(none) work with markers in the file

$setct= ^O701 ; Set counter execute construct (not a command)
.ENDM	SEQDEF

;Macro to define the flag bits

.MACRO	FLGDEF
;Flags bits in flag longword F
.MACRO  FLAGS
X	FLG,0		;Temporary flag - each routine may set, and must clear
X	ENT,1		;Enter has been typed
X	XPL,2		;LINPTR is invalid
X	XPC,3		;CHRPTR is invalid
X	XPB,4		;BOTPTR is invalid
X	FNC,5		;Fence is on the screen
X	CCH,6		;Next character should be a control character
X	CWT,7		;Character already typed and waiting
X	CHG,8		;File has been modified
X	SCN,9		;In scan mode
X	WRH,10		;Fill hole (from MAKSPC) with contents of pick buffer
X	LFF,11		;Looking for a linefeed (display routines)
X	ERF,12		;Just had an error
X	INS,13		;If pointing beyond line or file, insert lines or spaces
X	SMF,14		;File and alternate file are the same
X	FBL,15		;Bottom line of screen is fragged - rewrite
X	PCM,16		;Mark has been made (for pick or close-lines)
X	POV,17		;Pick buffer has overflowed
X	COV,18		;Close buffer has overflowed
X	RDO,19		;File is read-only - no modifications allowed
X	CMV,20		;Doing cursor movement during enter
X	CRE,21		;Want to create a file, if not found (SETFIL)
X	IMD,22		;Insert mode toggle flag
X	WTB,23		;On if want wordwise tab
X	NRC,24		;CRLF at bottom of screen will cause a roll
X	NLC,25		;Make searches case-independent
X	GFL,26		;File set up - cheery message is not in the buffer
X	DTB,27		;Display tabs as protected I's and spaces
X	NHP,28		;No help is wanted - extra enters are ignored
X	NCR,29		;CR during insert mode does not insert CRLF
X	RST,30		;Do not reset nominal after each command execution
X	IND,31		;Want to look indirectly at a set of files
.ENDM	FLAGS

;Flags in flag longword F1
.MACRO	FLAGS1
X	XCT,0		;Want to take commands from the execute buffer
X	XBN,1		;Want to perform an XCT buffer as a command
X	XSV,2		;Want to save commands in the execute buffer
X	JRO,3		;Journal file is open
X	JRC,4		;Recovering from a journal file
X	JRW,5		;Want to write a journal file
X	XCI,6		;Doing an execute initialize
X	WDW,7		;Screen is divided into windows
X	HTB,8		;Got a table that makes high characters be commands
X	BEP,9		;Beep on insert mode, don't put up message
X	NPG,10		;Don't set tty no page (thus ^S ^Q are XOFF and XON)
X	SLW,11		;Terminal is slow - write errors on bottom of screen
X	NLP,12		;Send nulls after cursor positioning
X	NEL,13		;Reserve last line for parms etc; don't rewrite from file
X	MRK,14		;No protected fields; thus, mark needed on enter
X	WRP,15		;Long lines wrap around to next line of screen
X	TBS,16		;Hardware tabs exist (and are pre-set)
X	LSD,17		;Linefeed and cursor down are the same character
X	PST,18		;Starting to enter a parameter
X	NOC,19		;Don't insert CRLF in CONVCR routine
X	STB,20		;User settable tabs are in effect
X	FLG2,21		;Second general flag bit
X	ACH,22		;File attributes will change when file is saved
X	TIM,23		;The terminal is in insert-mode
.ENDM	FLAGS1

;Macro to define the bit in mask format
.MACRO X FLAG,BIT
M_'FLAG'=1@BIT
.ENDM X

;Now define the mask bits
	FLAGS
	FLAGS1

;Define the bit masks needed for executes
SWFLGS=M_NLC!M_RST!M_NRC!M_RDO!M_DTB!M_NHP!M_NCR!M_IMD!M_WTB
SWFLGS2=M_XCT!M_XBN!M_BEP!M_LSD!M_JRC

;Define the macro for the bits as values
.MACRO X FLAG,BIT
V_'FLAG'=BIT
.ENDM X

;Now define the bit values
	FLAGS
	FLAGS1
.ENDM	FLGDEF

;Define the words in the terminal output table

.MACRO	TRMDEF
;Definitions of words in terminal output table
CUP=0		;Cursor up
CDN=4		;Down
CRG=8		;Right
CLF=12		;Left
CHM=16		;Home
CPG=20		;Clear to end of page
CLN=24		;Clear to end of line
RUP=28		;Roll screen up and clear new line
RLD=32		;Roll screen down, ditto
PON=36		;Protect on
POF=40		;Protect off
ILN=44		;Insert a blank line
ISP=48		;Insert a space
DLN=52		;Delete a line
DSP=56		;Delete a space
MVB=60		;Move to bottom of page
HCP=64		;Home and clear page
PSC=68		;Sequence to start cursor positioning
PSL=72		;Type of positioning algorithm to use
LPP=76		;Lines per page
CPL=80		;Characters per line
TCH=84		;Terminal characteristics flags
RTE=88		;Routine to call when editor is started
RTX=92		;Routine to call when editor is exited
NUL=96		;Number of nulls to output and null character
ITB=100		;Address of input character table
MAR=104		;Mark to put up on enter (if no protected fields)
KPD=108		;Address of routine to change keypad mode (VTXX type terminals)
OVF=112		;String to output to indicate line extends beyond screen
IMO=116		;Sequence to turn insert mode on
IMF=120		;Sequence to turn insert mode off
.ENDM	TRMDEF

;Macro to sleep a specified number of milliseconds
.MACRO	SNOOZE	VALUE
	MOVL	#-10*1000*VALUE,SNZVAL	;Save the length of the sleep
	$SCHDWK_S DAYTIM=SNZVAL	;Schedule a wakeup
	$HIBER_S		;Sleep until waken
.ENDM	SNOOZE

;Macro to generate external statements for variables defined in other modules.
;This macro is called at the end of each file to define the routines
;called from other modules.  Any symbols defined in this module are not
;defined as external.

.MACRO	GENEXT	A1,A2,A3,A4,A5,A6,A7,A8,A9,A10
	.IRP	ARG,<A1,A2,A3,A4,A5,A6,A7,A8,A9,A10>
		.IF NOT_BLANK, ARG
			.IIF NOT_DEFINED, ARG, .EXTERNAL ARG
		.ENDC
	.ENDR
.ENDM	GENEXT

.MACRO	GLOB
.NOCROSS
GENEXT	ABOPAR,ABORT,ABORT1,ADDCR,ADDLNS,ADDLNX,ADDLSP,ADDLSX
GENEXT	ADDSLN,ADDSPC,ADDSPS,ADJWRD,ADVDPT,ADVLPT,AGNFLG
GENEXT	AJDONE,ALPERR,ALPIMD,ALPNU1,ALPNUM,APPFLG,BAKDPT
GENEXT	BAKFLG,BAKTAB,BLIARG,BLINE,BOTPTR
GENEXT	BTBARG,BUFFEN
GENEXT	BUFFER,CALCCM,CALCML,CALCRW,CASLIN,CASLNS,CASNPM
GENEXT	CASSPS,CBOTOM,CCREOL,CDOWN,CHARAC,CHGCAS,CHGSPC
GENEXT	CHOME,CHRCUR,CHRCNT
GENEXT	CHRPTR,CLAFLG,CLEARP
GENEXT	CLEFT,CLLNPM,CLOSLN,CLOSSP,CLRALL,CLRLNA
GENEXT	CLRLNR,CLRMKS,CLS_FAB,CLS_RAB,CLSBUF
GENEXT	CLSCNT,CLSJFN,CLSNPM,CLSOPN
GENEXT	CMDCLN,CMDCON,CMDCON1,CMDTB1,CMDTB2,CNIERR
GENEXT	CMDLEN,CMDNAM,CMDSET,CMVBTM,CMVTBL,CMXERR
GENEXT	COMAND,CPL.0,CPL.1,CREFLG,CRIGHT
GENEXT	CRRFLG,CURUP,DEBUG_FLAG
GENEXT	DEC_STRING,DELBUF,DELCHR
GENEXT	DELCNT,DELIM,DELSYM
GENEXT	DEXT,DISALL,DISCUR,DISDWN
GENEXT	DISLIN,DISONE,DISONL,DISPLL,DISPLY,DISPPT,DISPS0
GENEXT	DISPTR,DISRES,DNTAB,DNTARG,DOWN,DSPFLG,DWNARG
GENEXT	ECHBUF,EDIT_BUFF_END,EDIT_BUFF_START,EDIT_TIME
GENEXT	EEEPTR,EEXIT,ELIARG,ELINE
GENEXT	EN,END_INI
GENEXT	ENTCCH,ENTERA,ENTERM,ENTHLP,ENTRMK,ERASLN
GENEXT	ERASPM,ERASWD,ERRDSP,ERROR,ERROR_CODE,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STE,PUTSTF
GENEXT	PUTSTG,PUTSTS,PUTSTX,PUTTYF,PUTTYP
GENEXT	RBKNPM,RBLNPM,RDOERR,REAL_NAME,REALTB,REC_ATT,RECAL1
GENEXT	RECALL,RECAR1,RECARG,RECOVR,REDNO
GENEXT	REDSWH,REDSYM,REDTMP,REINIT_TTY
GENEXT	RESCAN_DESC,RESCAN_LENGTH,RESCAN_LINE,RESET,RESNPM
GENEXT	RESTORE_TTY,RESTP1,RESTPM,RESULT_NAME,RETARG
GENEXT	RETROL,RETURN,RFLNPM,RFPNPM,RGTARG,RIGHT,RIGHT1,RLCFLG
GENEXT	RMARGN,ROLBKL,ROLBKP,ROLFW,ROLFW0,ROLFW1,ROLFWL
GENEXT	ROLFWP,ROLLDN,ROLLIN,ROLLS,ROLLUP,ROLPGS,RPLTAB
GENEXT	RSCANF,RSCANL,RSTNOM,RWRARG,SAMFIL,SAVCNT
GENEXT	SAVCPG,SAVCPT,SAVDLN
GENEXT	SAVE_PROT,SAVE_TTY_BITS,SAVEAC,SAVEDP,SAVEFG
GENEXT	SAVEIT,SAVERW,SAVESL,SAVFGS,SAVFIL
GENEXT	SAVFLG,SAVILN,SAVLPP,SAVMGN,SAVNUM,SAVPML
GENEXT	SAVPOS,SAVPRM,SAVRLD,SAVRUP
GENEXT	SEDTERM,SET_CHAR_BUFF,SET_PROG,SETCHBF,SETCHLEN
GENEXT	SETFIL,SETFL1,SETFLC,SETIND
GENEXT	SETLPP,SETMFL,SETNPM
GENEXT	SETSCN,SETXCB,SL,SLDFLG,SLDSIZ,SLIDEL
GENEXT	SLIDER,SLIDES
GENEXT	SLIDNM,SLLNPM,SLRNPM,SNZVAL,SPCBUF,SPCCNT,SQUEZW
GENEXT	SQZCNT,SRBNPM,SRCBAK,SRCFWD,SRCIPT,SRCKEY,SRCKLN
GENEXT	SRCPTR,SRFNPM,SROKEY,STACK,STARS
GENEXT	STFER1,STFERR,STRFLG,STTFLG,SUBCNT,SUBDIF,SUBLNS,SUBNPM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