Does anyone know how to use these types of direct port access functions in Windows NT 3.51 - Windows XP (basically the whole NT lineup)? The HAL 'tricks' my program, and I was sad

. I need to use these without being an admin or accessing the System32 directory. And on top of that, it has to be free. I don't know if this is even possible, but I think I have to get my program to run in ring0 instead of the default ring3. Any help would be appreciated. The HAL also disables DEBUG.
Before you ask, I am trying to progmmatically clear the CMOS.