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 5 Guests are viewing this topic.

Dream of Omnimaga

So how exactly will math operations be done? I mean, will it be like Axe, where they are done one after another regardless of if it's + or * or will it be like the TI-OS where multiplications are done first?
  • 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_

Quote from: DJ Omnimaga on May 30, 2016, 03:59:50 AM
So how exactly will math operations be done? I mean, will it be like Axe, where they are done one after another regardless of if it's + or * or will it be like the TI-OS where multiplications are done first?
Exactly. It runs the operators just like the OS does. So 3+A*B would be 3+(A*B) and not (3+A)*B. This makes it very hard to implement, but I thought people are used with it, and it has no advantages to delete the precedence (first * /, then + -).

Snektron

  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


Dream of Omnimaga

Quote from: PT_ on May 30, 2016, 08:14:15 AM
Quote from: DJ Omnimaga on May 30, 2016, 03:59:50 AM
So how exactly will math operations be done? I mean, will it be like Axe, where they are done one after another regardless of if it's + or * or will it be like the TI-OS where multiplications are done first?
Exactly. It runs the operators just like the OS does. So 3+A*B would be 3+(A*B) and not (3+A)*B. This makes it very hard to implement, but I thought people are used with it, and it has no advantages to delete the precedence (first * /, then + -).
I would have been fine with both, but of course you would need to warn users in the readme about order of operations clearly, like with Axe Parser.
  • 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

aetios

To be honest I'd prefer left to right order of operations, except of course for parentheses.
ceci n'est pas une signature

PT_

Quote from: aeTIos on May 31, 2016, 12:01:58 PM
To be honest I'd prefer left to right order of operations, except of course for parentheses.
That means I need to rewrite the whole first part of the parser. I think people are used with the normal order of operations, like the OS does, so why not in ICE?

Snektron

I think order of operations will be better. Btw, i had an idea a while ago for something like c arrays, where you can basically do

A[10]->B
L1[A]->B
1000[A]->B

To read from an offset. You can even do something with r to multiply the offset with 2/3, for 2 or 3 byte elements.
  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


Dream of Omnimaga

Quote from: PT_ on May 31, 2016, 12:25:49 PM
Quote from: aeTIos on May 31, 2016, 12:01:58 PM
To be honest I'd prefer left to right order of operations, except of course for parentheses.
That means I need to rewrite the whole first part of the parser. I think people are used with the normal order of operations, like the OS does, so why not in ICE?
Yeah I am ok with TI-OS order of operation personally. I think aeTIos' point is for the many people used to Axe Parser who are seeing ICE as Axe's successor for them to transition easier from monochrome to color calcs. But it would be better to keep things consistent with the TI-OS (except maybe how Output(), Text() and Pxl-???() switched the X/Y coordinates around.)
  • 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

Snektron

Quote from: DJ Omnimaga on May 31, 2016, 09:52:55 PM
(except maybe how Output(), Text() and Pxl-???() switched the X/Y coordinates around.)

I really wonder how TI ever got the insane idea to use (Y, X) as coordinates. Do they literally hate everyone?
  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


PT_

#84
I DID IT!!!!!!!!!

I'm so happy now :) I succesfully compiled a normal program, without any errors :D

Ofc, I've finally a gif for you guys!


The program is still far from perfect, but I'm more than happy with this now :D

EDIT:


Dream of Omnimaga

  • 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_

#86
ICE v1.0 is ready!!!



ICE Compiler is a program that compiles TI-BASIC-like language to ASM, the machine code. Create insane games, use the color screen, and make the step to ASM smaller! Speed up your BASIC programs and it's super easy to use! Type your program in the normal editor, compile it within seconds, and you have hours of fun! It doesn't require any shell.

Download is at the first post of this topic  >:D
Please, please read the README and DOCUMENTATION...

Dream of Omnimaga

Wait, you completed the entire language? Or is it a demo? I am surprised that it came out in v1.0 this fast O.O

I'll download it soon and give it a try. You should put the download link (https://codewalr.us/index.php?action=dlattach;topic=1234.0;attach=1032 ) in the first post of this topic so people can find it faster. :)
  • 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_

Version 1.1 June XX, 2016
☐ Lbl/Goto
☐ Display strings
☐ getKey
☐ Use ix for accessing variables
☐ Input
☐ rand

Dream of Omnimaga

Nice to see getKey and string display addition! :)
  • 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

Powered by EzPortal