Hi
I'm trying to use the outportb() function to send a signal to a RS-232 serial port. I understand that in order to use the function I need to #include <dos.h> and <conio.h>.
I am using Dev-C++ as my compiler and am having no luck when compiling the code. I am told that the function is undefined. My code is as follows (I am trying to send '2' on port '0x3FC':
#include <conio.h>
#include <dos.h>
#include <stdio.h>
int main()
{
outportb(0x3FC,2);
return 0;
}
I am very new to C++ though so may be missing something obvious. The only error message I receive is '`outportb' undeclared (first use this function)'.
Any help would be appreciated; for now I am simply trying to send the signal down the port. The device I have attached to the port is an LED which should light up when the signal is successfully sent.