You can help CodeWalrus stay online by donating here. | New CodeWalrus | Old (dark mode) | Old (light) | Discord server

[TI-84+CE] ICE Compiler

b/Software Downloads Started by PT_, March 25, 2016, 08:14:17 AM

Previous topic - Next topic

0 Members and 4 Guests are viewing this topic.

u/Snektron July 05, 2016, 10:39:00 AM
Does ICE support negative values?
u/Dream of Omnimaga July 05, 2016, 04:28:58 PM
Quote from: PT_ on July 05, 2016, 05:26:38 AM
Quote from: DJ Omnimaga on July 05, 2016, 01:51:57 AM
Wait, did the Lbl/Goto bug mess up your VAT or something in that screenshot? I hope it did not corrupt anything archive-related, though. That would be bad if you hit the OS certificate by accident and bricked your calc O.O
No, not really. I accidentally set the pointer to the compiled program name to $DD47E1 or something like that. Why it would mess up? I dunno. Btw, I use CEmu and I can easily redownload it ;)
Ah ok lol. I was unsure, since it was possible to corrupt the TI-83+/84+ archive if you unlocked flash and did bad stuff.
u/PT_ July 05, 2016, 05:22:17 PM
Quote from: Cumred_Snektron on July 05, 2016, 10:39:00 AM
Does ICE support negative values?
Nope, yet not.

NEW UPDATE: Disp <string>
It builds ANOTHER (:() stack for the program data, and at the end it copies it to the end of the program, and update all the pointers. Standard size = 13+length_string, and I've no idea about the speed.

(Actually, that ":" should be a ".". There is a difference between characters and tokens :(

Size: source = 31 bytes.
Compiled program = 64 bytes. Pretty good :)
u/Dream of Omnimaga July 05, 2016, 06:47:38 PM
What's the maximum string length?
u/PT_ July 05, 2016, 06:49:23 PM
Quote from: DJ Omnimaga on July 05, 2016, 06:47:38 PM
What's the maximum string length?
There is no maximum. Well, as long as vRAM is, maybe. But yeah, whould would like to display a string of 320*240*2 tokens? :trollface: 
u/PT_ July 05, 2016, 08:32:07 PM
And... I think this is double-post-worth :) :
ICE v1.1 is ready! Input, Lbl/Goto and Disp <string> now works too!
Here's an example program:


rand->A
Repeat A=B
Input B
If B>A
Goto TOOHIGH
Disp "TOOLOW"
Goto GETNEXT
Lbl TOOHIGH
Disp "TOOHIGH"
Lbl GETNEXT
1->C
While C
IS>(C
Pause 5
End
End
Asm(CD8C0D02     // call _GetKey
Disp A

Pretty good, right? Size = 104 vs 211 bytes. WOW :D :D :D

I can't say it's bugless (notice the wrong value of A at the end), but yeah, I'm super happy with this. I hope to upload it very soon! :)
u/Dream of Omnimaga July 06, 2016, 01:50:11 AM
Cool. I assume that 1.1 is sitting in ticalc.org or Cemetech pending queue, right? I might give it a try if I'm not too busy with going out  in the next few weeks (yay $1 public transit promotion and extended service).

The size is not bad. Normally such language ends up twice larger than ASM but if it's quite efficient then I can live with it, just like with Axe. :)
u/Unicorn July 06, 2016, 03:18:38 AM
So are there memory leaks with those gotos? And why make the code so confusing? Why not multiple if's for the checking?
u/Dream of Omnimaga July 06, 2016, 04:00:37 AM
Maybe he was just demonstrating Goto? Sometimes tutorials make useless code purposely to showcase one command in particular.
u/PT_ July 06, 2016, 05:30:54 AM
Quote from: DJ Omnimaga on July 06, 2016, 01:50:11 AM
Cool. I assume that 1.1 is sitting in ticalc.org or Cemetech pending queue, right? I might give it a try if I'm not too busy with going out  in the next few weeks (yay $1 public transit promotion and extended service).
Nope, I first want to test it all, and fix some bugs. After that, I will upload it :)
Quote from: DJ Omnimaga on July 06, 2016, 01:50:11 AM
The size is not bad. Normally such language ends up twice larger than ASM but if it's quite efficient then I can live with it, just like with Axe. :)
Indeed, and with the Goto's and Repeat/While, I can chop off 4 bytes by using a "jr" instead of "jp" but for now, I'm more than happy with it ;)
Quote from: Unicorn on July 06, 2016, 03:18:38 AM
So are there memory leaks with those gotos? And why make the code so confusing? Why not multiple if's for the checking?
No, there aren't any memory leaks. A Repeat looks like this: <code> \ or a \ jr z, <code>. A simple Goto is just a jump. So you will get <code> \ <jump> \ or a \ jr z, <code> which doesn't cause an overflowed stack, because there is no stack. And as DJ said, this example is just for showing what is possible, and I admit, it's pretty bad :trollface: 
u/Snektron July 06, 2016, 11:52:01 AM
Does stuff like

A*3->B*6->C

work too?
u/PT_ July 06, 2016, 12:51:53 PM
Quote from: Cumred_Snektron on July 06, 2016, 11:52:01 AM
Does stuff like

A*3->B*6->C

work too?
Sure :trollface:  that always saves space and speed:)
u/Snektron July 06, 2016, 04:47:41 PM
Quote from: PT_ on May 18, 2016, 10:17:32 AM
Quote from: Cumred_Snektron on May 18, 2016, 09:49:28 AM
BTW, are you going to provide something similar to axioms?
I haven't thought about that, but that sounds like an incredible idea. Fantastic! Can you show me an example of how that works? What can an Axiom do and how would that look like?

