Google
 

Trailing-Edge - PDP-10 Archives - decus_20tap4_198111 - decus/20-0105/xtec.man
There are 2 other files named xtec.man in the archive. Click here to see a list.
		THE XTEC MANUAL

		MARK R. CRISPIN
		OCTOBER 3, 1975
		UPDATED OCTOBER 20, 1975

	XTEC IS AN EXPERIMENTAL REPLACEMENT FOR TECO ON THE DECSYSTEM-
10.  XTEC IS A SUPERSET OF TECO, AND IS MUCH FASTER.  XTEC IS A
COMPILER RATHER THAN AN INTERPRETER(TECO), THIS HAS CAUSED INCREASES
IN EXECUTION SPEED OF TECO MACROS BY A FACTOR AS GREAT AS 30 TIMES.

	THE PURPOSE OF THIS MANUAL IS NOT TO TEACH A NEW USER XTEC;
RATHER, IT IS TO PROVIDE AN ALPHABETICAL LIST OF THE XTEC COMMANDS,
SYNTAX STRUCTURES, AND FUNCTIONS.  THE NEW USER OF XTEC IS ADVISED
TO READ THE MANUAL, "INTRODUCTION TO TECO", DEC-10-UTECA-A-D, BY
DIGITAL EQUIPMENT CORPORATION, AND THE FILE HLP:TECO.DIF(THE FORMER
IS A PRIMER IN DEC'S TECO, THE LATTER IS A DESCRIPTION OF THE S.I.T.
CHANGES TO TECO, WHICH ARE ALSO AVAILABLE IN XTEC).

COMMAND	SYNTAX			USAGE
---------------------------------------------------------------------

^@				IGNORED ON INPUT; ILLEGAL COMMAND
^A	^A...TEXT...^A		TYPE OUT THE TEXT INSIDE THE ^A'S
^B				ILLEGAL COMMAND
^C	^C			RETURN TO MONITOR WITHOUT CLOSING
				FILES OR PROCESSING ANY "ED"
^D				ENTER DDT IF A DDT IS PRESENT, OTHER-
				WISE AN ILLEGAL COMMAND
^E	^E=			THE VALUE OF THE FORM-FEED FLAG,
				-1 IF A FORM-FEED SEEN
	^EX			IN A SEARCH, MATCH WITH ANY CHARACTER
				OF TYPE X:
				A	ANY ALPHABETIC CHARACTER
				D	ANY DIGIT
				L	ANY END OF LINE CHARACTER OR
					END OF BUFFER
				S	ANY STRING OF SPACES OR TABS
				V	ANY LOWER CASE ALPHABETIC
				W	ANY UPPER CASE ALPHABETIC
				<NNN>	ASCII CHARACTER WHOSE OCTAL
					VALUE IS NNN
				[A,B,C...] ANY ONE OF THE CHARACTERS
					A,B,C...
^F	^F=			THE VALUE OF THE CONSOLE SWITCHES
	N^F=			THE VALUE OF THE UNIVERSAL I/O
				INDEX OF THE TELETYPE BELONGING TO
				JOB N(I.E. TTY+^O200000)
^G	^G=			RETURNS JOB NUMBER
	N^G=			RETURNS CONTENTS OF MONITOR LOCATION
				N(I.E. DOES A PEEK UUO)
	M,N^G=			RETURNS RESULT OF GETTAB UUO ON M,N
	^G^G			ON INPUT CANCELS COMMAND
	^G<SPACE>		ON INPUT RETYPES CURRENT LINE
^H	^H=			TIME OF DAY IN JIFFIES(A JIFFIE IS
				1/60 SEC IN USA, 1/50 WHERE 50HZ POWER
				IS USED(I.E. EUROPE))
^I	^I...TEXT...<ALT>	INSERTS A TAB AND FOLLOWING TEXT UP TO
				THE ALTMODE(I.E. IS THE SAME AS AN
				I<TAB>...TEXT...<ALT>)
^J				IGNORED ON INPUT EXCEPT IN TEXT 
				STRINGS; "LINE-FEED"
