Date: Mon, 6 Oct 1997 18:51:27 -0700 (PDT) Message-Id: <199710070151.SAA24347@adit.ap.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" To: "Alex Holden" , djgpp AT delorie DOT com From: Nate Eldredge Subject: Re: Writing code for both DJGPP and Linux. Precedence: bulk At 05:03 10/6/1997 PDT, 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. If you just want to do vanilla serial port access, you can read and write the appropriate /dev/ttySx device. There are ioctl() calls to change the baud rate and stuff; see the man pages. If you need to poke the port directly, see the "Linux I/O port programming mini-HOWTO". > 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). I don't think you can, but I could be wrong. If it doesn't *have* to be interactive, you could go with the usual Unix tradition of command-line invocation with hairy options. >Does anyone know of any 'beginners guide to Linux programming' or 'DOS >programmers guide to Linux programming' type of document available >online? Sorry, no. Nate Eldredge eldredge AT ap DOT net