I've only noticed this just now, but they're basically natives for Axe, allowing people to make commands and add tokens. Not sure how to implemente them, but m,aybe they could work with Libload?
u/Dream of Omnimaga July 07, 2016, 03:52:53 AM
Quote from: PT_ on July 06, 2016, 05:30:54 AM
Quote from: DJ Omnimaga on July 06, 2016, 01:50:11 AM
Cool. I assume that 1.1 is sitting in ticalc.org or Cemetech pending queue, right? I might give it a try if I'm not too busy with going out  in the next few weeks (yay $1 public transit promotion and extended service).
Nope, I first want to test it all, and fix some bugs. After that, I will upload it :)
Quote from: DJ Omnimaga on July 06, 2016, 01:50:11 AM
The size is not bad. Normally such language ends up twice larger than ASM but if it's quite efficient then I can live with it, just like with Axe. :)
Indeed, and with the Goto's and Repeat/While, I can chop off 4 bytes by using a "jr" instead of "jp" but for now, I'm more than happy with it ;)
Quote from: Unicorn on July 06, 2016, 03:18:38 AM
So are there memory leaks with those gotos? And why make the code so confusing? Why not multiple if's for the checking?
No, there aren't any memory leaks. A Repeat looks like this: <code> \ or a \ jr z, <code>. A simple Goto is just a jump. So you will get <code> \ <jump> \ or a \ jr z, <code> which doesn't cause an overflowed stack, because there is no stack. And as DJ said, this example is just for showing what is possible, and I admit, it's pretty bad :trollface: 
Can multiple loops or blocks be nested?


As for Axioms, you could always add support for inline ASM and have people type the hexadecimal inside the Asm() command or something.
u/Snektron July 07, 2016, 01:55:07 PM
I don't think this is supposed to happen
Website statistics


MyCalcs | Ticalc.org | Cemetech | Omnimaga | TI-Basic Developer | MaxCoderz | TI-Story | Casiocalc.org | Casiopeia | The Museum of HP Calculators | HPCalc.org | CnCalc.org | Music 2000 Community | TI Education | Casio Education | HP Calcs | NumWorks | SwissMicros | Sharp Calculators
Powered by EzPortal