Re: [cc65] Home in CBM?

From: Marc 'BlackJack Rintsch <marc1rintsch.de>
Date: 2009-10-18 10:00:55
On Saturday 17 October 2009, Maspethrose7@aol.com wrote:
> How do I set printf() and puts() to return the  cursor to the home
> position on a Commodore computer under cc65 without  gotoxy()?  I
> could save a few bytes here and there by doing  so.

Just emit the PETSCII code.  Untested:  ``putchar(19);`` or 
``printf("%c", 19)``.  You can't embed the character code directly into 
a literal string because it gets "translated" from ASCII to PETSCII 
when you choose a Commodore target.

And remember to never mix standard C IO functions and `conio.h` 
functions!

Ciao,
	Marc 'BlackJack' Rintsch
-- 
“The best book on programming for the layman is
 »Alice in Wonderland«; but that's because it's
 the best book on anything for the layman.”
                              -- Alan J. Perlis

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Sun Oct 18 10:01:04 2009

This archive was generated by hypermail 2.1.8 : 2009-10-18 10:01:05 CEST