[cc65] C64: CKOUT followed by printf

From: Agent Friday <64subnet1gmail.com>
Date: 2010-12-03 04:05:32
Can someone confirm that printf (on C64) selects the screen for
output (as in, cbm_k_ckout(STDOUT) or similar) before outputting the
text?  I inserted some debug messages without considering this...

I placed a (printf) debug message directly following a call to
cbm_k_ckout(lfn_serial). What seemed to happen was the debug message
went to the screen, and so did the character I sent after that using
BSOUT, that was intended to go to the lfn_serial device.

Obviously what I did was in error, but the behavior seems to imply that
printf always writes to the screen, and cannot not be used to send output
to a logical file.  This would be a bit unfortunate, but I imagine sprintf()
could be used as a workaround... ?

Thanks,

// Agent Friday
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Fri Dec 3 04:05:36 2010

This archive was generated by hypermail 2.1.8 : 2010-12-03 04:05:39 CET