I have been working on my second ICE program lately, and I have bumped into the problem of how to most efficiently input an ASCII string. I do NOT want to use the input function that ICE already has, because it doesn't work well, and the screen is messed up afterwards (and I did exit from graphics mode when using the input function). I discovered that I could make an appvar for each mode of input (caps, lowercase, math), and just seek to the offset in the relevant appvar (based on the last keypress value) and copy 1 character to an os_string to serve as the last inputted character. However, I'm sure that all the other C and ICE programs out there use some way more efficient method because they don't need to include several appvars (only for ASCII data) and most of them input ASCII characters fairly smoothly (a couple examples are Hexaedit and Contagion). So, if you already know or came up with an efficient method of text input for ICE or C (but especially ICE) in which you can be in graphics mode and use the TI-84 PCE's full ASCII table (~50 chars), please tell me about it (if U want to)! Thank you in advance!
Is the TextIOC library what you're looking for?

EDIT: Probably not, I forgot ICE can't use external libraries. Maybe you can look at the source and port it to ICE though.
Thank you! I did not know about that library, and I think that I will switch to C soon anyway because it has more possibilities than ICE anyway!
Edit: How would you build the library in CEdev? I have a mac with a zsh terminal and I am not able to run .bat files. Also, I couldn't even find the build.bat file that the instructions described.
ok
This could help, I changed a little bit and it works well. Wink
https://www.cemetech.net/forum/viewtopic.php?p=288490

Code:
"WRMH VQLG ZUPKFC YTOJEB XSNIDA"->MAINCHARS
"wrmh vqlg zupkfc ytojeb zsnida"->SUBCHARS
"369 258 147 "->NUMCHARS




32->CHAR
If KEY>=11 and KEY<=47 and MODE=0
*{MAINCHARS+KEY-11}->CHAR
End

If KEY>=11 and KEY<=47 and MODE=1
*{SUBCHARS+KEY-11}->CHAR
End

If KEY>=18 and KEY<=36 and MODE=2
*{NUMCHARS+KEY-18}->CHAR
End

If CHAR!=32
CHAR->**{Str1+length(Str1)}
End

If KEY=56
If length(Str1)>=2
sub(Str1,0,length(Str1)-1)->Str1
Else
““->Str1
End
End


"WRMH (4) VQLG (3) ZUPKFC (2) YTOJEB (2) XSNIDA"->MAINCHARS
"wrmh (4) vqlg (3) zupkfc (2) ytojeb (2) zsnida"->SUBCHARS
"369 (5) 258 (5) 147 "->NUMCHARS
  
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
Page 1 of 1
» 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