This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's
z80 & ez80 Assembly subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.
Z80 & 68k Assembly =>
z80 & ez80 Assembly
Author |
Message |
|
Newbie
Bandwidth Hog
Joined: 23 Jan 2004 Posts: 2247
|
Posted: 01 Mar 2010 03:28:02 pm Post subject: |
|
|
Does anyone know of any good tutorials for programming with C on the TI-89 that is very comprehensive? Not so much for the C syntax but more for the assembly references to do things like clear the screen, etc.
Last edited by Guest on 01 Mar 2010 04:37:18 pm; edited 1 time in total |
|
Back to top |
|
|
wesley
Newbie
Joined: 05 May 2009 Posts: 45
|
Posted: 01 Mar 2010 07:14:54 pm Post subject: |
|
|
Techno Plaza has a pretty good one I'm zooming through right now (at least when I have the time). If you've done any programming, it should be pretty simple to understand. |
|
Back to top |
|
|
Newbie
Bandwidth Hog
Joined: 23 Jan 2004 Posts: 2247
|
Posted: 02 Mar 2010 02:03:34 pm Post subject: |
|
|
Thanks for the link.
Trying this code for a first sample but it will not compile with TIGCC because of the stdout and the stdin:
Code: #include <tigcclib.h>
#include <stdio.h>
#include <string.h>
int main()
{
clrscr ();
char text[20];
fputs("enter some text: ", stdout);
fflush(stdout);
if ( fgets(text, sizeof text, stdin) != NULL )
{
char *newline = strchr(text, '\n'); /* search for newline character */
if ( newline != NULL )
{
*newline = '\0'; /* overwrite trailing newline */
}
printf("text = \"%s\"\n", text);
}
return 0;
ngetchx();
}
Is the 89 limited to what it can do with C? Or why can it not use all it's features? Or am I missing something? |
|
Back to top |
|
|
wesley
Newbie
Joined: 05 May 2009 Posts: 45
|
Posted: 02 Mar 2010 08:57:30 pm Post subject: |
|
|
Newbie wrote: Is the 89 limited to what it can do with C? Or why can it not use all it's features? Or am I missing something?
Okay, remember that this calculator doesn't have a command line, so [font="Courier New"]stdin and [font="Courier New"]stdout aren't going to work.
Where are you trying to put or draw the text?
I'm sorry I don't have an alternative solution, I'm just starting out learning C.
EDIT: Oh, and I would recommend using the newer version of TIGCC: GCC4TI.
Last edited by Guest on 02 Mar 2010 09:00:34 pm; edited 1 time in total |
|
Back to top |
|
|
Newbie
Bandwidth Hog
Joined: 23 Jan 2004 Posts: 2247
|
Posted: 02 Mar 2010 09:40:30 pm Post subject: |
|
|
Thanks for the newer version. I'll check that out. After further reading after my post I found out that it was for the command line and why it wouldn't work. The text with printf() will put text on the home screen I believe and DrawStr is for the graph screen. I need to read up on the TI-89 specific functions for programming with C. |
|
Back to top |
|
|
|
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