Re: [cc65] Input string routine for a line of data?

From: <>
Date: 2011-06-06 11:13:42
On 2011-06-05, at 20:59, Joseph Rose wrote:

> Under cc65, what is the fastest way

Fastest in what terms? Fastest input? Even on 8bit machines it is usually limited only by user's speed of typing. Fastest development? Google for "string input in c", etc..

> to get a string of input from the user?

Might it be the same as under any standard C implementation...

>  I just need a quick-and-dirty approach for experimentation.  I am working mainly for the C64 but may work fopr other targets as well.

... especially if you want it to work with different targets?

An example to save you googling effort...

#include <stdio.h>
int main()
   char text[20];
   fputs("enter some text: ", stdout);
   fflush(stdout); /* */
   fgets(text, sizeof text, stdin);
   printf("text = \"%s\"\n", text);
   return 0;


To unsubscribe from the list send mail to with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Mon Jun 6 11:13:57 2011

This archive was generated by hypermail 2.1.8 : 2011-06-06 11:14:00 CEST