I think I found an ICE compiler problem:



if you don't want to watch to the end (like a few min) basically the ICE compiler crashes when there is a sin function (I was able to narrow it down with the program I show in the screenshot) I already reloaded ICE and ICEHOOKS so that's not the problem.

Here is the error that CEmu's console throws:

[CEmu] NMI reset caused by writing to flash at address 0x3c002e from unprivileged code. Hint: Possibly a null pointer dereference.
[CEmu] Reset caused by writing to bit 4 of port 0.
[CEmu] Reset triggered.
[CEmu] Memory reset.

I also shortened the code to just this and the same exact things happen

Code:
iSINCOMP
sin(120)

so now I 100% know its just the compiler and not me messing something up.

Edit:
It turns out that there was a problem with my OS (5.0) so I updated to 5.3 and it works perfectly Very Happy

here is a link to 5.3 OS just for you Smile
https://tiplanet.org/forum/archives_voir.php?id=1138252
I have been trying to do quick key with hexadecimals by doing asm( but it just resets my ram when I use the functions presented by the ti basic wiki. Does ICE use different hexadecimal codes then basic? And if it is different where would I find them?
Most assembly snippets intended for the monochrome calculators will not work as expected on the CE, which is what I suspect your problem is.
I found and used the hexadecimal code from here:
http://tibasicdev.wikidot.com/84ce:hexcodes

It is specifically for the CE/CSE and still doesn’t work /: don’t worry I typed it in like 5 times to check I did it right

Edit: changed link so it goes to the right place Razz
The issue is likely the C9 at the end - remove that and it probably won't crash.

I doubt it will actually work, though, as ICE doesn't update kbdScanCode automatically.
It didn’t crash but like what you thought, nothing happened. is there another way for me to do this? Also how did you know to remove the C9?

Thanks for helping Smile
Actually, jacobly suggested removing the C9 in SAX, I just posted after he didn't.

C9 is the opcode for the "ret" instruction, which returns from a program or routine. When you're putting it in its own program, you obviously want it to return so you can go back to TI-OS, but when you're putting it inline in an ICE program you don't want it to try to return in the middle of your program. ICE puts some additional stuff on the stack that prevents the return from actually working, which is why it crashes rather than immediately exiting.
Therad2 wrote:
It didn’t crash but like what you thought, nothing happened. is there another way for me to do this? Also how did you know to remove the C9?

Thanks for helping Smile

C9 is ret, which pops the last value of the stack into the program counter. This is probably making it jump to some location that's not what you want after the hexcode completes, which is what causes your problem.
ok that makes sense Smile is there any way to update the kbdScanCode myself or is there some workaround?
Is there a reason you can't just use getKey?
getkey just returns 1 or 0 if a key is being pressed so that wouldnt work
edit: just looked at the documentation and it returns 1 or 0 if that specific key is
pressed so ima go do some testing

edit 2: im feeling kinda stupid lol for not finding this earlier Razz they really should add something about getkey() having quick key in the ICE documentation. thanks for the help and suggestion Very Happy
If the amount of bytes a list can hold is 2000 bytes you should be able to have 2000 1 byte numbers but I can only store 250 numbers. Am I not doing something right when storing into the list?
Therad2 wrote:
If the amount of bytes a list can hold is 2000 bytes you should be able to have 2000 1 byte numbers but I can only store 250 numbers. Am I not doing something right when storing into the list?

How did you come up with the 250? Like, did you use CopyData(L1,1,0,0,0,0,0,....[x250]) or something different?
Quote:
How did you come up with the 250? Like, did you use CopyData(L1,1,0,0,0,0,0,....[x250]) or something different?

Yes after I did over 250 1s or 0s, either the RAM got reset or the list got corrupted/messed up. I didn’t do anything besides CopyData(L1,1,data
I found the reason this was happening: update your calc to 5.3 if you use ICE. Most things work on previous versions but a few things like lists and sin( or cos( are a bit funky.
Well I tried compiling my Opossum Massage Simulator code and there must be something that changed in ICE syntax because any attempt at compiling the game code crashes the calc.

I wanted to update the game since it only works with C libs released before October 2017.
Do you use trig functions in the code anywhere? Some older OS versions crash when the sine or cosine functions ICE uses are called, which occasionally happens during compilation.
Nope, I never learned trig in math classes. XD Here's my code btw http://sc.cemetech.net/?hash=ml0slTpaDqXV7Bq+Up/YugRKO32K

EDIT: Woops, looks like SC3 code sharing doesn't work anymore D: https://pastebin.com/qxvr5AxZ
xlibman wrote:
I wanted to update the game since it only works with C libs released before October 2017.

Can you expand on this a bit more? The C libraries are backwards compatible across all versions, so this seems like a case where the API might not be being used correctly by the ICE compiler?
FYI, I've archived all ICE-related repos, as I'm not developing it anymore and won't do it in the near future either. I don't have enough time to continue this, and not many people are using it anymore. Still thanks for the support everyone! Smile
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
» Goto page Previous  1, 2, 3 ... , 31, 32, 33  Next
» View previous topic :: View next topic  
Page 32 of 33
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement