I'm looking for a community who are experienced in
programming under/above HAL.

Specifically, I'm looking at how to program "below"
the HAL level so I can have my CPU time slice as and
when I wanted, i.e., realtime programming.

Is this the right community?

Cheers...

Jason Tai
Posted on 2002-01-14 20:07:05 by jasontai
Is this the right community?
Hey, we are right in so many ways :)

I believe what you need to do is to make a kernel mode driver, that way you will be operating at Ring 0, and will be able to call the low level API functions that the HAL does. You will not be able to just "grab" processor time; the OS shares out the processor time, if you want to grab it when you want it then you need to make your own OS.
Posted on 2002-01-15 02:21:06 by sluggy
If you would be able to grap a time slice whenever you want, we would be back in the Win3.1 days when malicious programs could lock up the system.
I don't really remember what the issue was, but I briefly read about it once. Nonetheless, our computers still lock up. Don't you guys JUST LOVE the blue screens? They make my day :grin:
Posted on 2002-01-15 15:16:08 by Hel
I haven't seen a blue screen in so many years, that I have
actually gotten some work done. (NT4 -> Win2K -> WinXP)
Posted on 2002-01-15 15:36:26 by bitRAKE
I've seen the blue... for only 2 times since i upgraded to win2k. But sadly, I get a lot of black screen of death, approximately 8x++/Mo. It happens most of the time when i do some dx8 stuff. Or if I don't login within a minute! (pretty wierd huh!).

>> I'm looking for a community who are experienced in
>> programming under/above HAL.

Actually, I haven't seen one but there are a lot of experienced coders in here that might help you a lot.

or you can try some newsgroups:
comp.os.xxxxxxxxx
comp.lang.asm.x86
alt.lang.asm

>> Is this the right community?

It can be helpful!!!!
Posted on 2002-01-15 16:26:43 by stryker
If you want exclusive CPU control, you should not be programming
for windows... but rather try out an embedded OS or whatever.
Setting your thread priority to realtime will get you close though.
If you set Realtime priority and don't behave, you'll lock the entire
system.

As for under or "just above" HAL, don't do this unless you know you
have to :). And think twice before you do it, perhaps there *are*
better solutions.

Remember, windows wasn't designed to be realtime...
Posted on 2002-01-15 17:06:14 by f0dder

If you want exclusive CPU control, you should not be programming
for windows... but rather try out an embedded OS or whatever.
Setting your thread priority to realtime will get you close though.
If you set Realtime priority and don't behave, you'll lock the entire
system.

As for under or "just above" HAL, don't do this unless you know you
have to :). And think twice before you do it, perhaps there *are*
better solutions.

Remember, windows wasn't designed to be realtime...


Happy to see that there are many knowledgeable people here!
Feels like home here, and thanks for all the advice.

Anyway, here's the long story...

There are RTOSes out there that runs under NT/2k/XP, namely
RTX from VenturCom, OnTime from Tenasys, and HyperKernel
from Nematron. They did it by "encapsulating" NT as the lowest
priority process. In fact, they are just a kernel mode driver.
However, they do license HAL, possibly modified it, to make it
work. They can work without a modified HAL.

What's the advantage of this approach? Well, you can have ALL
your other apps running under NT and only your realtime apps
running under the RTOS. You get the best of both worlds.
You even share the development platform.

Here's what I hope to do,
1. Hook/chain the timer interrupt. Done that, but NT's time
is no longer accurate despite many attempts to tweak
the interrupt frequency and the precise time to call the
original handler. I'm trying to get it to run at 100us.
2. To run a RT task, switch to own stack on next timer
interrupt.
3. To end a RT task, switch back to NT stack and iretd.

2 and 3 is still at the idea stage. If I can't get the NT timer
to run accurately, I have to abandone the whole thing.

Any comment?

Jason Tai
Posted on 2002-01-15 20:52:38 by jasontai