Re: [cc65] Bug with cputc('\n"); or my dumbness ;) [scanned]

From: Groepaz <groepaz1gmx.net>
Date: 2006-04-06 00:43:59
On Wednesday 05 April 2006 23:04, Markus Stehr wrote:
> Hi!
>
> Either i discovered a bug or i am just stupid.
>
> Code:
>   for(y=0;y<MAPMAX_Y+1;y++)
>     {
>     for(x=0;x<MAPMAX_X+1;x++)
>       cputc(x+0x30);
>     cputc('\n');
>     }
>
> This 'should' output a nice 20x20 cube with some stuff, but "\n" in
> cputc doesnt seem to reset the collumn.
> So he happily prints in the next line but still on the same x-position.
>
> Any ideas?

with the conio lib you need to send both '\n' and '\r' to go the beginning of 
the next line.

-- 

http://www.hitmen-console.org
http://www.gc-linux.org/docs/yagcd.html
http://www.pokefinder.org
http://ftp.pokefinder.org

No one can earn a million dollars honestly. 
<William Jennings Bryan>

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Thu Apr 6 00:44:23 2006

This archive was generated by hypermail 2.1.8 : 2006-04-06 00:44:27 CEST