Mail Archives: djgpp/2001/03/31/04:44:34
> From: Eduardo TUDA Lorenzetti Pellini <dochell AT MailAndNews DOT com>
> 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.
- Raw text -