π
<-
Chat plein-écran
[^]

ICE Compiler

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

Re: ICE Compiler

Message non lude PT_ » 07 Juil 2016, 19:17

Okay..... IT'S FINALLY READYYYYYY :) :) :D
Compiling is now much easier (not faster), and better understandable.
The link to the download is in the first post of this thread, to find it easy.

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

Have fun and don't hesitate to post anything!

Also, it will be open-source, I will upload it soon to GitHub

Image
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 Compiler

Message non lude Adriweb » 07 Juil 2016, 19:30

Awesome - Glad it will be on GitHub as well, this should prove both useful for development purposes with people being able to help/contribute, and for a teaching/earning perspective, since it's always nice to learn by example :)

Anyway, this should be newsable, though would probably require some more examples, list of things working currently, in the future, etc. (and a french version of the news article content, but we can do that :P)
BTW, do you have some comparison, for example, of a Basic version and an ICE version for an algorithm that takes a bit of time? It would be nice to be able to compare performance directly.

Also, I like the inline Asm(hex_here, much simpler than having to call another program :P
Image

MyCalcs: Help the community's calculator documentations by filling out your calculators info!
MyCalcs: Aidez la communauté à documenter les calculatrices en donnant des infos sur vos calculatrices !
Inspired-Lua.org: All about TI-Nspire Lua programming (tutorials, wiki/docs...)
Avatar de l’utilisateur
AdriwebAdmin
Niveau 16: CC2 (Commandeur des Calculatrices)
Niveau 16: CC2 (Commandeur des Calculatrices)
Prochain niv.: 80.2%
 
Messages: 14615
Images: 1218
Inscription: 01 Juin 2007, 00:00
Localisation: France
Genre: Homme
Calculatrice(s):
MyCalcs profile
Twitter/X: adriweb
GitHub: adriweb

Re: ICE Compiler

Message non lude PT_ » 07 Juil 2016, 20:42

Adriweb a écrit:Awesome - Glad it will be on GitHub as well, this should prove both useful for development purposes with people being able to help/contribute, and for a teaching/earning perspective, since it's always nice to learn by example :)

Anyway, this should be newsable, though would probably require some more examples, list of things working currently, in the future, etc. (and a french version of the news article content, but we can do that :P)
BTW, do you have some comparison, for example, of a Basic version and an ICE version for an algorithm that takes a bit of time? It would be nice to be able to compare performance directly.

Also, I like the inline Asm(hex_here, much simpler than having to call another program :P

Thanks :)
Here is my global future list, not really good, but yeah :troll:
Code: Tout sélectionner
Version 1.0: June 11, 2016   
   ☑ Adding, substracting, multiplication, dividing
   ☑ Parenthesis
   ☑ Booleans, comparisons
   ☑ Storing, variables
   ☑ Run inline ASM
   ☑ Display integers
   ☑ ClrHome
   ☑ If, Repeat, While
   
Version 1.1: July 07, 2016
   ☑ Custom compiled program name
   ☑ Compile archived program
   ☑ getKey, rand
   ☑ Pause
   ☑ Direct incrementing/decrementing variables
   ☑ Changed accessing variables using ix, located at $E30800
   ☑ Input
   ☑ Lbl/Goto
   ☑ Display strings
   ☑ Bugs fixed
   
Version 1.2: August XX, 2016
   ☐ Optional Cesium icon/description
   ☐ Sprites
   ☐ For(
   ☐ GUI
   ☐ Run assembly subprograms
   ☐ 24-bits integers support
   ☐ Text(
   ☐ Basic list support
   ☐ Better compiling
   ☐ If - Then - Else
   ☐ Call a label
   ☐ Return
   ☐ DoorsCE support?
   ☐ Auto-optimization
   ☐ Colored text, foreground+background

Maybe this is too much; then I will split it into more releases.

For the difference: I've showed one small difference at the Cemetech thread, please take a look over there :) Need more examples? This is almost just pure BASIC, no need to have examples, because there are enough BASIC tutorials. Only some main differences, like IS>(<variable> and Asm(<hexstring>. If you really need help or examples, I'm willing to make some ;)
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 Compiler

Message non lude Ti64CLi++ » 08 Juil 2016, 14:26

Nice.
Very great job PT :bj:
For Text( command, do you plan to make color and big or small or inverted text?
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 Compiler

Message non lude PT_ » 14 Juil 2016, 21:58

Time for some important notes/question.

As promised, ICE v1.1 is open source. You can download/view it at https://github.com/PeterTillema/ICE. There is currently no license, but please don't copy/share it, as normal. I hope to find a good one soon :)

I'm going abroad for about 3 weeks, so then I can't work on it.

I will split the main to-do-list in 2 parts. The first part is more focused on compiling, errors, and a good GUI. The second part is more focused on adding stuff, and customs tokens.

That said, about customs tokens, I have some interesting questions for you guys. First, let me explain how I want to do this. What I need: 3 hooks: GetCSC, Menu and Token hook. My goal was
1) check if you are in the program editor
2) if so, check if you pressed [TRACE]
3) if so, force the OS to being [PRGM] pressed
4) set a special bit
5) Menu hook -> bit set, my own menu with
6) customs tokens.

Now some questions:
- if you have the token hook, and you change DE (token number), would it still work somehow?
- when the OS displays a menu, and it reads a token to be displayed as an option, would the Tokenhook run?
- if you enable the recall queue in the program editor, and you insert a *non-existent* token for some reason, would it run the Tokenhook? (call _Get_Tok_Strng or call _GetTokStrng?)
- the Wiki says about the Tokenhook, that you can point hl to the string. Would it start with the string length, or should it be null-terminated?

