Re: [cc65] A bug? (was: Questions for CBM guys)

From: Greg King <>
Date: 2008-03-05 13:39:52
From: silverdr on Wednesday, March 05, 2008; at 04:00 AM -0500
> > Now -- having said that -- I got interested, and shall have to check
> > how cc65's runtime lib. achieves "\r" on the CBM.  I don't remember a
> > simple "one shot" way of doing it on a C64.
> So, I checked -- seems that it actually _doesn't_ achieve "\r" properly!
> I wrote a simple:
> printf("abcd\n");
> printf("efgh\r");
> printf("ijkl\n");
> and I got:
> abcd
> efghijkl
> instead of:
> abcd
> ijkl
> Is this a bug or a feature?  I know it is not very straightforward; but
> AFAIR, it still can be achieved with a combination of SCREEN and PLOT
> calls without too much hassle, can't it?

It is a feature.  When cc65 and ca65 translate ASCII into PETSCII, they swap
the values of '\r' and '\n'.

The CONIO functions do obey both '\r' and '\n' -- in the MS-DOS way.  And, I
think that we can mix CONIO and STDIO functions on the CBM platforms.  We
can use the positioning functions, such as gotoxy().

To unsubscribe from the list send mail to with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Wed Mar 5 13:41:14 2008

This archive was generated by hypermail 2.1.8 : 2008-03-05 13:41:17 CET