
	CHANGES TO T VERSION 3X REL 0,2,3,4,5


	42) DEC 29 1999

	Made TXTRN accept the #r5; meta command (which switches T3X-R6
	into R5-compatibility mode). This way, some kind of 'forward
	compatibility' is provided.


	41) NOV 12 1999

	Removed some inconsistencies in external variable definitions
	in compiler/lib.c which lead to core dumps under FreeBSD 3.x
	while everything went fine (!) under 2.x.

	Made TX automatically recognize the BSD version, it is running
	on. It will use TXCG386E on 3.x versions and TXCG386 on others.


	40) NOV 01 1999

	NOTICE: The compiler base directory has moved from /usr/local/t3x/
	to
		/usr/local/t3x/r5

	to allow the simultaneous installation of release 5 and release 6
	binaries.
	Therefore, TXPP will no longer find includable extensions in
	/usr/local/t3x/inc, because the inc/ directory has moved into
	the r5/ tree, too.


	39) SEP 24 1999

	FINALLY changed the scanner routine to check for buffer
	underflows and EOF condition while skipping blanks and
	comments.


	38) AUG 27 1999

	Removed TXOPTB from the distribution, because it is broken and
	I have no time to fix it. Also changed the driver scripts to
	no longer support it.


	37) AUG 25 1999

	Intercepted the application of the CALL operator to
	non-procedure calls.


	36) JUN 29 1999

	Added the -s86 flag to TX.BAT (now called TX.DOS) to allow the
	alternative use of S86/SLD instead of TASM/TLINK.


	35) JUN 24 1999

	Replaced LIB.C by the version originally contained in the ETXX
	directory, thereby unifying the two versions.


	34) APR 08 1999

	Removed the CYCLETRAP constant again and replaced the mechanism
	with a naive loop detection scheme which just compares the
	destination of the current branch with the label at the beginning
	of the loop. Although no formal formal proof exists (yet),
	I am pretty certain that TXTRN never generates cycles which
	cannot be detected this way.


	33) MAR 16 1999

	Fixed a bug in the constant factor parser which caused
	bitwise NOT (~) operators to be handled incorrectly.


	32) FEB 09 1999

	Changed TX.SH so that it does no longer attempt to link against
	libX11 and libcompat, if these libraries do not exist.


	31) FEB 02 1999

	TXOPT did not accept the debug instructions LINE, GSYM, and
	LSYM. Made these pass thru.


	30) JAN 01 1999

	TXOPT could run into an infinite loop while redirecting jumps
	in (indirect) endless loops. Fixed that be introducing a trap
	value for the maximum number of jump to follow (CYCLETRAP).


	29) DEC 19 1998

	TXPP did not handle character constants containing a single
	apostrope (''' and '\'') properly.


	28) NOV 24 1998

	Implemented TXOPTB. See 'txoptb.t' for details. Basically,
	TXOPTB is a terribly slow version of TXOPT which is capable
	of processing files with a size of more than 32766 bytes.

	Added TXINFO to the installation list.

	Added support for TXOPTB to the drivers TX.BAT, tx.sh, and
	tx-tcode.sh.


	27) NOV 18 1998

	Cosmetic fix: No leading '-' and '~' signs have been accepted
	in constant expressions in tables. (In fact, '~' was not just
	cosmetic, since it could not be replaced with anything else.)


	26) NOV 02 1998

	TX.SH did not check for non-existant input files.


	25) OCT 03 1998

	Applied some minor fixes and changes which have been considered
	while commenting the compiler source code for the book
	'Lightweight Compiler Techniques'. Most of these changes were
	of a rather cosmetic nature, like making symbol names and error
	messages more consistant.


	24) SEP 08 1998

	The #G meta command and the #TC preprocessor command have been
	removed. Since TXTRN is expected to generate high quality Tcode,
	tuning with #G and #TC normally does not lead to better results
	but makes the code less readable. (If someone should really need
	these commands, send me an email for patches. You can find my
	email address at the end of the toplevel README.)


	23) SEP 06 1998

	Bug fix: Procedures containing only an empty compound statement
	did return an undefined result. They should have returned zero,
	like any other procedure containing no explicit RETURN.


	22) AUG 19 1998

	Changed TX (Plan9+BSD versions) to support native code generation
	using the C code backend.


	21) AUG 15 1998

	Finally made TXX accept forward references to the data space, too.
	This fix was necessary to make dynamic tables work. (And it was
	overdue anyway.)


	20) AUG 06 1998

	Changed TXPP to accept underscores (_) in macro names.

	Made TXTRN generate an implicit
		RETURN 0;
	statement at the end of each procedure unless its last statement
	already is a RETURN statement.


	19) JUL 31 1998

	Added Tcode2 instructions to support source level debugging:
		LINE n  --  line number reference
		LSYM name addr  --  local symbol description
		GSYM name addr  --  global symbol description

	Implemented the #DEBUG; meta command to make TXTRN emit
	debugging information.

	Made TXX support debug information. Currently, GSYM and LSYM
	are removed and LINE is a NOP.


	18) JUL 29 1998

	Made INIT a NOP at run time in TXX (it was one anyway).

	Implemented the DUP and SWAP Tcode instructions. Affected
	programs: TXTRN, TXOPT, TXPP, UX, and the native code generators.

	Made TXTRN emit Tcode2 output. Changed Tcode version ID to 2.
	Implemented the extension vector (the second argument of INIT)
	containing the following flags:
		#1 = BASIC extensions used
		#2 = VIO extensions used
		#4 = GRAPHICS extensions used
		#8...#32768 = reserved

	TXX has been modified to recognize the new Tcode version and
	read the extension vector before interpreting Tcode2 programs.

	UX will also recognize the new version and dump the extension
	vector when disassembling Tcode2 files.

	TXOPT now accepts the new Tcode version, too.

	Fixed a minor bug in TXPP which caused multiline output for #TC
	commands. As a side effect, only a single instruction may be
	specified per #TC line now.

	Created a unique version of the TXX interpreter core which is
	used in both, the minimum and extended interpreter.


	17) JUL 28 1998

	Made the operator recognition in FINDOP() more general. This is
	necessary to scan multicharacter operators with more than two
	characters.
	The old version of FINDOP() was a hack. The new routine is
	simpler, smaller, faster and more flexible.

	NOTE: 'MOD' is not a three-letter operator but a keyword. It is
	contained in the operator table only for FP parsing purposes.

	Implemented the modified operators

		{ .* ./ .> .< .>= .<= }

	These operators are equal to their unmodified cousins, except
	for their treatment of the signs of their operands. The modified
	operators ignore any signs and work on unsigned values instead.

	The optimizer TXOPT has been updated to handle some optimization
	involving the modified operators.

	The Tcode assembler in TXPP has been extended by the
	instructions UMUL, UDOV, ULESS, UGRTR, ULTEQ, UGTEQ which
	resemble the new operators.

	The minimum version of TXX has been extended, too.


	16) JUL 21 1998

	Bug fix: There was a severe bug in TXX which caused data
	references to forward DECLared procedures to remain unresolved.
	The following example lead to an abnormal termination in both
	versions of TXX:

		DECL P(0);          ! forward decl
		Q() DO VAR x;
			x := [@P];  ! referene P()
			x := x[0];
			CALL x();   ! call P()
		END
		P();                ! define P()
		DO Q(); END

	The CALL to P() failed, because the reference [@P] was not
	resolved.

	NOTICE: this bug affects ONLY TXX. In native code generated by
	TXCG, the reference is resolved by the assembler and therefore,
	the above program works fine in this case.

	NOTICE2: TXX still fails to resolve forward references to data
	objects. Although, the T3X compiler never generates such
	references.


	15) JUL 18 1998

	TXPP: Minor fix: Line numbers were not incremented after
	#including a file.


	14) JUL 09 1998

	TXTRN has interpreted
		#L line "" ;
	as setting the input line numbering so that the line *below*
	the line containing #L is set to 'line'. It should have set
	the *current* line to 'line'. Therefore, wrong line numbers
	may have been reported when compiling preprocessed source
	programs.


	13) JUL 02 1998

	Bug fix: TXOPT: The dead procedure elimination was a little too
	aggressive...
	TXOPT did mark CREFd procedures as marked, but did not traverse
	them. Therefore, the procedure Q() would get -- incorrectly --
	removed in the following example:
		Q();
		P() Q();
		DO X = [ @P ]; END
	In the fixed version, procedures referenced in tables will be
	traversed, thereby also marking all procedures which are used by
	the CREFd routine.


	12) JUN 24 1998

	Bug fix: TXPP did not handle quoted text properly when delimiters
	such as {' " !} were themselves quoted.

	Added the #ifeq and #end commands to TXPP. Also made #G and #L
	meta commands in T3X input programs pass through TXPP without
	reporting any errors.


	11) JUN 12 1998

	Rewrote the drivers for Plan9 (tx.rc) and DOS (tx.bat) for
	better argument handling. Add some options.

	Added dynamic tables.  Non-constant -- dynamic -- expressions may
	be included in tables now when enclosing them in parentheses:

		[ (a*b+c) ]

	The compiler will NOT auto-detect dynamic expressions. It will
	take

		[ ("Hello, World!") ]

	for a dynamic expression (generating inefficient code) and it
	will attempt to evaluate

		[ a() ]

	as a constant expression (leading to an error).


	10) JUN 11 1998

	Finished the preprocessor. See txpp.t for details.  Added the -O
	and -P options to TX to enable the optimizer and preprocessor.


	9)  JUN 10 1998

	Another bug in the minimum TXX: MEMCOMP() always returned 0.
	(Have I ever really used this version??) The extended TXX was
	not affected.


	8)  JUN 06 1998

	TXX now accepts a first line of the form #!...  to make Tcode
	binaries run like shell scripts. The first line is simply
	removed and the rest is processed as usual.

	NOTE: the avaliable instruction space will be decreased by the
	size of the #! line.

	Oops. The minimum TXX version was lacking the RENAME()
	primitive. This caused MEMCOPY() to be a NOP and MEMCOMP() to
	be undefined.  Added rename_() and P_rename().

	NOTE: the extended TXX was not affected by this bug.

	Added the meta commands #L and #G.

	#L line "file-name"
		sets the input file name to file-name and the input
		line number to line. This information will be used
		by the compiler when reporting errors.

	#G n0 ... nN
		directly emits the decimal numbers n0...nN to the Tcode
		program. #G may be used to inline Tcode instruction.


	7)  JUN 05 1998

	Finished a first implementation of the Tcode optimizer.
	See txopt.t for details.


	6)  MAY 08 1998

	Made the compiler generate an unused (and therefore not
	addressable) word at the beginning of the data segment. This
	way, the compiler makes sure that no `real' data will be
	placed at the first address (0) in the data segment.
	This fixes programs which use the zero value to indicate that
	no data is passed to a procedure. In this case, inside the
	called procedure, tests like
		P(s) IF (s) writes(s);
	could have failed, if the passed string is was located at data
	segment location 0.


	5)  MAR 25 1998

	Trailing stuff after the main procedure has been silently
	ignored. Added an error() call to inform the programmer in
	this case.


	4)  MAR 15 1998

	The specification says that escape sequences should be
	recognized in upper case, as well. Somehow this seems to have
	escaped me...


	3)  FEB 24 1998

	Bug fix: When computing the addresses of first class objects
	(@symbol), an instruction was swallowed by flushing the delay
	queue in FACTOR(). Oops.

	Empty tables caused a reference to an undefined label in the
	native code generators. Since empty tables do not make much sense,
	anyway, they are no longer allowed.


	2)  JAN 11 1998

	Fixed a minor bug in EXPR() which caused tons of unused labels
	to be generated (moved x := newlab(), y := newlab() into the
	conditional block). Since the label space is more efficiently
	used now, label lookup can be done by a linear match instead
	of a linear search: the label ID is simply used as an index to
	the address array.

	This improvement speeds up bytecode load times remarkably.


	1)  JAN 10 1998

	Fixed the indirect function call operator: P(a,b) compiled to

		LDG P
		LDL a
		LDL b
		CALR

	Which would result in a call to B. Of course, this is wrong.
	The fixed compiler emits

		LDL a
		LDL b
		LDG P
		CALR

	instead.

