π
<-
Chat plein-écran
[^]

ICE Compiler

Assembleur, Axe, C/C++, ICE...
En ligne

Re: ICE - an interpreter/compiler of CE-BASIC

Message non lude Epharius » 23 Mar 2016, 23:12

Maybe you could store the floating point number at the end of the assembly program when you compile (like the strings), check if it is an integer and if so, copy a code (the assembly code) which uses saferam and else, a code which uses the OPs. You put the FP number into Op1 and a romcall (but I don't remember its name) tells you the decimal part of the number.

(just an idea, I don't know if you understood :p).
Le projet Geometry Dash est terminé ! N'hésitez pas à aller jeter un coup d’œil au topic du projet ! Vous pouvez le télécharger ici.

Unis par la flèche sacrée de cupidon :favorite:
Image
Avatar de l’utilisateur
EphariusPremium
Niveau 16: CC2 (Commandeur des Calculatrices)
Niveau 16: CC2 (Commandeur des Calculatrices)
Prochain niv.: 7%
 
Messages: 1107
Images: 4
Inscription: 08 Déc 2014, 17:38
Genre: Non spécifié
Calculatrice(s):
MyCalcs profile
Classe: Ensimag
GitHub: MathisLav

Re: ICE - an interpreter/compiler of CE-BASIC

Message non lude PT_ » 24 Mar 2016, 19:27

In this post, I will try to explain a bit more about ICE. I made a connection with Axe in my first post, but the only common is, that they are both parsing TI-BASIC. Axe is a totally different language, with other possibilities, while ICE just parse 'normal' BASIC. My hope is, to make ICE such, that it can compile EVERY normal BASIC program, like the OS do. The only difference is, that ICE will parse it BEFORE running, and the OS during running. An example:
We have this kind of code:
Code: Tout sélectionner
1->L1(3
What Axe Parser needs, is something like this:
Code: Tout sélectionner
1->{L1+3}
but the OS can't run such piece of code. This is how ICE works:
Code: Tout sélectionner
// express the index, -> 3
   ld hl, _base_of_L1
   add 3
   ld (hl), 1
In that way, the OS can still run it, and ICE too.

In other words, ICE is not a totally different language, it's only a small threshold to ASM.
I hope you now fully understand my goal :)
Age of CEmpires I - In progress!
40%
Avatar de l’utilisateur
PT_Programmeur
Niveau 13: CU (Calculateur Universel)
Niveau 13: CU (Calculateur Universel)
Prochain niv.: 57.2%
 
Messages: 259
Inscription: 09 Fév 2016, 23:06
Genre: Homme
Calculatrice(s):
MyCalcs profile

Re: ICE - an interpreter/compiler of CE-BASIC

Message non lude DoOmnimaga » 25 Mar 2016, 01:41

That is definitively a nice idea if you can pull this off.

Three things, though:

-Make sure to start small, because this project will be a massive undertaking. In my opinion, it doesn't have to be 100% identical to TI-BASIC. For example, you don't have to implement every single BASIC command, since most people will use this language to make games anyway. Do you need ANOVA() in a game? No. So basically you should probably start by implementing the most popular commands first, like Axe did (see the Axe releases history and look at what version 0.0.2 to 0.0.5 had, for example.) That will be less of a burden for you.

-People like being able to use the on-calc BASIC editor, TI-Connect CE editor, TokenIDE and SourceCoder 3. So it would definitively be a good idea to allow that in ICE rather than forcing people to use a third-party editor like BBC Basic did.

-I noticed over the last decade that Cemetech tends to be very against new languages that look like BASIC but are much faster than BASIC. I don't want to criticize them, but there is a lot of ASM and C fanboyism there and they were very negative towards Axe Parser back in the days, since they think that using Axe, a faster BASIC or Grammer instead of learning ASM and C is laziness. I know that you are very loyal to Cemetech PT_ and that certain community members don't want anything to do with other websites, and I don't like to advertise, but for a more positive reception towards your project, I would suggest that you cross-post updates on https://codewalr.us as well as https://www.omnimaga.org . There are many people there, especially on CodeWalrus since it's more active, who are waiting until Axe or a faster BASIC language comes out on the TI-84 Plus CE before buying the calculator because they find C too difficult and BASIC (even with libs) too slow, and they would probably welcome ICE with open arms if it becomes functional enough to allow games to be made. There was even a discussion about the possibility of porting Axe or making a new BASIC-like language to the CE at https://codewalr.us/index.php?topic=159
Dream of Omnimaga
ImageImageImageImage
Avatar de l’utilisateur
DoOmnimagaPremium
Niveau 12: CP (Calculatrice sur Pattes)
Niveau 12: CP (Calculatrice sur Pattes)
Prochain niv.: 7.3%
 
Messages: 681
Images: 25
Inscription: 21 Fév 2012, 12:04
Localisation: Quebec, Canada
Genre: Homme
Calculatrice(s):
MyCalcs profile
Classe: 11eme annee scolaire termine
YouTube: DJOmnimaga
Twitter/X: DJOmnimaga
Facebook: djomnimaga

Re: ICE - an interpreter/compiler of CE-BASIC

Message non lude PT_ » 25 Mar 2016, 09:28

DJ Omnimaga a écrit:That is definitively a nice idea if you can pull this off.

Three things, though:

-Make sure to start small, because this project will be a massive undertaking. In my opinion, it doesn't have to be 100% identical to TI-BASIC. For example, you don't have to implement every single BASIC command, since most people will use this language to make games anyway. Do you need ANOVA() in a game? No. So basically you should probably start by implementing the most popular commands first, like Axe did (see the Axe releases history and look at what version 0.0.2 to 0.0.5 had, for example.) That will be less of a burden for you.

-People like being able to use the on-calc BASIC editor, TI-Connect CE editor, TokenIDE and SourceCoder 3. So it would definitively be a good idea to allow that in ICE rather than forcing people to use a third-party editor like BBC Basic did.

-I noticed over the last decade that Cemetech tends to be very against new languages that look like BASIC but are much faster than BASIC. I don't want to criticize them, but there is a lot of ASM and C fanboyism there and they were very negative towards Axe Parser back in the days, since they think that using Axe, a faster BASIC or Grammer instead of learning ASM and C is laziness. I know that you are very loyal to Cemetech PT_ and that certain community members don't want anything to do with other websites, and I don't like to advertise, but for a more positive reception towards your project, I would suggest that you cross-post updates on https://codewalr.us as well as https://www.omnimaga.org . There are many people there, especially on CodeWalrus since it's more active, who are waiting until Axe or a faster BASIC language comes out on the TI-84 Plus CE before buying the calculator because they find C too difficult and BASIC (even with libs) too slow, and they would probably welcome ICE with open arms if it becomes functional enough to allow games to be made. There was even a discussion about the possibility of porting Axe or making a new BASIC-like language to the CE at https://codewalr.us/index.php?topic=159

Thanks for your kind words :D
To reply on your notes:
1) Of course I will. I will first create the algorithm for parsing a mathematical expression, and once that is ready, I'm going to write routines. I know, Axe has started very small ;)
2) I've exactly the same feeling that an on-calc editor is the best. Unfortunately, my ASM skills are not that very high, so I decided to first create it in PHP. In version 2.0, I will port it to ASM, and even with more functions
3) I can't accept and deny it, due to the fact that I'm only 2 years active on Cemetech. I only know that not everyone was enthousiastic about ICE, but yeah :P I hope you can imagine, that it is impossible to post updates to all the 4/5/6 TI forums :( I've only made the starting article, but I think I will post all the major updates only to Cemetech, due to the fact that I'm a busy person :)

