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

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?

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

Legends say if you spam more than DJ Omnimaga, you will become a walrus...


DJ 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.

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.
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


DJ 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.)

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?
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


PT_

June 01, 2016, 05:12:07 pm #84 Last Edit: June 01, 2016, 05:24:57 pm by PT_
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:


DJ Omnimaga


PT_

June 11, 2016, 10:56:15 am #86 Last Edit: June 11, 2016, 05:57:32 pm by PT_
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...

DJ 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. :)

PT_

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

DJ Omnimaga

Nice to see getKey and string display addition! :)

Powered by EzPortal