Hello I am begginer in assembly, I program in C++ and VFP6.0. I want to know how do I to switch in kernel mode (ring0) in W2k. Because I need write to the parallel port without develop a device driver. Thank You
Posted on 2001-11-04 20:53:20 by ax23
This is off the top of my head, but should be fairly accurate:

you could write a service, but this runs at ring 3, unless you make a call to one of the many system-functions in the kernel, in which case you will be running at ring 0 while in that function, then you will swap back to ring 3 when you get control back.

you could write a kernel-mode driver (which is different to a hardware driver), these run always at ring 0.

AFAIK, the only real difference between a service and a kernel-mode driver is a couple of registry entries, internally they are just the same. The registry entries just control how the prog is handled by windows at startup, and how it is handled by the SCM.

Posted on 2001-11-05 15:49:12 by sluggy

you could write a kernel-mode driver (which is different to a hardware driver), these run always at ring 0.

They aren't different, really. A hardware driver is just a subset of kernel-mode drivers.

A KMD is just a regular PE file, which does imports from "specific
DLLs", and are loaded "in a special way". You're limited to "a few"
DLLs (the ones with .sys extension :P), and ntoskrnl.exe is probably
the one you'll see most.

As for going ring0 in any other way... forget it. Ring0 access is considered
a security hole (with good reason), and will probably be patched
my m$ as soon as they find it.

As for port access... I dunno if it's possible without vxd/kmd. This
shouldn't be too much of a problem though. If you don't want to
write one yourself, search the net. I've come across at least a few
port-access libraries. Even ones that are both 9x and nt/2k compatible.
Posted on 2001-11-07 04:10:22 by f0dder
AsmIO at my site gives you port access in both win9x and NT/2k.

Posted on 2001-11-07 05:32:01 by Thomas
Thank you

I have bringed(?) the libraries.


** Don't sit down to look it that you have maked, you follow working for that which you don't make **:)
Posted on 2001-11-07 18:53:47 by ax23