delorie.com/archives/browse.cgi | search |
Date: | Fri, 14 Jan 2000 08:06:08 +0500 (MVT) |
From: | Prashant TR <prashant_tr AT yahoo DOT com> |
To: | Erik Rull <erik_rull AT bluewin DOT de> |
cc: | djgpp AT delorie DOT com |
Subject: | Re: Still problems with protected_mode_int |
In-Reply-To: | <387E00EF.58796444@bluewin.de> |
Message-ID: | <Pine.LNX.4.10.10001140757300.591-100000@yahoo.com> |
MIME-Version: | 1.0 |
Reply-To: | djgpp AT delorie DOT com |
Errors-To: | dj-admin AT delorie DOT com |
X-Mailing-List: | djgpp AT delorie DOT com |
X-Unsubscribes-To: | listserv AT delorie DOT com |
On Thu, 13 Jan 2000, Erik Rull wrote: >(interrupt handler code) Eli has told you what to do. But if you still need to use printf, try this code (untested - it may need slight modification). void timer_handler() { char str[100]; char *ptr = str; unsigned offset = 0xb8000; sprintf(str, "Tics passed: %d", ++tics); while (*ptr) { _farpokeb(_dos_ds, offset++, *ptr++); offset++; } } I'm under the impression that sprintf should work even in an interrupt handler. So, if the code still fails, it should be due to sprintf.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |