Mail Archives: djgpp/2000/04/20/18:10:26
First of all, Windows design is not a very good thing. At least what is related
to serial I/O from a DOS-box program.
2nd, BIOS is not suitable for that as well.
3rd, in order to have a stable data transferr, you should implement some kind of
software packet protocol with ACK/NAK stuff (and probably with CRC for each
packet). This solves all the problems with data loss (Windows provides a nice
feature - it loose some characters ;).
4th, interrupt driven serial I/O is not good also. I have no luck with it. It
really works, but again characters are lost... You can't rely on it too.
I have a very simple chat program that works via COM port. It doesn't have any
protocols, just sends some characters and recieves. Program compiles under
orland/Turbo C and DJGPP. If you're interested, let me know.
bye.
Alexei A. Frounze
-----------------------------------------
Homepage: http://alexfru.chat.ru
Mirror: http://members.xoom.com/alexfru
Tasos Drosopoulos wrote:
>
> Hi
>
> I'm trying to interface with a hardware device though a serial port and get
> something faster than win98 can offer. Looking over available sources/info it
> seems that direct, interrupt based code can do the job. I already have
> tried a windows api based library code (slow) and wrote a polling based
> version with djgpp (still too slow). The async library mentioned in the faq
> seems to compile fine but generates a locking memory error when I try it out
> booting into DOS mode from the windows shut down menu. I'm checking out
> now some old 16-bit code and wondering if I should go that way or persist
> with djgpp. What are people's experience? Are there any more info/examples
> besides the User's Guide on hardware interrupts? (Does anyone have that doc by
> Alaric "dark art of writing djgpp hardware interrupts" somewhere? It is no
> longer available at the site mentioned in the UG).
>
> Any suggestions/recommendations welcome.
>
> TIA
- Raw text -