Folks,
Enclosed is a sample program for setting the DTR of serial port one. I
compiled it without errors with "gcc file.c -O2 -m386 -Wall"; however, it
causes "Segmentation fault" when run. It seems that the problem is at the
OUT operation, as it runs without producing "Segmentation fault" when OUT
is taken out.
Your help would be greatly appreciated.
Shiuh
void main()
{
__asm__ __volatile__ ("mov $0x3F8, %ax
push %ax
push $1
push %ax
call ioperm
add $0xC, %sp
mov $0x3F8, %dx
mov $1, %al
out %al,%dx");
Quote:}