From: "Richard Ellingworth" Newsgroups: comp.os.msdos.djgpp Subject: Serial communications Date: Fri, 15 Oct 1999 21:23:55 +0100 Organization: GXSN Lines: 22 Message-ID: <7u82r6$pf$1@gxsn.com> NNTP-Posting-Host: 195.147.234.194 X-Trace: 940019366 1NNUCNF1GEAC2C393C gxsn.com X-Complaints-To: abuse AT gxsn DOT com X-Newsreader: Microsoft Outlook Express 4.71.1712.3 X-MimeOLE: Produced By Microsoft MimeOLE V4.71.1712.3 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Hello there. I recently started messing about with DJGPP and Allegro and I am attempting to use the serial port. I have played around with Bill Currie's communications library and also with the DZComm library, but I have come up against the same problem in both. Although the terminal programs supplied with the libraries both work, after I have modified them slightly the program crashes with a SIGSEGV error (segmentation violation). In the case of DZComm, the program transmits on the serial port quite happily but as soon as a character is received the program falls over. If you comment out the line that reads from the serial port then the crash goes away. Why is this? Am I missing something fairly fundamental? I have never used a DPMI server before, and frankly don't fully understand what I have to do in my code. Do I have to lock some of my code and data in place to stop it being paged around and causing the RX interrupt to fail? Is there somewhere that explains exactly how to use the functions specified in the DPMI.H header in words of one syllable? Any help would be greatly appreciated. Richard Ellingworth