N
news reader
I am learning how to read/write the RS232 port of my laptop.
First step is to just test the COM addresses.. (I know it can be found
in the hardware profile)..
Dev-C++ complains access violation/segmentation fault on that line..
I have Norton AV and Seagate Personal Firewall.. Do they affect?
Quote:
#include <stdio.h>
#include <dos.h>
int main()
{
unsigned int *ptraddr; /* Pointer to location of Port Addresses
*/
unsigned int address; /* Address of Port */
int a;
ptraddr=(unsigned int *)0x00000400;
for (a = 0; a < 4; a++)
{
address = *ptraddr;
if (address == 0)
printf("No port found for COM%d \n",a+1);
else
printf("Address assigned to COM%d is %Xh\n",a+1,address);
*ptraddr++;
}
return(0);
First step is to just test the COM addresses.. (I know it can be found
in the hardware profile)..
Dev-C++ complains access violation/segmentation fault on that line..
I have Norton AV and Seagate Personal Firewall.. Do they affect?
Quote:
#include <stdio.h>
#include <dos.h>
int main()
{
unsigned int *ptraddr; /* Pointer to location of Port Addresses
*/
unsigned int address; /* Address of Port */
int a;
ptraddr=(unsigned int *)0x00000400;
for (a = 0; a < 4; a++)
{
address = *ptraddr;
if (address == 0)
printf("No port found for COM%d \n",a+1);
else
printf("Address assigned to COM%d is %Xh\n",a+1,address);
*ptraddr++;
}
return(0);