I’m trying to understand how certain functions from intrin.h work in user mode, as I initially thought they were limited to kernel mode. Specifically, I’ve used the following functions, and they seem to work normally in my user-mode application:
__outbyte(x, y)
__outword(x, y)
__inbyte(x)
__inword(x)
My understanding was that these functions, which perform direct I/O port access, should only be available in kernel mode due to their potential to access hardware directly and potentially disrupt system stability. However, they appear to execute without issues in my user-mode code.
Can someone explain how these functions are operating correctly in user mode? Are there any underlying mechanisms or specific conditions that allow this behavior?