Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

Using Multiple CPU Cores in DOS? (Miscellaneous)

posted by RayeR Homepage, CZ, 13.09.2011, 19:32

> Let's do a quick calculation, using my Sony Laptop as an example. We'll
> assume it's running in RM (without an EMM), so it will take around 15 ms to
> do a pair of mode switches. Let's say you reprogram the timer interrupt to
> occur 100 times a second instead of the normal 18.2. Because your program
> is running in PM but your handler is running in RM, there must be a pair of
> mode switches, which take 15 ms, and they must occur once every 10 ms.
> Guess what? The system will crash since this is impossible. Your computer
> is fast enough to work, but not all computers will be.

Yes I understand that higher irq rate that it can switch will cause failure.
from this description of _go32_dpmi_chain_protected_mode_interrupt_vector
it seems it install my ISR as PM ISR and then chaining to next ISR but it's not clear if next PM ISR or next RM ISR. If it would chain RM ISR and it would be slow as you say then it couldn't work. I tested it on P166 and it run at 22kHz. I don't remember if it started from VM or RM.

> You need to call the original RM handler at the same rate it was called
> before you messed with it (approximately 18.2 times a second). If you
> don't, at a minimum the system clock will be incorrect, but you will
> probably also screw up some TSR's or Device Drivers that depend on the
> interrupt for timing (which could crash the system).

Yes I think it would be right way but I cannot achieve this with _go32_dpmi_chain_protected_mode_interrupt_vector if it calls RM handler automatically. I need to use _go32_dpmi_set_protected_mode_interrupt_vector which doesn't call anything else and call RM handler manually.

There's also a note:
The DPMI spec says that 3 software interrupts are special, in that they also get reflected to a protected-mode handler. These interrupts are: 1Ch (the timer tick interrupt), 23h (Keyboard Break interrupt), and 24h (Critical Error interrupt). This means that, to catch these interrupts, you need to install a protected-mode handler only.

but what this reflection exactly mean and what is the order of calling ISRs in this case...

---
DOS gives me freedom to unlimited HW access.

 

Complete thread:

Back to the forum
Board view  Mix view
22049 Postings in 2034 Threads, 396 registered users, 271 users online (0 registered, 271 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum