Revision History...
Differences between v0.51 Beta & v0.6:
- Dynamically-allocated arrays
(including use of
malloc and
free functions.)
- Order-of-Operations
Correct order-of-operations and
operator
precedence (that is, the same
as ANSI C)
- X-Y fixed
All "display" functions take the arguments of
X,Y (that is,
the first argument is the "column", and the second is the "row",
unlike some of the TI-Basic functions.)
- New functions:
- random The random function now works...
- malloc This function will allocate a certain number of bytes
in memory, and will then store a code number for that location into the
variable. This will take a normal variable (int) and turn it into
a TIC-pointer-type. For
example,
int i;
proc main()
{i='a';
i=malloc(10);
i[5]='*';
free(i);
i='K';}
This
demonstrates the fact that any int variable can be used as a
pointer to an array, and then can be promptly used as a regular int
right after the call to free();
- free This fuction will take a code number (which should have
been chosen by a call to malloc()) and will de-allocate the memory
which was originally allocated. Any TIC-pointer-type should not be used
as
a pointer after a call to free it!!!
- puts (explained later)
- Smaller program
In versions 0.5 beta and 0.51 beta, the
assembly code often pushed data
onto the data-stack, and then popped it right off into the same register!
This was the VERY EASIEST way for us to implement it... well, most of these
are now removed from the assembly which is created. This should reduce the
size of any 92P file by about 20%!!! (Which means 20% faster, too!)
- C++ style comments
C++ style comments are now allowed.
These
are the type of comments where you
type //, and from there to the end of that line is ignored
- Inline Assembly
You can now use assembly code along
with yout TIC code. For information, click here.
- Program Naming
You can name your program. All you need to
do
is define a string with the desired program name, and make sure
to call it prog_name...string prog_name="this is
the name of the program";
- Constant Strings
You can define a string type (using the
keyword string). You can then use them for display using the
puts() function, like this...
string welcome1="Welcome to my
little
program";
proc main()
{setfont(0);
puts(10,15,welcome1,0);}
...the arguments to puts are the X-position to display to,
the Y-position to
display to, the name of the string, and the display type (0=white-on-black,
1=black-on-white). It is displayed in the current fonttype.