^K				IGNORED ON INPUT EXCEPT IN TEXT
				STRINGS; "VERTICAL TAB"
^L	^L			INSERTS A "FORM-FEED", DEFINES END OF
				PAGE
^M				IGNORED ON INPUT EXCEPT IN TEXT
				STRINGS; "CARRIAGE RETURN"
^N	^N=			THE VALUE OF THE END OF FILE FLAG,
				-1 IF AN END OF FILE SEEN
	^NX			IN A SEARCH, ACCEPT ANY CHARACTER
				EXCEPT X
^O	^ON			ACCEPT THE NEXT NUMERIC VALUE AS OCTAL
^P	^P=			THE NUMBER OF FORM-FEEDS SEEN(I.E.
				THE PAGE NUMBER)
	N^P			GO TO PAGE N
^Q	^QX			IN TEXT, ACCEPT THE NEXT CHARACTER
				LITERALLY
^R	^RX			SAME AS ^Q
^S	^S			IN A SEARCH, ACCEPT ANY SEPARATOR
				CHARACTER IN THIS POSITION
^T	^T=			ACCEPT A SINGLE CHARACTER FROM THE
				TTY, RETURN THE VALUE
	:M,N^T=			DO A TTCALL N,M; RETURN ANY VALUE.
				SPECIAL CASES:
				:8^T=	DOES A RESCAN 1 UUO, AND
					RETURN A -1 IF THERE WAS A
					COMMAND TO RESCAN.
				:1,8^T=	RETURN THE VALUE OF THE "CCL
					FLAG", WHICH IS -1 IF XTEC
					WAS CALLED AT CCL ENTRY POINT
^U	N^U			DOES A USETI ON THE INPUT FILE TO
				BLOCK N.  DUE TO THE FACT THAT
				BUFFERED I/O IS USED, THE EFFECT OF
				THE ^U MAY BE SOMEWHAT DELAYED.  IT
				IS ONLY REALLY USEFUL WHEN READING A
				DECTAPE IN NON-STANDARD MODE.  NOT
				AVAILABLE IN TECO.
	^U			ON INPUT CANCELS LINE
^V	^V			SET PREVAILING CASE FOR ALL TEXT TO
				LOWER CASE(0^V REMOVES CONVERSION)
	^V			IN TEXT SETS PREVAILING CASE FOR THE
				NEXT CHARACTER TO LOWER CASE
	^V^V			IN TEXT SETS PREVAILING CASE FOR THAT
				TEXT TO LOWER CASE
^W	^W			SET PREVAILING CASE FOR ALL TEXT TO
				UPPER CASE(0^W REMOVES CONVERSION)
	^W			IN TEXT SETS PREVAILING CASE FOR THE
				NEXT CHARACTER TO UPPER CASE
	^W^W			IN TEXT SETS PREVAILING CASE FOR THAT
				TEXT TO UPPER CASE
^X	^X=			RETURN VALUE OF SEARCH MODE FLAG(-1
				MEANS EXACT, 0 MEANS EITHER CASE)
	N^X			SET VALUE OF SEARCH MODE FLAG TO N
	^X			IN A SEARCH, ACCEPT ANY CHARACTER AS
				A MATCH
^Y	^Y=			RETURNS NUMBER OF FORM FEEDS SEEN(SAME
				AS ^P=)
	N^Y			YANKS TO PAGE N, I.E. GOES TO PAGE N
				WITHOUT PRESERVING CURRENT PAGES
^Z	^Z			CLOSES FILES AND RETURNS TO THE
				MONITOR, OR TO THE APPROPRIATE "ED"
				PROGRAM
<ALT>	<ALT>			FUNCTIONS AS A TEXT TERMINATOR, A
				COMMAND DELIMITER.
	<ALT><ALT>		ON INPUT TELLS XTEC TO START THE
				EXECUTION OF THE COMMAND
^\				ILLEGAL COMMAND
^]				ILLEGAL COMMAND
^^	^^X			RETURN THE ASCII VALUE OF THE
				CHARACTER X
	^^X			IN TEXT, TRANSLATE THE CHARACTERS
				@,[,\,],^,_ TO "LOWER CASE"