Thanks in advance! :)
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 Compiler

Message non lude Lionel Debroux » 15 Juil 2016, 06:50

Even if there's no actual license yet, making ICE OSS is a good move :)

Between the WTFPLv2, the Apache/BSD/MIT/X11 family, the MPL, the LGPL, the GPLv2, the GPLv3, and other licenses less widespread and/or less relevant to source code, there's a huge amount of choice, spanning the whole range between "software is open source with strong usage + modification rights and really must stay that way" (GPLv2 / GPLv3) and "anyone can do anything with it, including make closed-source forks, sell them, use them to sue, register software patents, and whatever else, without giving back to the community in any way" (WTFPLv2 of course, but also pretty much BSD/MIT/X11).
Membre de la TI-Chess Team.
Co-mainteneur de GCC4TI (documentation en ligne de GCC4TI), TIEmu et TILP.
Avatar de l’utilisateur
Lionel DebrouxSuper Modo
Niveau 14: CI (Calculateur de l'Infini)
Niveau 14: CI (Calculateur de l'Infini)
Prochain niv.: 11.2%
 
Messages: 6859
Inscription: 23 Déc 2009, 00:00
Localisation: France
Genre: Homme
Calculatrice(s):
MyCalcs profile
Classe: -
GitHub: debrouxl

Re: ICE Compiler

Message non lude PT_ » 18 Juil 2016, 15:36

Well, the first step is made to my own custom tokens!!! (Btw, after inserting it in the program, it crashes :()
Image
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 Compiler

Message non lude Adriweb » 19 Juil 2016, 13:24

That's pretty cool :)
Reminds me of the Omnicalc ones ( http://www.detachedsolutions.com/omnica ... ctions.php first screenshot at the top )
Image

MyCalcs: Help the community's calculator documentations by filling out your calculators info!
MyCalcs: Aidez la communauté à documenter les calculatrices en donnant des infos sur vos calculatrices !
Inspired-Lua.org: All about TI-Nspire Lua programming (tutorials, wiki/docs...)
Avatar de l’utilisateur
AdriwebAdmin
Niveau 16: CC2 (Commandeur des Calculatrices)
Niveau 16: CC2 (Commandeur des Calculatrices)
Prochain niv.: 80.2%
 
Messages: 14615
Images: 1218
Inscription: 01 Juin 2007, 00:00
Localisation: France
Genre: Homme
Calculatrice(s):
MyCalcs profile
Twitter/X: adriweb
GitHub: adriweb

Re: ICE Compiler

Message non lude PT_ » 11 Aoû 2016, 11:31

Thanks :)

Time for some updates. This week I came back from my holiday, which means I had some time for programming again. And yes, of course, I picked up ICE to start with, outside of some small projects. I'm currently working on 4 parts:
- GUI
- Optimization
- Auto-optimization
- Add custom tokens.

The first part, the GUI, is halfway done, I still need to get all the programs from the VAT, starting with [i], and display them, and of course select one. The second point is just underway, many thanks to grosged who gave me some tips, and now I can save about 100 bytes, maybe even more. I'm about to start with point 3, the auto-opt. For example I have this peace of code: Repeat A=5
ICE now compiles that into
Code: Tout sélectionner
ld a, (ix+variableA)
sub a, 5
add a, $FF
sbc a, a
inc a
or a
jp z, ******

Well, it could be MUCH shorter!
Code: Tout sélectionner
ld a, (ix+variableA)
sub a, 5
jp z, ******

This will be done at the auto-opt part, and I guess it can optimize much stuff! :)

Last part is the custom tokens, or a replacement of uncommon tokens. I've posted earlier how I gonna do that, and I'm only struggling with the extended keypresses for tokens.
Side note, I want to 'create' these tokens:
ExecHex(
Sprite(
Rect(
ReadByte(
ReplaceByte(
AddByte(
DeleteByte(
SetupPrgm(
CreateVar(
ArchiveVar(
UnArchiveVar(
DeleteVar(
Inc(
Dec(

Wanna see things added? Let me know, even if you have questions what they can do! :)
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 Compiler

Message non lude Lionel Debroux » 11 Aoû 2016, 18:36

For this kind of on-calc code generators, you'll have to strike a balance between execution efficiency of the generated code, wrt. compile time and complexity of the compiler.

Re: another post elsewhere, where you mentioned at least 0xFF, 0xFE and 0xFC key codes: FWIW, the libticalcs list, itself extracted from ti83plus.inc or similar, is at https://github.com/debrouxl/tilibs/blob ... /keys83p.h . Not sure how complete / correct it is for the TI-eZ80 series, however :)
Membre de la TI-Chess Team.
Co-mainteneur de GCC4TI (documentation en ligne de GCC4TI), TIEmu et TILP.
Avatar de l’utilisateur
Lionel DebrouxSuper Modo
Niveau 14: CI (Calculateur de l'Infini)
Niveau 14: CI (Calculateur de l'Infini)
Prochain niv.: 11.2%
 
Messages: 6859
Inscription: 23 Déc 2009, 00:00
Localisation: France
Genre: Homme
Calculatrice(s):
MyCalcs profile
Classe: -
GitHub: debrouxl

PrécédenteSuivante

Retourner vers Langages alternatifs

Qui est en ligne

Utilisateurs parcourant ce forum: Aucun utilisateur enregistré et 33 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.
1537 utilisateurs:
>1525 invités
>8 membres
>4 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)