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 ).
ICE Compiler
Re: ICE - an interpreter/compiler of CE-BASIC
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
Unis par la flèche sacrée de cupidon
-
EphariusPremium
Niveau 16: CC2 (Commandeur des Calculatrices)- Messages: 1148
- Images: 4
- Inscription: 08 Déc 2014, 17:38
- Genre:
- Calculatrice(s):→ MyCalcs profile
- Classe: Ensimag
- GitHub: MathisLav
Re: ICE - an interpreter/compiler of CE-BASIC
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:
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
We have this kind of code:
- Code: Tout sélectionner
1->L1(3
- Code: Tout sélectionner
1->{L1+3}
- Code: Tout sélectionner
// express the index, -> 3
ld hl, _base_of_L1
add 3
ld (hl), 1
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!
-
PT_Programmeur
Niveau 13: CU (Calculateur Universel)- Messages: 259
- Inscription: 09 Fév 2016, 23:06
- Genre:
- Calculatrice(s):→ MyCalcs profile
Re: ICE - an interpreter/compiler of CE-BASIC
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
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
-
DoOmnimagaPremium
Niveau 12: CP (Calculatrice sur Pattes)- Messages: 683
- Images: 25
- Inscription: 21 Fév 2012, 12:04
- Localisation: Quebec, Canada
- Genre:
- Calculatrice(s):→ MyCalcs profile
- Classe: 11eme annee scolaire termine
- YouTube: DJOmnimaga
- Twitter/X: DJOmnimaga
- Facebook: dreamofomnimaga.page
Re: ICE - an interpreter/compiler of CE-BASIC
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
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 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!
-
PT_Programmeur
Niveau 13: CU (Calculateur Universel)- Messages: 259
- Inscription: 09 Fév 2016, 23:06
- Genre:
- Calculatrice(s):→ MyCalcs profile
Re: ICE - an interpreter/compiler of CE-BASIC
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:
Do you like it? Wanna change something?
Do you like it? Wanna change something?
Age of CEmpires I - In progress!
-
PT_Programmeur
Niveau 13: CU (Calculateur Universel)- Messages: 259
- Inscription: 09 Fév 2016, 23:06
- Genre:
- Calculatrice(s):→ MyCalcs profile
-
Ti64CLi++Modo
Niveau 16: CC2 (Commandeur des Calculatrices)- Messages: 3446
- Images: 75
- Inscription: 04 Juil 2014, 14:40
- Localisation: Clermont-Ferrand 63
- Genre:
- Calculatrice(s):→ MyCalcs profile
- Classe: ENS Rennes
- GitHub: Ti64CLi
Re: ICE - an interpreter/compiler of CE-BASIC
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!
-
PT_Programmeur
Niveau 13: CU (Calculateur Universel)- Messages: 259
- Inscription: 09 Fév 2016, 23:06
- Genre:
- Calculatrice(s):→ MyCalcs profile
-
Ti64CLi++Modo
Niveau 16: CC2 (Commandeur des Calculatrices)- Messages: 3446
- Images: 75
- Inscription: 04 Juil 2014, 14:40
- Localisation: Clermont-Ferrand 63
- Genre:
- Calculatrice(s):→ MyCalcs profile
- Classe: ENS Rennes
- GitHub: Ti64CLi
Re: ICE - an interpreter/compiler of CE-BASIC
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!
-
PT_Programmeur
Niveau 13: CU (Calculateur Universel)- Messages: 259
- Inscription: 09 Fév 2016, 23:06
- Genre:
- Calculatrice(s):→ MyCalcs profile
Re: ICE - an interpreter/compiler of CE-BASIC
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:
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
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
Age of CEmpires I - In progress!
-
PT_Programmeur
Niveau 13: CU (Calculateur Universel)- Messages: 259
- Inscription: 09 Fév 2016, 23:06
- Genre:
- Calculatrice(s):→ MyCalcs profile
Retourner vers Langages alternatifs
Qui est en ligne
Utilisateurs parcourant ce forum: Aucun utilisateur enregistré et 6 invités