Join us on Discord!
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 1 Guest are viewing this topic.

Dream of 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.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Ti64CLi++

The ICE token menu is always ready or just in ICE prgm?
  • Calculators owned: TI-Nspire CX CAS, TI-Nspire CX, TI-Nspire, TI-Nspire CAS TouchPad, TI-Nspire CAS, TI-Nspire, TI-Voyage 200, TI-92 Plus, TI-89 Titanium, TI-89, TI-83 Premium CE, TI-84 Plus CE, TI-82 Advanced, TI-84 Pocket.fr, TI-84 Plus Silver Edition, TI-84 Plus, TI-83 Plus Silver Edition, TI-83 Plus.fr USB, TI-83 Plus.fr, TI-83 Plus, TI-83 Plus, TI-83, TI-82 Stats.fr, TI-76.fr, TI-36X Pro, TI-Collège Plus Solaire, TI-Collège Plus, TI-30X Pro MultiView, TI-30XS MultiView, TI-30XB MultiView, TI-30 XB MultiView
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.

Dream of Omnimaga

By the way, will the sprite data be similar to xLIBC?
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

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.

Dream of 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?
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

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.

Dream of 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 :)
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

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.

Dream of 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?
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

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_

#206
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 :(

Dream of Omnimaga

Nice to see progress! By the way, will custom tokens work if the user has a language localization app enabled?
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

E37

Quote
You can now (re)compile archived programs
Awesome! Hopefully you won't have the same troubles that Axe did with it.
  • Consoles, mobile devices and vintage computers owned: Ti83,Ti84!
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_

#209
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