Re: [cc65] CBM gets() echoing

From: Mark J. Reed <>
Date: 2010-02-11 23:33:46
On Thu, Feb 11, 2010 at 1:50 PM, Ullrich von Bassewitz <> wrote:
> It seems to be the way how the CBMs handle CR on stdin, if stdin is the
> console.

Yes.  Familiar to many BASIC programmers who used INPUT# instead of
INPUT to avoid the question mark prompt.  For instance:

10 OPEN 1,0: PRINT "> ";:INPUT#1,X$: PRINT "HELLO!"

Not only will the entered carriage return not be echoed, but the first
character output afterward (the "H" in this case) will overwrite the
last character in the entered text, e.g. after typing "BOO" and
pressing RETURN:


If you use the normal basic INPUT statement, the BASIC runtime handles
echoing the carriage return for you.  But then you get that darn
question mark.

Is it worth having #ifdef'ed code to handle the CBM case separately?

Mark J. Reed <>
To unsubscribe from the list send mail to with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Thu Feb 11 23:33:51 2010

This archive was generated by hypermail 2.1.8 : 2010-02-11 23:33:54 CET