Re: [cc65] printf (C64 library) enables interrupts

From: Ullrich von Bassewitz <>
Date: 2014-07-20 21:36:22

On Sun, Jul 20, 2014 at 09:21:55PM +0200, Frank Buss wrote:
> I don't know if this is a bug and already fixed in later version, or if
> there is a reason why printf needs interrupts, but it was surprising for me.

It's probably the kernal, which enables interrupts. This is the rough order of

->      vfprintf
->      _printf
->      _write
->      CKOUT, BSOUT, READST    (kernal routines)

I don't really know if I would call that a bug. As soon as the ROM is called,
the library has no control over the I flag. Even if it will restore the old I
flag after calling the kernal, it would still be enabled for some time.



Ullrich von Bassewitz                        
Encrypted email preferred                          PGP Key-Id: 29D93B10
To unsubscribe from the list send mail to with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Sun Jul 20 21:36:37 2014

This archive was generated by hypermail 2.1.8 : 2014-07-20 21:36:39 CEST