My Little Compiler
------------------

Started on January 1 2009.
First release January 13 2009.

14/1/2009:
	Added single character constant (ex $A instead of 65)
	Added &S to set screen color
	Added &C to set group color

20/1/2009:
	Changed "R" to ";" for the return statement of a subroutine
	Added R for random number (0-4095)
	Error in some conditional jumps, fixed
	Added TR, TP, and TG to manage arrays (in VDP, CPU or LINK statement)

26/1/2009:
	Changed &C and &S to accept colors from 1 to 16 as in Basic (0-15 before)
	Changed >FF (255) to >FFFF (-1) in "K" (key scan) when no key is pressed

	Added W to extend sign from byte to word
	Added Z to clear a variable
	Added ( to check limits on a variable
	Added #L, #M for sprite motion and location (motion is not fully working! be careful)
	Added #A and #C for pattern and color of a sprite
	Added J for joystick (with scale setup for X,Y values)

1/2/2009
	Bug in J (joystick) with scale>4, fixed
	Problem between J and an INPUT statement following CALL LINK, fixed.
	Bug in Z, fixed

	Added #P to get sprite position
	Added #D to compute sprite distance
	Added #< to fix max number of sprites in motion
	Added #I to enable interrupts

4/2/2009
	Bug in #P (coordinates inversion!), fixed
	Added #& to convert coordinates

10/2/2009
	Added CALL LINK("SOUND",A$(),S$()) to create/test sounds
	Added &M to play sounds
	Several optimizations to save some bytes (40 bytes saved!)

friday 13th, 3, 2009.
	Added TRV0 (special table with 128 bytes)
	Optimizations to save some bytes (62 bytes saved!)
	Added @ to assemble in high memory
	Updated "POP" and "FSIZE" routines.

17/03/2009
	No change in MLC in itself but:
	- a fast loader that uses FLOADER (basic MERGE) and MLCBIN (binary)

29/04/2009
	Select/case structure with [,%,]

27/10/2011
	Bug fixed in division with a constant (/AB was ok but /A3 not!)
	Numeric labels (L0 to L9) can be redefined for use with pseudo instructions from PreCompiler.

1/11/2011
	Floating point support!
	Lot of instructions added!

5/11/2011
	code for "kill label" (_c) to be used with the Precompiler V1.02

6/11/2011
	New call CALL LINK("CHAR",a$()) to prepare strings for char definitions
	New code &D to set the definition of 1 to 4 characters
	(Modified the PreCompiler to version 1.03 to support that!)

7/11/2011
	new instructions for mem copy: TM, TW, TC, TV
	(modified the PreCompiler to version 1.04)

21/11/2011
	extended TG instruction to get string address of an array element in VDP RAM

26/11/2011
	bug fixed: some table names were wrongly rejected issuing a "BT" (bad table) error message.
	bug fixed: in some cases, labels were wrongly deleted issuing a "UL" (unresolved label) error message.
	change: labels that can be redefined are upper case (from LA to LZ) instead of L0 to L9 because more levels were
		requiered by pseudo instructions with PreCompiler (updated to V1.06)
	As MLC is growing, I recommend using @0 to compile in HighMem as there is little space left in low mem.

6/12/2011
	new logical instructions: HA, HO, HX, HN, HW, H>, H<, HL, HR, HC
	optimizations to save 136 bytes
	new instructions to initialize table/strings: TO, TT, TS, TE, T<, T>
	extended TP instruction to return a string to a string variable or array in XB.
	extended TG to get string address of a simple variable (not only an array)
	(modified the PreCompiler to version 1.07)

19/12/2011
	new "set" instructions FD, F+, F-, F?, FO, FZ, FC, FN, FU, FI, FX, FF
	(modified PreCompiler to version 1.08)

23/12/2011
	new speech instructions &T, &? and &U
	bug in TG when getting the address of a simple string variable
	(modified PreCompiler to version 1.09)

??/01/2012
	integrated DSRLNK routine for the PreCompiler+Assembler
	new instructions Y0 to Y9 for file access
	bug in TS if string started with a digit, now you MUST separate len and string with a period:
	(before: TS6MYTEXT now: TS6.MYTEXT)
	(modified PreCompiler to version 1.11)

22/01/2012
	added &X to relocate sprite or char def tables
	added &d to define chars in a new zone (&D remains in the standard XB zone)
	when sprite or chars are relocated, the "96" offset of the basic is not used.
	(modified PreCompiler to V1.12)

31/01/2012
	*** NEW MLC ***
	Modified &X and &d to point to 4096 instead of 2048 in VDP ram
	All compilation modified: directly from DATA lines and only one call:
	CALL LINK("COMPIL",IO(),S$(),C$())
	Removed SOUND and CHAR calls that are included into COMPIL
	One bug fixed in char definitions
	One bug fixed in #P (SPOSITION) compilation
	One bug fixed in TG with string arrays
	Optimization in instructions tables to save 48 bytes
	Zones for registers, variables and labels moved to highmem to save low mem space.
	added TH to initialize a zone with hexadecimal bytes (ex: TH3.AAF01C)
	added Snnn/Xnnn to define a char at compilation time.
	error codes are turned to a number
	removed @nn instruction, compilation in highmem by default (no more byte elsewhere)
	added Mn code for debugging and three pseudo variables \, ]and [
	(modified PreCompiler to V1.20)

04/02/2012
	Extended label zone to 256 bytes (so more data with TRv0 and '@0)
	Added "D" command to delete DATA lines to free space. ($DEL in PreCompiler)
	Some optimizations (10 bytes saved)
	One bug fixed (no error was output if line passed to "COMPIL" didn't exist!)
	New #K instruction to delete a sprite
	The existing instruction #L can be used to create a sprite.
	(modified PreCompiler to V1.21)

07/02/2012
	fixed a bug: if numeric variables and $DEL were used, the last could overwrite the assembly program:
	now it's fixed, variables addresses are moved with the program lines.
	(PreCompiler V1.22)

20/02/2012
	optimizations to save 16 bytes
	new TJn to "jump" n bytes ahead in compilation: useful when creating a table partially initialized
	(PreCompiler V1.23)

20/06/2012
	*** F18A SUPPORT ***
	use of the CHAR section with Xnnn directive to send the GPU program to VDP RAM at compilation time and "R" key word to run a copy of it to the 2K upper block
	lots of tables are moved to HighMemory to get more program space to add future routines for the F18A.
	instructions QR, QW, QS, Q? to run, wake, sleep and state of GPU
	instructions QB, QP, QD, QF to draw in the BML
	instruction QV to modify a VDP register
	instruction QT to manage the TIMER
	(PreCompiler V1.30)

13/08/2012
	instruction &W to set columns and rows (from 32*24 to 80*30) and eventually the extended color table
	instruction &A to set the attribute of a character
	instruction TF (table fill) to fill a table with a word or byte.
	instruction &W used for MultiColor mode (with Line 30 option on the F18A)
	intructions &p and &l to plot and draw in multicolor
	bug in 'Z (float to integer), fixed.
	bug in ] (endselect) when there was no default (%%) case, fixed.
	(PreCompiler V1.31)

31/10/2019
	Bug in TR fixed (table reservation)
	Bug in TV fixed (copy from VDP to CPU)
	"^" added as a suffix to force a numeric value to be considered as a memory address instead of an immediate value.
	new "CLEAR" subprogram : Tables and routines reorganized in memory to allow more free space at run time
		(see Extended Memory Usage in manual)	(PreCompiler V1.32)
	
