RE: A92: Suggestions for the 92+ upgrade.


[Prev][Next][Index][Thread]

RE: A92: Suggestions for the 92+ upgrade.



Here's what I meant by TI-BASIC program generating code on-the-fly:

On the TI-92, code stored as a string can be executed with the expr() 
function. For example:

expr("Disp 56+12")

would execute:

Disp 56+12

Since strings can be manipulated, they can have code put into them, and 
that code can be run anytime, so an interpreter would have to be present.

Also, a command like Input can have the user enter expressions. Although 
the input must simplify to an algebraic data type (expression, string, 
list, matrix, etc.), it can use any function on the TI-92. This would have 
to be interpreted during run time.
________________

Jeff Tyrrill
http://tyrrill-ticalc.home.ml.org/
http://ti-philes.home.ml.org/


-----Original Message-----
From:	Francois Bradet [SMTP:hernick@videotron.ca]
Sent:	Saturday, November 08, 1997 5:53 PM
To:	assembly-92@lists.ticalc.org
Subject:	Re: A92: Suggestions for the 92+ upgrade.

>A TI-BASIC compiler would be either impossible, or very difficult to make.
I'm not certain it would be that difficult. A compiler is somewhat related
to an
interpreter, they already have something to build on. Not much, but
something.
But it surely can be done - take GCC for example.. It can compile from
multiple
source languages to multiple target assemblers. And it has been created by
volunteers, not paid people.

>TI-BASIC programs can generate code on-the-fly, and the compiler would 
have
>to be on the lookout for that code so the interpreter could take care of
I'm afraid I don't understand what you mean by generate code on-the-fly.
Could you
explain, with an example if possible ?

>it. Even if it were done, speed would only be increased marginally.
I think the speed increase would be far more than marginal. Take a simple
addition
in TI-BASIC. The interpreter needs to read and parse the line. It needs to
determine
what variables are concerned. What instruction is to be called. Then it can
do the
addition. And we have to include time for subroutine routine calls. An
addition in asm
is far simpler, get the variables in the right place and add them. No need
to toy with
parsing and other time-consuming operations.

>A good way to make the text editor better would be to change the F2 VIEW
>item. This should be replaced by two different menus, one labeled Folder
>and the other labeled Var Type. Each of these menus would just have the
>items that were previously in the View dialog box, which would save many
>keystrokes. Also, the current view settings, Folder and Var Type, should
>not be cleared when the Var Link menu is exited.
>
>Another change I would make is in the MODE dialog box, swap the locations
>of GRAPH and CURRENT FOLDER.