Date: Sun, 26 May 1996 09:36:38 +0200 (IST) From: Eli Zaretskii To: Jamul Cc: djgpp AT delorie DOT com, Samuel Vincent Subject: Re: COM port access In-Reply-To: Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Sat, 25 May 1996, Jamul wrote: > init_rs232(); (this is done with inline asm, using the "int" instruction > - is that bad?) No, except that I'd suggest to first write it without inline assembly. The inline assembly facilities of Gcc are very powerful, but dangerous if misused and use conventions that are quite different from what you see in other DOS compilers. Initialization is only done once, so why do it in assembly? > while(1) { > if(status port says data_ready) > data=inportb(buffer port); > (when it comes time to send something) { > if(status port says xmission buffer clear) > outportb(buffer port, data to send); > } > } > This seems OK, but the bugs can be in the details.