The shoutbox is currently out of service. Join us on Discord instead.
You can help CodeWalrus stay online by donating here.

[TI-84+CE] ICE Compiler

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

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

DJ Omnimaga

This seems good to me. Would PRGM be in the CTL menu, though? It might make more sense to group the program commands in the PRGM menu, such as the I/O ones, unless PRGM up there was a typo and you meant CTL. Also glad to see a rectangle command. :)

And yeah language apps have extra characters available via the Catalog menu's first option. It's not necessarily convenient, though, for typing actual commands.

Ti64CLi++

The ICE token menu is always ready or just in ICE prgm?
Administrateur de Tout 82
Sur TI Planet depuis Août 2014, rédacteur depuis Août 2015Donnez moi un Internet : c'est gratuit et ne prends pas beaucoup de tempsAdministrateur de Life Game World

PT_

Quote from: Ti64CLi++ on August 25, 2016, 08:48:12 am
The ICE token menu is always ready or just in ICE prgm?

You can access the menu every time you are in the program editor.

DJ Omnimaga

By the way, will the sprite data be similar to xLIBC?

c4ooo

For the language to be more usable, please dont have commands to modify bytes ;) Just use something like "{foo}" to identify read byte #foo and "bleh->{foo}" to write a byte.

DJ Omnimaga

Quote from: c4ooo on August 27, 2016, 02:08:56 am
For the language to be more usable, please dont have commands to modify bytes ;)
Why not?

PT_

Well, I'm really busy with school, so not really enough time to finish the next version. Despite that kind of struggles, I implemented lists, and only 2 options: storing a fixed custom list to an OS list (fixed = only integers allowed, no variables or whatever) and also doing operations on a single list element, like 5+L1(A-3) works too.
My test code was this: A-(3-L1(A-(B-3which is only 14 bytes. ICE turns this into:
-- ld ix, cursorImage
ld hl, (ix+3)
dec hl
dec hl
dec hl
ex de, hl
ld hl, (ix)
or a
sbc hl, de
ld de, saveSScreen
add hl, de
ld de, (hl)
ld hl, 3
or a
sbc hl, de
ex de, hl
ld hl, (ix)
or a
sbc hl, de
which is, if I'm right, 32/37 bytes. A bit too much, but I'm still proud of it ;)

Also, I'm still working on the auto-optimization, which is pretty hard.

-- calc84 pointed me to a bug, that the offset to a list element needs to be multiplied with 3. Should be easy to fix though.

That said, the whole code for one operator ( - ) is done, which means I can continue with the others. That should go a little bit faster though, because I have the structure done.

DJ Omnimaga

By fixed list only allowing integers and not variables, does it mean the list cannot be altered once it's stored in that format or something else? Glad to see updates, by the way. Good luck with school and this project :)

PT_

No, you can only store a list of integers to an OS list, such as {1,2,3,4,5->L1 but you can store anything to a list element, such as A->L1(5. What I tried to say is, that you can't do this for example: {1,2,3,4,A->L1.

DJ Omnimaga

Oh I see now. I guess that could put some constraints on programmers, but if they can do {1,2,3,4,5->L1, followed by A->L1(5 then that can probably do the job, even if not necessarily ideal. As long as we can modify individual list elements fine.

Any luck with sprites and/or changing colors of individual pixels, by the way?

PT_

In speed or size it doesn't matter, so no worries. It only looks a bit bad :trollface:
And sadly no, I first wanted to finish the operators, but it's actually not a bad idea to start with some functions!

PT_

September 24, 2016, 07:23:59 pm #206 Last Edit: September 24, 2016, 07:31:38 pm by PT_
So I finally had a free day, so I made a lot of changes:
  • You can now (re)compile archived programs
  • ICE now compiles the whole program, instead of only the first line
  • Fixed main structure
  • Fixed operators + and -, the other 12 need to be done soon :|
  • Added the function not(
  • Added the structure for my custom tokens, still need to start with
  • My custom tokens are now replacements of statistics tokens, instead of accented letters. I did this because TI-Planet members told me at least French people use them more than normal.
  • Removed the Inc( and Dec( token, because these are only useful for 1-byte variables.
  • Added the tokens switch( and case: which could be very useful in programming
  • Added some safety. If it encounters an error, it jumps to a function that display the error string, but then it may happen that the stack is messed up, so I stored the beginning stack pointer somewhere, and recall it before an error.

To-Do-List for the next release:
  • Cesium icon/description
  • Auto-optimization
  • Finish operators (2/14 done). This gonna take time
  • Add more functions, at least the custom ones
  • When you have only once Input , it would be faster and smaller to move that directly into the output program, instead of calling it, like this:
<code>
<input code>
<code>
ret
instead of<code>
call <input>
<code>
ret
<input code>

  • Get right random routine.

Well, every week I'm pretty busy, so I guess not many time for programming sadly :(

DJ Omnimaga

Nice to see progress! By the way, will custom tokens work if the user has a language localization app enabled?

E37

Quote
You can now (re)compile archived programs

Awesome! Hopefully you won't have the same troubles that Axe did with it.
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_

September 24, 2016, 07:27:00 pm #209 Last Edit: September 24, 2016, 07:28:40 pm by PT_
Quote from: DJ Omnimaga on September 24, 2016, 07:25:12 pm
Nice to see progress! By the way, will custom tokens work if the user has a language localization app enabled?
Yes, as I said my custom tokens are replacements of statistics tokens, which 1) nobody uses in the program editor and 2) will stay the same in another language. :)

Quote from: E37 on September 24, 2016, 07:26:09 pm
Quote
You can now (re)compile archived programs

Awesome! Hopefully you won't have the same troubles that Axe did with it.
No, since the archive structure is totally different ;) Programs are stored as in RAM, but the header is a little bit different.

Powered by EzPortal