Home ~ General Information ~ The Basics ~ Command Reference ~ Screenshots ~ Downloads
ABSL ARRY BITM CINT CLRS CLSN CMAP DATA DBMP DEND DISP DMAP DRAW FEND FGOB FNCT FRUN GKEY HALT IIFF INPT LINE NMAP PAUS PIXL PIXT POLR RCLP READ RECT RNDM RSET SHFT SIZE SPRT STOP SUBS TCHK TEXT TILE WAIT WKEY WRTE
ARRY [arrayName] [size]
Creates an array of integers containing [size] elements. For example:
BITM [bitmapName] [8 or 16]
Declares a bitmap in the data section. Valid bitmap sizes are 8x8 and 16x16. Bitmaps are used for sprites and tilemaps, but can be drawn by themselves by using DBMP
. The format for declaring a bitmap looks like:
#BITM [SHIP 8
Where the first line of bitmap data is the light gray buffer data (in this case, 1038000010101000), the second is the dark gray buffer, and the last is the mask. A sprite editor written in assembly is included in MLC for the TI-86, and hopefully a sprite editor written in MLC itself will be finished sometime.
See: SPRT DATA and DEND
Converts [string_String] to an integer and stores the result in [integerName]. Negative numbers are allowed, but anything other than a single number isn't allowed (MLC 68K actually you to do things like CINT "523+63*ARY(*PTR+3)",%I but I don't recommend taking advantage of this because other interpreters don't support it - I'll have to get around to removing this "feature").
Clears the hidden screen buffer.
CLSN [spriteName1],[spriteName2],[intName] or
CLSN [spriteName1],[spriteName2],[intName] detects if [spriteName1] and [spriteName2] are colliding, or in other words, if they somehow overlap (transparent overlaping sections are included). If they do overlap, [intName] is set to equal 1 - otherwise, it is 0.
CLSN [spriteName],0,[intName],[pointerName] detects if [spriteName] is colliding with any existing sprites. If it is, then [intName] is set to 1 and [pointerName] is a pointer to the sprite colliding with [spriteName]. Otherwise, [intName] is set to 0.
Finds where each corner of [spriteName] is touching the map elements of [mapMame] and stores the positions of the map elements in [arrayNameX] and [arrayNameY] (the position of [map name] is determined from the position it was last drawn with DMAP
This begins the data section, where bitmaps are stored. The data section should probably be at the end of the program. Example:
#BITM [SHIP 8
See: DEND and BITM
Draws [bitmapName] to ([int_X],[int_Y]. You should consider using sprites and the DISP
command instead though.
This ends the data section.
See: DATA and BITM
DISP [spriteName or .0]
Draws either [spriteName] or all existing sprites to the hidden buffer, using their x and y coordinates. For example:
#BITM [SHIP 8
#BITM [ENMY 16
In the previous code, the [SHIP bitmap would be drawn to (10,0) and [ENMY would be drawn to (0,0).
Draws [mapName] to the top left corner of the hidden buffer at [int_X],[int_Y]. Remember, for the map to actually be displayed on the screen, you need to use DRAW
, and tilemaps are created with NMAP
See: TILE CMAP and TCHK
Copies from the hidden screen buffer to the visible screen.
Jumps to the beginning of the first function - useful for loops. For example:
Calling this COOL function would infinitely pause your calculator (note that in probably all MLC interpreters, you can break out of a program any time by using the in-program menu, triggered by pressing the ON key).
This creates a function called [functionName] that can be called with FRUN
(remember, [functionName] can only be up to 5 characters long). Functions are ended with FEND
. A function called MAIN is where execution of every MLC program starts, so every MLC program must have a MAIN function. For example:
In the previous code, the MAIN function is run as always, which calls the COOL function, which pauses the calculator.
Calls the funciton [functionName], and after executing [functionName], the program continues to the next line of code.
Sets [intName] to 1 if the key [int_keyCode] is pressed, otherwise sets [int name] to 0. [int_keyCode] represents the key 10*row+column, where (column, row) is the location of the key on the calculator, starting from the upper left corner.
Displays [str_Prompt] at ([int_X],[int_Y]) and lets the user enter through the keyboard a number or string, and stores the result to [variableName].
exactly which variable types can be used?
Stops the program.
If [conditionalExpression] is true, the next line of code is executed. Otherwise, it is skipped. See operators
and variables and the VAT
for details on conditional expressions.
Draws a line from ([int_X1],[int_Y1]) to ([int_X2],[int_Y2]).
Creates a tilemap nameed [mapName] and with dimensions of [int_width] and [int_height].
See: TILE CMAP DMAP and TCHK
Pauses the program until any key is pressed.
Sets the pixel at [int_X],[int_Y] to [color].
Stores the color of the pixel at [int_X],[int_Y] in the hidden buffer to [integerName].
Converts the polar vector defined by [int_radius] and [int_angle] to rectangular, storing the resulting X value to [int_NameX] and the resulting Y value to [int_NameY], where [int_angle] is in degrees. This is useful for rotating points.
Recalls the picture created by STOP
Draws a rectangle with an upper right corner of [int_X1],[int_Y1] and a lower left corner of [int_X2],[int_Y2] with a border color of [int_Color1] and an inside filled color of [int_Color2].
Generates a random number between [int_lowerLimit] and [int_upperLimit] ([int_lowerLimit] and [int_upperLimit] are included as possibilities for being the random number) and stores the result in [intName]. [int_upperLimit] must be less than or equal to 1024.
Restarts the program (useful for returning to the title screen of a game).
Shifts the hidden screen buffer horizontally right by [int_HorizAmount] and down by [int_VertAmount]. If [int_Mode] equals -1, the data pushed off the screen appears on the opposite side (the data pushed off of the bottom appears on the top and the data pushed off the right appears on the left). Otherwise, the empty space is filled with a color of [int_Mode] (0=white, 1=light gray, 2=dark gray, 3=black).
SIZE [stringName or arrayName] [integerName]
Stores the size (length) of an array variable or string variable to integerName.
Creates a sprite named [spriteName] that has a bitmap name of [bitmapName]. It's x and y coordinates are set to 0.
Stores the current picture in the hidden screen buffers (the ones that are drawn to be default) to another set of hidden buffers that can be recalled with RCLP
Stores the segment of [string_String] (which can is any string expression, including literal or variable strings) from [int_StartingPosition] to [int_EndingPosition] in the [stringName] variable. The position of the first character in a string is 0.
Checks each of the map elements specified by [arrayNameX], [arrayNameY] in [mapName] - if any of them are "solid," [intName] is set to 1, otherwise [intName] is set to 0. Use TILE
to make bitmaps be considered "solid."
Writes [str_Text] to [int_X],[int_Y] in [int_Color].
Sets bitmaps in [mapName] to be "solid." This is used in combination with TCHK
Waits (pauses the calculator) until a key is pressed and stores the key code to [intName]. They key code is determined by 10*row+column, where (column, row) is the location of the key on the calculator, starting from the upper left corner.
Writes the contents of [intName] to the program's "data string," which can be read by using READ
. [int_position] probably shouldn't be more than 9...? Some versions of MLC partially support writing other variable types, like strings, but support isn't very good. (MLC 86's combination of using WRTE and READ on strings seems to result in corrupted strings.)
Page under construction - finish WRTE, READ, INPT and WAIT, find out whether MLC TI-86 allows complex math expressions to be used as arguments for [int_Number]-type arguments