From: Hartmut Schirmer Newsgroups: comp.os.msdos.djgpp Subject: Re: Writing code for both DJGPP and Linux. Date: Tue, 07 Oct 1997 09:06:52 +0200 Organization: Technische Fakultaet, University of Kiel, Germany Lines: 32 Message-ID: <3439DF8C.7D6A@techfak.uni-kiel.de> References: <19971006120324 DOT 19697 DOT qmail AT hotmail DOT com> NNTP-Posting-Host: zora.techfak.uni-kiel.de Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Alex Holden wrote: > > I am just starting a project in DJGPP (A PIC17C75XX programmer), which > I want to be able to port to Linux at a later stage. It will use a > colour text interface, possibly the mouse, and will need to access the > serial port directly (to communicate with the device programmer). > The problem is that I have no experience of Linux programming > whatsoever, and so I need some advice on exactly what I should do/avoid > doing, to make the job of porting the program to Linux as painless as > possible. I particularly would like to know how you set up/access the > serial port in Linux, and whether it's possible to do direct console io > (gotoxy(), intensevideo(), that type of thing). > Does anyone know of any 'beginners guide to Linux programming' or 'DOS > programmers guide to Linux programming' type of document available > online? For text output you should get the sources of the RHIDE text based IDE for DJGPP and redesign it for your needs. Since RHIDE will work for both, DJGPP and Linux, there should be no proting problems. See http://www.tu-chemnitz.de/~rho/rhide.html for details. Isolate your serial routines in one source for for DJGPP and one for Linux. For Unix (incl. Linux) serial port programming see http://www.easysw.com/~mike/serial/ Hartmut -- Hartmut Schirmer | Phone: +49-431-77572-709 FAX:-703 Automatisierungs- & Regelungstech. | hsc AT techfak DOT uni-kiel DOT de Technische Fakult"at, | http://www.techfak.uni-kiel.de/~hsc Kaiserstr. 2, 24143 Kiel, Germany | PGP key via WWW, Key ID:6D84AEC1