^_				ILLEGAL COMMAND
<SPACE>	<SPACE>			IGNORED ON INPUT EXCEPT IN TEXT
				STRINGS
	M<SPACE>N=		RETURNS M+N
!	!...TAG...!		SPECIFIES A TAG(EITHER A COMMENT OR
				A LABEL TO BE BRANCHED TO)
"	N"X...COMMANDS...'	OPEN A CONDITIONAL.  THE COMMANDS ARE
				EXECUTED IF THE VALUE N COMFORMS WITH
				THE CONDITION X:
				G	N>0
				L	N<0
				E	N=0
				N	N<>0
				C	N IS AN ASCII SYMBOL CHARACTER
				D	N IS AN ASCII DIGIT
				A	N IS AN ASCII ALPHABETIC
				V	N IS ASCII LOWER CASE
				W	N IS ASCII UPPER CASE
				T	"TRUE" N<0
				F	"FALSE" N=0
				S	"SUCCEED" N<0
				U	"UNSUCCESSFUL" N=0
#	M#N=			RETURN BITWISE OR OF M,N
$				ILLEGAL COMMAND
%	%X=			INCREMENT NUMERIC Q-REGISTER X BY 1,
				RETURN VALUE
&	M&N=			RETURN BITWISE AND OF M,N
'				TERMINATE A CONDITIONAL(SEE ")
(	(EXPRESSION)		OPEN AN EXPRESSION
	(Q-REG NAME)		OPEN A MULTI-LETTER Q-REGISTER NAME.
				NOT AVAILABLE IN TECO
)				CLOSE AN EXPRESSION OF Q-REG NAME
*	M*N=			RETURN VALUE OF M TIMES N
	*X			INSERT LAST COMMAND IN Q-REGISTER X
+	M+N=			RETURN VALUE OF M PLUS N
,	M,N			USED TO DELIMIT TWO ARGUMENTS TO A
				COMMAND
-	M-N			RETURN VALUE OF M MINUS N
	-X			WHERE X IS A COMMAND THAT TAKES A
				NUMERIC ARGUMENT, SAME AS -1X
.	.=			RETURNS THE VALUE OF THE BUFFER
				POINTER
/	M/N			RETURN VALUE OF M DIVIDED BY N
	/			AFTER AN ERROR, GIVES MORE DETAILS ON
				WHAT HAPPENED
0,1,2,3,4,5,6,7,8,9		NUMBERS
:	:X			WHERE X IS ALMOST ANY COMMAND, IF THE
				COMMAND X FAILS, THEN IT WILL RETURN
				A ZERO INSTEAD OF ISSUEING AN ERROR
				MESSAGE.  IF IT SUCCEEDS, IT WILL
				RETURN A -1.
;	;			IN AN ITERATION, IF THE LAST COMMAND
				FAILED, LEAVE THE ITERATION; OTHERWISE
				CONTINUE.  ILLEGAL IF NOT IN AN
				ITERATION
<	N<COMMANDS>		OPEN AN ITERATION.  EXECUTE THE
				COMMANDS N TIMES(DEFAULT IS INFINITY)
=	N=			TYPE OUT N IN DECIMAL
	N==			TYPE OUT N IN OCTAL
	M,N=	OR M,N==	TYPE OUT N IN DECIMAL(OCTAL), THEN
				OUTPUT, DEPENDING ON M:
				M<0	CR/LF
				M=0	NOTHING
				M>0	ASCII CHARACTER WHOSE VALUE
					IS M
>				CLOSE AN ITERATION
?	?			ENTER(OR LEAVE IF IN) TRACE MODE.
				ALL COMMANDS ARE TYPED OUT AS THEY
				ARE EXECUTED
	?			AFTER AN ERROR, TYPE THE LAST 10
				COMMANDS EXECUTED(THE LAST ONE IS THE
				ONE THAT CAUSED THE ERROR)
