Date: Sat, 31 Mar 2001 11:40:28 +0200 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: Eduardo TUDA Lorenzetti Pellini Message-Id: <7458-Sat31Mar2001114027+0200-eliz@is.elta.co.il> X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.6 CC: djgpp AT delorie DOT com In-reply-to: <3AD28D44@MailAndNews.com> (message from Eduardo TUDA Lorenzetti Pellini on Fri, 30 Mar 2001 17:34:13 -0500) Subject: Re: Real time commitment and IRQ 0 References: <3AD28D44 AT MailAndNews DOT com> Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > From: Eduardo TUDA Lorenzetti Pellini > Newsgroups: comp.os.msdos.djgpp > Date: Fri, 30 Mar 2001 17:34:13 -0500 > > Actualy i'm deactivating IRQ 0 for more than an hour. The only problem i see > is that the system timer is frozen during this time. As i don't have any > device driver loaded (m$-win98 safe MS-DOS prompt) are there any other > problems to the system ? Does MS-DOS hook INT 8 or INT 1C for any reason ? I suspect that Int 8 is hooked by DOS and perhaps by some other resident software (depending on your CONFIG.SYS and AUTOEXEC.BAT). However, if you run the system with IRQ 0 disabled and you don't see any adverse effects, you probably shouldn't worry too much. > After enabling back IRQ0, is there any method to copy back the RTC > (real time clock) day/time to refresh the system timer ? You can read the time from the CMOS clock (which uses an independent timer chip), and then set the system clock with a call to the library function settimeofday. > Anyone can post me some example using DJGPP ? Function 2 of Int 1Ah returns the time of the CMOS clock; look up the details in Ralf Brown's Interrupt List. > PS: This real time application is giving me so much headache that > I'm planing not to use MS-DOS anymore. I started to think about > using Real Time Linux, QNX and some stuff like that, just to get rid > of the problems with the code timming and CPU dedication. DOS is indeed not an ideal RTOS, but please note that 50-usec timing is something you will most probably have problem with on any OS, including QNX and RTLinux.