The shoutbox is currently out of service. Join us on Discord instead.

[TI-84+CE] ICE Compiler

Started by PT_, March 25, 2016, 08:14:17 am

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

DJ Omnimaga

Glad this has resumed. I was getting a bit worried it bit the dust like most other custom language projects. Make sure the GUI is simple so that it doesn't take too much space. Are the auto-opt like Axe's? And sorry you still have issues implementing custom tokens. By the way, will custom tokens work on calculators that don't have ICE installed?

Sprite() is definitively one I am looking forward to :3=

PT_

Quote from: DJ Omnimaga on August 11, 2016, 04:54:18 pm
Glad this has resumed. I was getting a bit worried it bit the dust like most other custom language projects. Make sure the GUI is simple so that it doesn't take too much space. Are the auto-opt like Axe's? And sorry you still have issues implementing custom tokens. By the way, will custom tokens work on calculators that don't have ICE installed?

Sprite() is definitively one I am looking forward to :3=
I don't know how Axe has implemented auto-opt, but the first post I read was that he says auto-opt for multiplication was very hard. He only has the standard case, while I have already the easy cases for *2 etc, so I don't need to optimize it even. I will focus me more on the combination of code snippets, as you can see in the example :)
Yes, custom tokens will just replace standard, unused in ICE programs, tokens, so no problem  :thumbsup:

DJ Omnimaga

There is a text file in the zip file that shows some auto-ops. :)

PT_

It's time for maybe the biggest update ever of ICE. As you all know, it can only handle 8-bit integers, and is pretty limited to only variables and numbers, not strings, not lists, a very few functions, no arguments for a function. So it's time for a giant update. Since I at least need to change the whole algorithm to handle 3-byte integers, I thought it would be useful to change the whole stuff, so that
1) lists(functions) are supported
2) strings(functions) are supported
3) easy way to add functions
4) correct handling of arguments, even lists or strings
The giant update means too a giant increasing size... I still need to have all the code for adding, subbing, dividing etc, but now even more. For the interesting part: here are all the possibilities that should be supported, for adding:
- <integer> <integer>
- <integer> <variable>
- <integer> <list>
- <integer> <function>
- <variable> <integer>
- <variable> <variable>
- <variable> <list>
- <variable> <function>
- <list> <integer>
- <list> <variable>
- <list> <list> (even not the same dimension)
- <list> <function>
- <string> <string> ("ABC"+"DEF" -> "ABCDEF"

Interesting, not? :P
This would mean a giant update, and that takes much time, but if this is finished, adding new stuff is peanuts. I hope you don't blame me, as this is very useful. Also, university starts next week, so I doubt if I have enough time.... I will continue this! :)

@DJ Omnimaga : mines are better :trollface:

DJ Omnimaga

List support is definitively a nice addition IMHO. It makes it easier for data management and tilemap storage. Glad to see new progress :)

PT_

Thanks! :D

GUI almost done:


DJ Omnimaga

Looks simple and good. :)

PT_

Another big problem is fixed: custom tokens. Now it finally works fine!



The code is so complicated you don't want to see it :P
I had 2 possibilities: either locating the hooks at a fixed point in RAM, or create my own appvar, and insert them. I chose the last option, because compiled ICE programs can use all the RAM, and I suffer what will happen when one accidentally overwrites the hooks. So, each time I start ICE, it checks if it exists, remove it if necessary and create an appvar with the hooks in it. Then it archives it, so it's a bit harder to delete it, and if you delete it from the memory management, it still exists. The main problem is, that you now don't know what the starting memory of the hooks is, for relative jumps/whatever. So yeah, it seems I fixed it, and I'm pretty happy with it ^^ :D

Now that I have fixed the main structure, is it pretty easy to add new tokens.

E37

It looks really awesome!
What arguments does Sprite( take?
It's really neat to see the project come this far!
Good luck  :D
I've never finished a project, there is always a way to improve!
What's my calc's name? Convert $37 to decimal. Look up that element in the periodic table. Then take the abbreviation of that element and you have it!
Look! A slime!    <(^.^)>

PT_

Yet nothing :trollface:
In the future, it would look like Sprite(x,y,width,height,data) for example. I'm not sure though, because these 'tokens' doesn't work currently.

DJ Omnimaga

August 24, 2016, 01:44:47 am #190 Last Edit: August 24, 2016, 01:47:11 am by DJ Omnimaga
Question @PT_ : If you try to send an ICE program source code to the computer and it uses the Sprite() command, can you send it back to the calculator afterwards without any problem and code corruption? And can SourceCoder open the code? I am curious because on early versions of Omnicalc (version 1.00 through 1.10), programs that contained the Sprite() command or other Omnicalc ones could not be transfered between calculators unless grouped, and if you tried opening the source code on a calculator that doesn't have Omnicalc hooks installed, then the calculator crashed with a RAM Clear or displayed junk instead of code. Something to note also is that those versions of Omnicalc only ran on OS 1.13 and 1.14, not 1.15 and higher.

Anyway I like how this is coming along. I can't wait until that sprite command actually displays sprites :)

IMHO I think the sprite command should be as simple as possible (as in, as few arguments as possible). For example, Sprite(X,Y,zoom,pointer). That way it's easier to remember.

PT_

Quote from: DJ Omnimaga on August 24, 2016, 01:44:47 am
Question @PT_ : If you try to send an ICE program source code to the computer and it uses the Sprite() command, can you send it back to the calculator afterwards without any problem and code corruption? And can SourceCoder open the code? I am curious because on early versions of Omnicalc (version 1.00 through 1.10), programs that contained the Sprite() command or other Omnicalc ones could not be transfered between calculators unless grouped, and if you tried opening the source code on a calculator that doesn't have Omnicalc hooks installed, then the calculator crashed with a RAM Clear or displayed junk instead of code. Something to note also is that those versions of Omnicalc only ran on OS 1.13 and 1.14, not 1.15 and higher.

Anyway I like how this is coming along. I can't wait until that sprite command actually displays sprites :)

IMHO I think the sprite command should be as simple as possible (as in, as few arguments as possible). For example, Sprite(X,Y,zoom,pointer). That way it's easier to remember.

Yes, the custom tokens are a replacement of existing tokens. Well, 'tokens'. They replace VERY unnecessary tokens such as 'Á' etc, or Î. So if you send the ICE program to your computer, it won't crash, no weird tokens (Á is not weird :P). Maybe ICE support could be implemented in SourceCoder, need to speak with Kerm about that though. Sending an ICE program to another calculator also doesn't mind. If it has ICE installed, the tokens are displayed right, and if not, just Á or so.
You need to run ICE at least once to install the tokens.

DJ Omnimaga

Oh I see. I thought the custom tokens were brand new tokens, which were known on older calcs as illegal tokens. Good move to use the less used tokens by the way, although I wonder if that makes them harder to find in Catalog. Does ICE sort the Catalog menu?

PT_

Quote from: DJ Omnimaga on August 24, 2016, 07:45:03 am
Oh I see. I thought the custom tokens were brand new tokens, which were known on older calcs as illegal tokens. Good move to use the less used tokens by the way, although I wonder if that makes them harder to find in Catalog. Does ICE sort the Catalog menu?

No. The accented letters are not accessable through the Catalog, but if you press [TRACE] in the program editor, you will get the menu with my custom tokens. You can also install at least the Dutch OS, because there are the accented letters accessable. I dunno how that will look like though :trollface:

PT_


Powered by EzPortal