Hello!
This is my first posting, and of course I have a problem. Wink
I bought a TI-84 Plus CE-T to make some programs. Not the fanciest graphics stuff as a start, just simple programs like prime factors, calculating electronic circuits etc.
TI Basic is a bit too slow, so I tried C. Not much of a problem, my first C programs are from 1980 or so. Wink I could not believe what happend after installing the CE C Software Development Kit from MateoConLechuga - Hello world example compiled without errors and run. Wink Great work!
So I continued and did this:


Code:

const char prompt[] = "Input = ";
    char input[INPUT_SIZE];
    char response[BUFFER_SIZE];

    const char *HeadLine = "** My Program in C **";
   
    /* Clear home screen */
    os_ClrHome();

    /* Print program header line */
    printText(HeadLine, 0, 0);
   
    /* Get an input string from the user */
    os_SetCursorPos(2, 2);  /* Does nothing? */
    os_GetStringInput(prompt, input, sizeof(input));


Only clearing the screen, printing my program header and asking the user to input a string.
The problem is that os_GetStringInput clears the screen and my header line is gone.
The docu says: os_GetStringInput
"Custom implementation input routine for use in conjunction with the TIOS"
Not much info.

What I am doing wrong here? Setting the cursor in line 2 does not help either. The whole screen is erased.
Sorry if this question is stupid. Wink

Greetings
Thomas
I think that os_GetStringInput unavoidably clears the screen. I know it's not documented to do this, but sadly, a lot of things in the C toolchain are documented rather poorly.
Thanks for your answer!
If that is true, then it seems better to call the low level system functions direct. Or make my own wrapper between the assembler and the C level. But who cares - I began programming the TI-59 when I was 14, and saved every coin to buy it. Wink
This is a bug which is caused by the low level system functions not being called properly. I've opened an issue to track the status and hopefully will push an update in the next couple days. In the meantime functions such as os_GetCSC can be used for user input. Thanks for the report!
  
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