throwaway18's answer looks good. It links to this important point:
For Dev-C++, the functions are "_outp()" and "_inp()".
Of course, those functions will be blocked by the operating system unless you circumvent the protection by using something like AllowIO, or by using a kernel-mode port-access device driver such as PortTalk. The example at the end of porttalk.pdf looks helpful and easy, although I haven't tried it. (I wrote my own port access device driver and helper DLL.)