π
<-

ICE Compiler

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

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

Unread postby 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
User avatar
EphariusPremium
Niveau 16: CC2 (Commandeur des Calculatrices)
Niveau 16: CC2 (Commandeur des Calculatrices)
Level up: 8.9%
 
Posts: 1182
Images: 4
Joined: 08 Dec 2014, 17:38
Gender: Not specified
Calculator(s):
MyCalcs profile
Class: Ensimag
GitHub: MathisLav

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

Unread postby 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: Select all
1->L1(3
What Axe Parser needs, is something like this:
Code: Select all
1->{L1+3}
but the OS can't run such piece of code. This is how ICE works:
Code: Select all
// 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%
User avatar
PT_Programmeur
Niveau 13: CU (Calculateur Universel)
Niveau 13: CU (Calculateur Universel)
Level up: 57.2%
 
Posts: 259
Joined: 09 Feb 2016, 23:06
Gender: Male
Calculator(s):
MyCalcs profile

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

Unread postby Dream of Omni » 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
ImageImageImageImageImage
User avatar
Dream of OmniPremium
Niveau 12: CP (Calculatrice sur Pattes)
Niveau 12: CP (Calculatrice sur Pattes)
Level up: 28.1%
 
Posts: 719
Images: 51
Joined: 21 Feb 2012, 12:04
Location: Quebec, Canada
Gender: Male
Calculator(s):
MyCalcs profile
Class: 11eme annee scolaire termine
YouTube: DJOmnimaga
Facebook: dreamofomnimaga.page

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

Unread postby PT_ » 25 Mar 2016, 09:28

DJ Omnimaga wrote: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%
User avatar
PT_Programmeur
Niveau 13: CU (Calculateur Universel)
Niveau 13: CU (Calculateur Universel)
Level up: 57.2%
 
Posts: 259
Joined: 09 Feb 2016, 23:06
Gender: Male
Calculator(s):
MyCalcs profile

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

Unread postby 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%
User avatar
PT_Programmeur
Niveau 13: CU (Calculateur Universel)
Niveau 13: CU (Calculateur Universel)
Level up: 57.2%
 
Posts: 259
Joined: 09 Feb 2016, 23:06
Gender: Male
Calculator(s):
MyCalcs profile

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

Unread postby Ti64CLi++ » 01 Apr 2016, 12:51

It is possible to download this project?
Image
User avatar
Ti64CLi++Modo
Niveau 16: CC2 (Commandeur des Calculatrices)
Niveau 16: CC2 (Commandeur des Calculatrices)
Level up: 32.5%
 
Posts: 3446
Images: 75
Joined: 04 Jul 2014, 14:40
Location: Clermont-Ferrand 63
Gender: Male
Calculator(s):
MyCalcs profile
Class: ENS Rennes
GitHub: Ti64CLi

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

Unread postby PT_ » 01 Apr 2016, 13:40

neuronix wrote: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%
User avatar
PT_Programmeur
Niveau 13: CU (Calculateur Universel)
Niveau 13: CU (Calculateur Universel)
Level up: 57.2%
 
Posts: 259
Joined: 09 Feb 2016, 23:06
Gender: Male
Calculator(s):
MyCalcs profile

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

Unread postby Ti64CLi++ » 01 Apr 2016, 13:49

If you want, I can test it ;)
Image
User avatar
Ti64CLi++Modo
Niveau 16: CC2 (Commandeur des Calculatrices)
Niveau 16: CC2 (Commandeur des Calculatrices)
Level up: 32.5%
 
Posts: 3446
Images: 75
Joined: 04 Jul 2014, 14:40
Location: Clermont-Ferrand 63
Gender: Male
Calculator(s):
MyCalcs profile
Class: ENS Rennes
GitHub: Ti64CLi

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

Unread postby PT_ » 01 Apr 2016, 18:58

neuronix wrote: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%
User avatar
PT_Programmeur
Niveau 13: CU (Calculateur Universel)
Niveau 13: CU (Calculateur Universel)
Level up: 57.2%
 
Posts: 259
Joined: 09 Feb 2016, 23:06
Gender: Male
Calculator(s):
MyCalcs profile

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

Unread postby PT_ » 17 May 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: Select all
  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: Select all
  jr noAPI
  jr APIContinue
noAPI:
  header....
APIContinue:
  call _ChkFindSym
etc
Age of CEmpires I - In progress!
40%
User avatar
PT_Programmeur
Niveau 13: CU (Calculateur Universel)
Niveau 13: CU (Calculateur Universel)
Level up: 57.2%
 
Posts: 259
Joined: 09 Feb 2016, 23:06
Gender: Male
Calculator(s):
MyCalcs profile

PreviousNext

Return to Langages alternatifs

Who is online

Users browsing this forum: ClaudeBot [spider] and 3 guests

-
Search
-
Social TI-Planet
-
Featured topics
Comparaisons des meilleurs prix pour acheter sa calculatrice !
"1 calculatrice pour tous", le programme solidaire de Texas Instruments. Reçois gratuitement et sans aucune obligation d'achat, 5 calculatrices couleur programmables en Python à donner aux élèves les plus nécessiteux de ton lycée. Tu peux recevoir au choix 5 TI-82 Advanced Edition Python ou bien 5 TI-83 Premium CE Edition Python.
Enseignant(e), reçois gratuitement 1 exemplaire de test de la TI-82 Advanced Edition Python. À demander d'ici le 31 décembre 2024.
Aidez la communauté à documenter les révisions matérielles en listant vos calculatrices graphiques !
1234
-
Donations / Premium
For more contests, prizes, reviews, helping us pay the server and domains...
Donate
Discover the the advantages of a donor account !
JoinRejoignez the donors and/or premium!les donateurs et/ou premium !


Partner and ad
Notre partenaire Jarrety Calculatrices à acheter chez Calcuso
-
Stats.
1757 utilisateurs:
>1722 invités
>28 membres
>7 robots
Record simultané (sur 6 mois):
6892 utilisateurs (le 07/06/2017)
-
Other interesting websites
Texas Instruments Education
Global | France
 (English / Français)
Banque de programmes TI
ticalc.org
 (English)
La communauté TI-82
tout82.free.fr
 (Français)