[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] Printing text from exception handler



I wonder if printf in mintlib allocates memory? I had similar issues on other platforms.

 

From: mint-bounce@lists.fishpool.fi [mailto:mint-bounce@lists.fishpool.fi] On Behalf Of Miro Kropácek
Sent: 12 November 2013 04:52
To: MiNT Mailing List
Subject: Re: [MiNT] Printing text from exception handler

 

Hmm, I've traced it down to Fwrite(stdout, count, buff) in console.c and guess what, Fwrite(stdout) works correctly under TOS in the exception handler as well. I've been considering lack of (Supervisor) stack space but how come sprintf() works all right but if I try to print the buffer with puts() *then* it crashes? Really strange, it must have something to do with printing on screen.

 

On Tue, Nov 12, 2013 at 2:40 PM, Miro Kropáček <miro.kropacek@gmail.com> wrote:

Hi,

 

I've learnt an interesting thing today -- you can't use mintlib's (s)printf() and puts() in TOS for printing text while being in a GEMDOS function handler. FreeMiNT works all right, just TOS can't handle it (two bombs).

 

First I thought it's because the functions lead to Cconws() and this is not reentrant but as it turns out, Cconws() works just fine. So I'm wondering what the mintlib functions do that it leads to the bus error?

 

--
MiKRO / Mystic Bytes
http://mikro.atari.org



 

--
MiKRO / Mystic Bytes
http://mikro.atari.org