delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/11/09/09:51:52

Date: Sun, 9 Nov 1997 16:50:08 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Cheng-Chang Wu <C DOT Wu AT ping DOT de>
cc: djgpp AT delorie DOT com
Subject: Re: Can I do printf in callback handler (interrupt handler)?
In-Reply-To: <3465C25A.7C1CBABF@ping.de>
Message-ID: <Pine.SUN.3.91.971109164840.12063A@is>
MIME-Version: 1.0

On Sun, 9 Nov 1997, Cheng-Chang Wu wrote:

> But it causes Page fault
> when it executes printf(). Why is printf() so special?

Because `printf' calls DOS.  You cannot call DOS functions from an RMCB 
because it is VERY dangerous.

> How can I get around the problem?

Call `cprintf' instead.  In general, don't call anything that might call 
DOS.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019