||=======================================\\
||  ||      ||   |||           ||||||||  ||
||  ||||  ||||   |||          |||        ||
||  || |||| ||   |||          |||        ||
||  ||  ||  ||   |||||||||||   ||||||||  ||
||=======================================||
||Multi-Platform Language for Calculators||
||=======================================//
||
||=====||===================\\
|| -1- ||    Introduction   ||
||=====||===================//
|| 
||  The Multi-Platform Language for Calcs, or MLC
|| is a project of Epic Programming Studios. Our
|| goal was to create a Language to replace BASIC
|| on all major CASIO and TI calculators as the
|| primary language for on-calc game programming.
||
||  MLC is not yet a finished product (see version
|| history) but it already surpasses the abilities
|| of BASIC to create games of quality speed and
|| graphics.
||
||  MLC supports 4 levels of color which can be
|| used with any of the graphical commands, as
|| well as inversion.  Also, MLC is double buffered
|| and the screen is updated only when the #DRAW
|| command is used, something important that is
|| missing from BASIC.
|| 
|| 
||=====||===================\\
|| -2- || Technical Details ||
||=====||===================//
|| 
||  MLC uses a 96x64 area for its display, this
|| is done so that MLC will display properly on
|| all calcs we plan to make it for, the colors
|| are also limited to: White, Light-Gray, Dark-Gray,
|| and Black (represented by the numbers 0-3, with 4
|| as Invert). The run speed on some calcs has also
|| been artificially dropped to match the lowest speed
|| we've done this to make sure all games run equally
|| well on all calcs.
||
|| (NOTE: MLC now allows the calcs with larger screens
|| to use their full screen size, however, it is
|| considered bad coding practice to use this area
|| for anything required to play a game, it should
|| be used for things like game names, score display,
|| etc...)
|| 
||  The keyboard layout and keycodes have also been
|| altered to suit our needs.  to find the keycode
|| use 10*row+column, but note that some keys are not
|| in the correct place. use the PC emulator to
|| determine the correct placement.  Also, some keys
|| have been removed and you will not be able to use
|| them, these keys will be used to control the MLC
|| emulator.
|| 
||=====||===================\\
|| -3- ||     Operators     ||
||=====||===================//
|| 
||  PREFIXES: these are placed before their data type
||            or a command.
|| 
|| # - MLC command
|| % - Integer Variable
|| . - Number
|| $ - String Variable (not supported yet)
|| @ - Array Variable
|| [ - Bitmap
|| ^ - Sprite
|| 
|| 
||  LOGICAL SYMBOLS: These are used in IF statements,
||                   to determine a condition.
|| 
|| 
|| = - Equals
|| ! - Unequal To
|| < - Less Than
|| > - Greater Than
|| & - Logical and
|| 
||  MATH OPERATIONS: These are used to preform basic
||                   math operations on data, they can
||                   be used inside of commands or on
||                   separate lines. (order of operations
||                   is from left to right)
|| 
|| + - Addition
|| - - Subtraction
|| * - Multiplication
|| / - Division
|| | - Modulus
||
|| 
||=====||===================\\
|| -4- ||      Commands     ||
||=====||===================//
|| 
||  Here is a list of all currently supported commands:
||	(some commands may be marked as being supported by only some models,
||	these will become available on other models ASAP)
|| 
|| GRAPHICAL COMMANDS:
|| 
|| #CLRS				- Clears the screen
|| #TEXT <x> <y> <text> <color>		- Displays text
|| #LINE <x> <y> <x> <y> <color>	- Draws a line
|| #PIXL <x> <y> <color>		- Draws a pixel
|| #PIXT <x> <y> <var>			- Stores in <var> the color at (x,y)
|| #DRAW				- Updates screen
|| #SHFT <x> <y> <type>			- Used for scrolling, <type> specifies looping state (-1 = Loop, 1-3 standard colors) 
|| #STOP				- abbr. for Store Picture (saves all color layers)
|| #RCLP				- abbr. for Recall Picture, shows the last pict saved with #STOP
|| #RECT <x1> <y1> <x2> <y2> <border> <fill> - Draws a rectangle in either a filled un unfilled state (.5 for no fill)
|| #DBMP <name> <x> <y>			- Displays a bitmap a (x,y)
|| #DISP <name>				- Displays a sprite at its stored position
||
|| KEYBOARD COMMANDS:
|| 
|| #GKEY <key code> <var>		- Stores 1 to <var> if key is pressed and 0 if it isn't
|| #WKEY <var>				- Waits for a key (which is store to var)
|| #PAUS				- Waits for Enter/EXE key
|| 
|| FUNCTION COMMANDS:
|| 
|| #FNCT <function index>		- Function declaration
|| #FRUN <function index>		- Calls a function
|| #FEND				- Returns from a function
|| #FGOB				- Returns to beginning of current
||					  function
|| 
|| CONDITIONAL COMMANDS:
|| 
|| #IIFF <anything> <condition> <anything> ... - If condition is true next line is executed
|| 					     otherwise it's skipped (now you can use & to add conditions)
|| COMPILE TIME COMMANDS:
||
|| #DATA				- Begins the data section, which contains all compile time instructions, bitmaps, etc.
|| #DEND				- Marks the end of the data section
|| #BITM <name> <size>			- defines a bitmap of size 8 (8x8) or 16 (16x16), the following 3 lines are the bitmap's data
||
|| MISC COMMANDS:
||
|| #SPRT <name> <bitmap>		- (ti86 only) Creates a sprite and assigns a bitmap to it
|| #CLSN <sprite> <sprite> <var>	- (ti86 only) Detects if two sprites are touching (compares masks)
|| #ARRY <name> <size>			- Defines an array of elements (currently, ints only) 
|| #RNDM <low> <high> <var>		- Creates a random number from <low> to <high> and stores to <var>
|| #HALT				- Stops execution
|| #WAIT <delay>			- Stops program for a while
|| 
|| I/0 COMMANDS:
||
|| #WRTE <file position> <varname> - writes contents of var to current program's data file at specified position
|| #READ [file position] [varname] - reads the data at specified position in the file, and stores it in var
||
||
||=====||===================\\
|| -5- ||  Graphics in MLC  ||
||=====||===================//
||
||  In MLC there are vast differences from any version of BASIC currently
|| on any calculator I'm aware of, heres a brief synopsis of MLC graphics
|| for the recently converted.
||
||  MLC uses a 4 color display, consisting of WHITE, LIGHT-GRAY, DARK-GRAY,
|| and BLACK. All graphical commands in MLC can use these colors to produce
|| much more complex graphics than BASIC. The typical standard in MLC is that
|| 0=WHITE, 1=LIGHT-GRAY, 2=DARK-GRAY, 3=BLACK, and 4=INVERT. Some MLC commands
|| might stray from this slightly, but not by much (and it will be noted in the
|| documentation).
||
|| BITMAPS VS. SPRITES:
||
||  There may be some confusion between Bitmaps and Sprites and MLC. whats
|| different about them? We'll, first off a Sprite uses a bitmap as its visual
|| representation, but it has additional features that make it useful for other
|| things than just displaying a picture:
||
|| SPRITES:
|| 
|| Sprites in MLC currently have 3 "properties":
|| 
|| X	- Contains the X position of the sprite
|| Y	- Contains the Y position of the sprite
|| BMP	- Contains the name of the sprite's bitmap
||
|| You can access a Sprite's properties like this: (Sprite name is "SHIP")
||
|| ^SHIP.X=.1
|| ^SHIP.Y=.1
|| ^SHIP.BMP=[SHIP
||
|| So a sprite actually consists of 2 integers and a bitmap.
||
|| Sprites also have access to a few additional functions:
|| 
|| #CLSN - if the visible parts of two sprites are touching it returns .1 (this
||         would be a huge pain to do by hand ;> )
|| #DISP - this is better than DBMP because you don't have to specify the (x,y) 
||         coordinates .
||
|| BITMAPS:
||
||  Bitmaps are just that, they are made solely for the purpose of displaying, a
||  picture, handy, but not as effective as sprites for moving characters in a 
||  game, plus you'll need to keep track of their position yourself.
||
||=====||===================\\
|| -6- ||       Credits     ||
||=====||===================//
|| 
||	<EPIC PROGRAMMING STUDIOS>
||
|| 4nic8 (4nic8@casiocalc.org)
|| 	[MLC interpreters for AFX/Graph100 and TI 89/titanium/92/+/voyage 200,
||       PC emulator and AFX on-calc Sprites Editor]
|| 
|| Burntfuse (straney@umbi.umd.edu )
||	[MLC Ti86 Interpreter, Games, Ideas]
||
|| Madskillz (tjsupalla@charter.net / crudedude5188@hotmail.com)
||	[MLC Ti-83+ Interpreter]
||
|| The Unknown One (unknown_one_1976@hotmail.com)
|| 	[Ti-83 Intemperate, Testing, Web Development]
|| 
|| CrimsonCasio (crimsoncasio@earthforge.com)
|| 	[PC Sprite Maker, Documentation, MLC progs, Ideas, Support, Web Design]
|| 
|| Dysfunction (mightyg16@yahoo.com)
|| 	[Ideas, Support]
||
|| Deimos (mr_deimos@o2.pl)
||	[Lead Tester, Games, Ideas]
|| 
||=====||===================\\
|| -7- ||  Current Versions  ||
||=====||===================//
||
|| ------$ MLC INTERPRETERS $------
||
|| - Casio Algebra FX:
||	MLCafx 1.0 beta 3
||
|| - TI 86:
||	MLC86 1.0
||
|| - PC:
||	MLCpc v. 0.97
||
|| ------$ SPRITES EDITORS $-------
||
|| - Casio Algebra FX:
||	on-calc Sprites Editor 0.6 (beta 2)
||
|| - PC:
||	Sprites Maker 1.0
|| 
||===============================================================\\
||===============================================================//