Btw, I've changed my primary goal a bit. Instead of compiling pure BASIC, or create a totally language, I decided to mix them. So I will use some features of Axe, but also keep the possibilities of BASIC. I hope to explain this later :)
Age of CEmpires I - In progress!
40%
Avatar de l’utilisateur
PT_Programmeur
Niveau 13: CU (Calculateur Universel)
Niveau 13: CU (Calculateur Universel)
Prochain niv.: 57.2%
 
Messages: 259
Inscription: 09 Fév 2016, 23:06
Genre: Homme
Calculatrice(s):
MyCalcs profile

Re: ICE - an interpreter/compiler of CE-BASIC

Message non lude PT_ » 31 Mar 2016, 22:11

Today I've started creating an image, as for the homescreen of the ASM port, and as a logo for my documentation. This is the result:

Image

Do you like it? Wanna change something? :)
Age of CEmpires I - In progress!
40%
Avatar de l’utilisateur
PT_Programmeur
Niveau 13: CU (Calculateur Universel)
Niveau 13: CU (Calculateur Universel)
Prochain niv.: 57.2%
 
Messages: 259
Inscription: 09 Fév 2016, 23:06
Genre: Homme
Calculatrice(s):
MyCalcs profile

Re: ICE - an interpreter/compiler of CE-BASIC

Message non lude Ti64CLi++ » 01 Avr 2016, 12:51

It is possible to download this project?
Image
Avatar de l’utilisateur
Ti64CLi++Modo
Niveau 16: CC2 (Commandeur des Calculatrices)
Niveau 16: CC2 (Commandeur des Calculatrices)
Prochain niv.: 32.3%
 
Messages: 3441
Images: 75
Inscription: 04 Juil 2014, 14:40
Localisation: Clermont-Ferrand 63
Genre: Homme
Calculatrice(s):
MyCalcs profile
Classe: ENS Rennes
GitHub: Ti64CLi

