From: "Thomas Harte" Newsgroups: comp.os.msdos.djgpp Subject: Re: Logging data from an interrupt to a file Date: Thu, 18 Jul 2002 11:30:33 +0000 (UTC) Organization: BT Openworld Lines: 46 Message-ID: References: NNTP-Posting-Host: host213-123-45-32.in-addr.btopenworld.com X-Trace: knossos.btinternet.com 1026991833 4461 213.123.45.32 (18 Jul 2002 11:30:33 GMT) X-Complaints-To: news-complaints AT lists DOT btinternet DOT com NNTP-Posting-Date: Thu, 18 Jul 2002 11:30:33 +0000 (UTC) X-Newsreader: Microsoft Outlook Express 4.72.3155.0 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3155.0 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Eli Zaretskii : >Make the interrupt handler set a flag when the memory buffer is almost >full, and make the main foreground function of your logger look at the Pedro Izecksohn : > Why don't you create a new file every 5 minutes, (and >save and close the old one), with a little modified >filename? The problem is that I have no main foreground function (and of course cannot call libc functions from an interrupt context) - as I said, a second program is spawn'd, but as I didn't make clear, the second program is a legacy piece of real mode DOS software for which I have no source. Hans-Bernhard Broeker : >Why not? Let's see: how fast can even a *very* fast human type? Ten >keys per second, or let's say a hundred (even the typematic isn't that >fast)? If you let that person hack away freely for as long as (s)he >can stay awake, that'll be on the order of one hundred thousand >seconds times 100 keys per seconds, for a total of 10 Megabytes. If >that person is *extremely* fast and can keep up that pace for 30 hours >on end, that is. And you say you don't have memory for that? In a >DJGPP application? The consideration is that the memory must be locked, and that the application I am catching keys from is at least 10 years old, and therefore has a number of users under every DOS related operating system from that period from actual DOS up to Windows ME. I assume that if I lock 10mb under, say, Windows 95, in a machine with just 16mb RAM, things are going to go very quickly wrong when the operating system finds it cannot page almost anything to disc above and beyond its own footprint. Although I may be wrong. However, on the plus side I am only actually catching the states of seven or eight keys, and the application is a particular game - massively reducing how much needs to be stored compared to, say, a word processor or a shell of some sort. I expect you are right though, keeping stuff in memory is probably the only answer, so why quibble? Thanks! -Thomas