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

From: <>
Date: 2014-07-20 21:41:24
Am Sonntag, 20. Juli 2014, 21:36:22 schrieb Ullrich von Bassewitz:
> Hi!
> 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 calls
>         printf
> ->      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.

yup, its $ffd2 than does CLI somewhere... common surprise for many - and one 
of the reasons for avoiding it :)


The question of whether a computer can think is no more interesting than the 
question of whether a submarine can swim. 
<Edsgar W. Dijkstra>

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:41:46 2014

This archive was generated by hypermail 2.1.8 : 2014-07-20 21:41:48 CEST