Re: ICE - an interpreter/compiler of CE-BASIC

Message non lude PT_ » 01 Avr 2016, 13:40

neuronix a écrit:It is possible to download this project?

The project is not in that stage that I can ask people to test it out :(
Age of CEmpires I - In progress!
40%
Avatar de l’utilisateur
PT_Programmeur
Niveau 13: CU (Calculateur Universel)
Niveau 13: CU (Calculateur Universel)
Prochain niv.: 57.2%
 
Messages: 259
Inscription: 09 Fév 2016, 23:06
Genre: Homme
Calculatrice(s):
MyCalcs profile

Re: ICE - an interpreter/compiler of CE-BASIC

Message non lude Ti64CLi++ » 01 Avr 2016, 13:49

If you want, I can test it ;)
Image
Avatar de l’utilisateur
Ti64CLi++Modo
Niveau 16: CC2 (Commandeur des Calculatrices)
Niveau 16: CC2 (Commandeur des Calculatrices)
Prochain niv.: 32.3%
 
Messages: 3441
Images: 75
Inscription: 04 Juil 2014, 14:40
Localisation: Clermont-Ferrand 63
Genre: Homme
Calculatrice(s):
MyCalcs profile
Classe: ENS Rennes
GitHub: Ti64CLi

Re: ICE - an interpreter/compiler of CE-BASIC

Message non lude PT_ » 01 Avr 2016, 18:58

neuronix a écrit:If you want, I can test it ;)

Once I get some more ready, I'm very happy that people want to test it!:)

While I had much free time today, I've implemented the operators in the Shunting Yard Algorithm in ASM, including their precedence. It now builds 2 stacks, one at (saveSScreen), the other at (saveSScreen+1000), one for the actual stack, and the first one for the output, which I need to read after that. Unfortunately, I have no screenshots of that :(
I hope to make good progress these weeks! :thumbsup: :)
Age of CEmpires I - In progress!
40%
Avatar de l’utilisateur
PT_Programmeur
Niveau 13: CU (Calculateur Universel)
Niveau 13: CU (Calculateur Universel)
Prochain niv.: 57.2%
 
Messages: 259
Inscription: 09 Fév 2016, 23:06
Genre: Homme
Calculatrice(s):
MyCalcs profile

Re: ICE - an interpreter/compiler of CE-BASIC

Message non lude PT_ » 17 Mai 2016, 10:26

Small post despite my final exams: I've 'implemented' an API. That is, when running ICE from an ASM program, it will skip the header and directly search and compile the program. An example would be this:
Code: Tout sélectionner
  ld hl, ICEname
  call _Mov9ToOP1
  call _ChkFindSym
  ex de, hl
  ; skip header
  inc hl
  inc hl
  push hl    ; save for later
    ld hl, varname
    call _Mov9ToOP1
  pop hl
  ld (callAdress), hl
callAdress = $+1
  call $000000
  ; continue

Of course, you can modify it for your own, but the program name should be in OP1 and to skip the ICE header, increment twice the starting data point.
My ICE program would look like this:
Code: Tout sélectionner
  jr noAPI
  jr APIContinue
noAPI:
  header....
APIContinue:
  call _ChkFindSym
etc
Age of CEmpires I - In progress!
40%
Avatar de l’utilisateur
PT_Programmeur
Niveau 13: CU (Calculateur Universel)
Niveau 13: CU (Calculateur Universel)
Prochain niv.: 57.2%
 
Messages: 259
Inscription: 09 Fév 2016, 23:06
Genre: Homme
Calculatrice(s):
MyCalcs profile

PrécédenteSuivante

Retourner vers Langages alternatifs

Qui est en ligne

Utilisateurs parcourant ce forum: Aucun utilisateur enregistré et 6 invités

-
Rechercher
-
Social TI-Planet
-
Sujets à la une
Comparaisons des meilleurs prix pour acheter sa calculatrice !
Aidez la communauté à documenter les révisions matérielles en listant vos calculatrices graphiques !
Phi NumWorks jailbreak
123
-
Faire un don / Premium
Pour plus de concours, de lots, de tests, nous aider à payer le serveur et les domaines...
Faire un don
Découvrez les avantages d'un compte donateur !
JoinRejoignez the donors and/or premium!les donateurs et/ou premium !


Partenaires et pub
Notre partenaire Jarrety Calculatrices à acheter chez Calcuso
-
Stats.
1059 utilisateurs:
>1038 invités
>16 membres
>5 robots
Record simultané (sur 6 mois):
6892 utilisateurs (le 07/06/2017)
-
Autres sites intéressants
Texas Instruments Education
Global | France
 (English / Français)
Banque de programmes TI
ticalc.org
 (English)
La communauté TI-82
tout82.free.fr
 (Français)