<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, May 30, 2014 at 3:55 PM, L. V. Lammert <span dir="ltr"><<a href="mailto:lvl@omnitec.net" target="_blank">lvl@omnitec.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Has anyone ever tried to port a straight C program to Linux? There apears<br>
to be a book in 1995, ..<br>
<br>
Main issues would be:<br>
<br>
 * UI - the old system has an ANSI graphic UI<br></blockquote><div> </div><div>There's no ANSI standard graphics library. I assume you meant a ASCII UI, but you might also mean one of the early graphics libraries provided by compilers, like the Borland Graphics Interface (graphics.h in Turbo C). If it's ASCII graphics, the ncurses library will do what you want. If it's polygon graphics, SDL will work fine (also great for handling user input).<br>
<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
 * MT - it used ctask for multi-tasking<br></blockquote><div><br>You'd probably have to ditch that and use something more modern like pthreads (All hail RMS, deliverer of POSIX).<br> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

 * SER - it used two or three serial ports<br>
</blockquote><div><br></div><div>Again, POSIX saves the day. Opening a serial port using C on a GNU/Linux environment is criminally simple. We're talking `int fd = open("/dev/ttyS0", O_RDWR | O_NOCTTY | O_NDELAY);` simple.<br>
</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
The main reason is that it is almost possible to create a MSC-6<br>
environment to compile now, and I just realized that my machine from 20<br>
years ago I have been keeping on the shelf for this eventuality is dead. <br></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
        TIA!<br>
<br>
        Lee<br>
_______________________________________________<br>
grlug mailing list<br>
<a href="mailto:grlug@grlug.org">grlug@grlug.org</a><br>
<a href="http://shinobu.grlug.org/cgi-bin/mailman/listinfo/grlug" target="_blank">http://shinobu.grlug.org/cgi-bin/mailman/listinfo/grlug</a><br>
</blockquote></div><br></div></div>