@	@X			WHERE X IS A TEXT COMMAND, CAUSES
				THE CHARACTER FOLLOWING THE COMMAND
				TO BE A DELIMITER CHARACTER FOR THE
				TEXT(IN LIEU OF ALTMODE)
A	A			APPEND THE NEXT PAGE TO THE EDITING
				BUFFER
	NA=			RETURNS THE ASCII VALUE OF THE NEXT
				NTH CHARACTER IN THE BUFFER
B	B=			RETURNS A ZERO(BEGINNING OF BUFFER)
C	NC			MOVES THE BUFFER POINTER N CHARACTERS
D	ND			DELETES N CHARACTERS
	M,ND			DELETE ALL CHARACTERS FROM M TO N
E	EX			EXECUTE ONE OF THE SERIES OF "E"
				COMMANDS:
				(NOTE:  FOR A FILESPEC, THE FOLLOWING
					ARE LEGAL SWITCHES:
				/APPEND	(LOG FILES) APPEND TO CURRENT
					LOG FILE, IF ANY
				/ASCII	FILE IS ASCII, NO LSN'S
				/GENLSN	GENERATE LSN'S
				/LSN	FILE MAY HAVE LSN'S(DEFAULT)
				/NOIN	(LOG FILES)DO NOT INCLUDE
					TYPEIN IN LOG FILE
				/NONSTD	OPEN DECTAPE IN NON-STANDARD
					MODE
				/NOOUT	(LOG FILES)DO NOT INCLUDE
					TYPEOUT IN LOG FILE
				/OCTAL	FILE IS OCTAL
				/PROTECT:NNN	FILE PROTECTION IS TO
					BE NNN
				/SIXBIT	FILE IS SIXBIT
				/SUPLSN	SUPRESS LSN'S IF ANY
				(/ASCII, /OCTAL, /PROTECT, /SIXBIT ARE
				NOT AVAILABLE IN TECO)
		EA<FILESPEC>	("EDIT APPEND")APPEND TO FILE
		EB<FILESPEC>	("EDIT BACKUP")WHEN EDITING FILE,
				RENAME ORIGINAL FILE TO HAVE EXTENSION
				.BAK(TO HAVE A BACKUP)
		EC=		("EDIT CORE")DO A GARBAGE COLLECTION,
				SHRINK CORE IF POSSIBLE, AND RETURN
				NUMBER OF WORDS USED
		NEC		DO A GARBAGE COLLECTION, AND CHANGE
				CORE ALLOCATION TO N WORDS IF POSSIBLE
		NED<FILESPEC>	("EDIT DO")RUN THE PROGRAM SPECIFIED
				AT OFFSET N WHEN LEAVING XTEC
		EE<FILESPEC>	("EDIT EXECUTE")MAKE A .SAV FILE OF
				THE CURRENT STATE OF XTEC.  THIS IS
				USEFUL TO HAVE OBJECT FILES OF XTEC
				PROGRAMS.  XTEC IS GETSEG'D WHEN THE
				.SAV FILE IS RUN
		EF		("END FILE")FINISH OFF OUTPUT FILE
		EG		("EDIT GO")DO AN EX, BUT RUN COMPIL
				TO COMPILE PROGRAM
		EH=		("EDIT HELP")RETURN VALUE OF EH FLAG,
				ERROR MESSAGE LEVEL 1-SHORT CODE,
				2-ONE LINE, 3-FULL MESSAGE
		NEH		SET EH VALUE TO N
		<ARGS>EI<FILESPEC> ("EDIT INDIRECT")EXECUTE XTEC
				MACRO.  ARGS ARE PASSED TO MACRO.
				THIS IS THE NORMAL WAY TO EXECUTE AN
				XTEC PROGRAM
		EL<FILESPEC>	("EDIT LOG")OPEN UP A LOG FILE
		NEL		MODIFY WHAT GOES INTO LOG FILE:
				0-NOTHING, 1-OUTPUT, 2-INPUT,
				3-EVERYTHING
		NEM		("EDIT MAGTAPE")DO MAGTAPE OPERATION N
		EN<FILESPEC>	("EDIT NAME")RENAME FILE(NO NAME
				DELETES FILE)
		EO=		("EDIT OLD")RETURNS VALUE OF "EDIT
				OLD" FLAG(TO ENABLE OLD FEATURES);
				CURRENTLY, THE ONLY VALUE IS 0.
		NEO		SET "EO FLAG" TO N
		EP<FILESPEC>	("EDIT PUT")PLACE FILE INTO Q-REGISTER
				"*"(SPECIAL-PURPOSE Q-REG)
		ER<FILESPEC>	("EDIT READ")READ THE FILE
		ES=		("EDIT SEARCH")RETURN VALUE OF "ES"
				FLAG; NEGATIVE MEANS AUTOSEARCH ON,
				ZERO MEANS AUTOSEARCH OFF, POSITIVE
				MEANS AUTOSEARCH WITH VALUE USED AS
				ASCII CHARACTER INDICATING BUFFER
				POINTER POSITION
		NES		SET "ES FLAG" TO N
		ET=		("EDIT TYPEOUT")RETURNS VALUE OF "ET"
				FLAG; 0 MEANS TRANSLATE CONTROL CHARS
				AND ALTMODE, -1 MEANS LITERAL TYPEOUT
		NET		SET "ET" FLAG TO N
		EU=		("EDIT UPPERCASE")RETURNS VALUE OF
				"EU" FLAG; -1 MEANS NO CASE FLAGGING,
				0 MEANS LOWER CASE FLAGGING, 1 MEANS
				UPPER CASE FLAGGING
		EW<FILESPEC>	("EDIT WRITE")WRITE THE FILE
		EX		("EXIT")TERMINATE EDITING, STANDARD
				WAY OF GETTING OUT OF XTEC
		NEY		("EDIT YANK")SAME AS Y COMMAND, BUT
				LEGAL FROM TTY COMMAND LEVEL
		EZ<FILESPEC>	("EDIT ZERO")ZERO DIRECTORY AND DO AN
				EDIT WRITE
F	FX			EXECUTE ONE OF THE SERIES OF "F"
				SERIES COMMANDS:
		<ARGS>FD...TEXT...<ALT> ("FIND AND DESTROY")SEARCH
				FOR THE TEXT SPECIFIED(S-TYPE), AND
				DESTROY EVERYTHING UP TO IT.  IF THE
				SEARCH IS FORWARDS, ALSO DESTROY THE
				STRING.  THIS IS SIMILAR TO:
				.UA<ARGS>S...TEXT...<ALT>QA,.D
		<ARGS>FN...TEXT1...<ALT>...TEXT2...<ALT>
				DO AN "N" SEARCH FOR ...TEXT1..., AND
				REPLACE IT WITH ...TEXT2...
		<ARGS>FS...TEXT1...<ALT>...TEXT2...<ALT> SAME AS "FN",
				ONLY USING AN "S" SEARCH
G	GX			FETCH CONTENTS OF Q-REGISTER X, AND
				INSERT IT IN THE EDITING BUFFER
H	H=			SAME AS B,Z=
I	I...TEXT...<ALT>	INSERT TEXT IN THE EDITING BUFFER
	NI<ALT>			INSERT CHARACTER WHICH HAS VALUE N
				IN THE EDITING BUFFER
J	NJ			SET THE VALUE OF . TO N
K	NK			KILL N LINES
	M,NK			SAME AS M,ND
L	NL			MOVE THE POINTER N LINES
M	<ARGS>MX		EXECUTE MACRO IN Q-REGISTER X, PASSING
				ANY ARGUMENTS
N	<ARGS>N...TEXT...<ALT>	SEARCH FROM THE CURRENT POSITION IN
				EDITING BUFFER TO THE END OF FILE FOR
				THE TEXT; IF THE SEARCH FAILS, THE
				BUFFER IS LEFT EMPTY
O	O...TAG...<ALT>		GO TO TAG
P	NP			GET THE NEXT PAGE(IF N SPECIFIED, DO
				IT N TIMES), OUTPUT OLD PAGE
	M,NP			OUTPUT CHARACTERS IN POSITION M
				THROUGH N TO FILE, BUT DO NO PAGING
	NPW			OUTPUT PAGE, BUT DO NOT GET A NEW PAGE
				(THIS IS SAME AS HP).  IF N IS
				SPECIFIED, DO IT N TIMES
	M,NPW			SAME AS M,NP
Q	QX=			RETURN VALUE OF NUMERIC Q-REGISTER X;
				IF ALPHANUMERIC, IF THERE IS AN EQUALS
				SIGN AFTER THE Q-REGISTER NAME, TYPE
				OUT THE CONTENTS OF THE Q-REGISTER,
				OTHERWISE, AN ERROR
R	NR			MOVE THE POINTER BACK N CHARACTERS
				(SAME AS -NC)
S	<ARGS>S...TEXT...<ALT>	SEARCH FOR THE TEXT.  IF THE SEARCH
				FAILS, LEAVE THE POINTER UNCHANGED.
				IF THERE ARE ANY ARGUMENTS, THESE
				SPECIFY BOUNDARIES(ALSO ALLOW YOU TO
				DO BACKWARD SEARCHES).  THIS ALSO
				WORKS WITH FD, FN, FS, AND N
T	NT			TYPE N LINES
	M,NT			TYPE FROM POSITION M TO POSITION N
U	NUX			SAVE NUMERIC VALUE N INTO Q-REGISTER X
V				ILLEGAL COMMAND
W				ILLEGAL COMMAND
X	NXX			STORE N LINES IN Q-REGISTER X
	M,NXX			STORE FROM POSITION M TO POSITION N IN
				IN Q-REGISTER X
Y	NY			(ONLY LEGAL IN MACROS)DESTORY CURRENT
				CONTENTS OF EDITING BUFFER, YANK IN
				NEW PAGE.  IF N IS SPECIFIED, DO IT
				N TIMES(USE EY FROM TERMINAL)
Z	Z=			RETURN THE NUMBER OF CHARACTERS IN THE
				BUFFER, I.E. THE POSITION OF THE LAST
				CHARACTER IN THE BUFFER
[	[X			"PUSH" Q-REGISTER X; SAVE IT ON THE
				Q-REGISTER PUSHDOWN LIST
\	\=			RETURN A VALUE FROM A DIGIT STRING
				IMMEDIATELY AT THE TEXT POINTER
	\N			INSERT ASCII REPRESENTATION OF THE
				NUMBER; \123 INSERT "123" AS TEXT
]	]X			"POP" Q-REGISTER X; RESTORE IT FROM
				THE Q-REGISTER PUSHDOWN LIST
^	^X			IN A COMMAND, TAKE THE NEXT CHARACTER
				AND MAKE IT A CONTROL CHARACTER
_	_...TEXT...<ALT>	SEARCH FOR ...TEXT..., LIKE AN "N"
				SEARCH THAT "Y"'S INSTEAD OF "P"'S
<RUBOUT>			ON INPUT, DELETES THE LAST CHARACTER

	DEFAULT INITIALIZATION COMMANDS MAY BE UTILIZED IN ONE OF
TWO WAYS.  THE FIRST IS TO HAVE A FILE CALLED XTEC.INI; THIS FILE
WILL BE EI'ED EVERY TIME XTEC IS RUN.  THE SECOND IS TO HAVE AN
XTEC ENTRY LINE IN A SWITCH.INI FILE.
	IT IS FAIRLY COMMON TO HAVE AN INITIALIZATION FILE SET ES,
EH, EU, ER, ETC. DEFAULT VALUES, AS WELL AS SETTING UP A LOG FILE.


	ANY SUGGESTIONS, COMMENTS, ETC. ON THIS MANUAL SHOULD BE
SENT TO PROGRAMMER #215("MRC") VIA MAIL.  FAVORABLE COMMENTS WILL
ALWAYS BE APPRECIATED, RESPONSE TO UNFAVORABLE COMMENTS UNPREDICTABLE.

	HAPPY HACKING!!!

/MRC