> O.K.  It looks like it depends at least on pthreads, curses, termios,
> and linux-specific tty devices.
> Often (as is the case with curses), linux C libraries are available
> under FreeDOS with DJGPP; they are the same libraries, just
> re-compiled (DJGPP has a fairly POSIX-compatible c-library, it is
> somewhat comparable to cygwin on Windows..
> Curses is easy, pdcurses is available for 16-bit or 32-bit DOS.  Also
> ncurses is available for DJGPP.  If you plan on implementing it with
> GEM, you would likely want to replace the parts that depend on curses
> with GEM-equivalent functions (curses does all of the
> screen-manipulation).
> If you plan on a 32-bit port (GEM has djgpp bindings IIRC), termios is
> available in the c-library to manipulate the screen and also there are
> pthreads libraries available for djgpp.  But if termios is used to
> manipulate the serial ports as well, you would need to implement a
> file-system extention (see
> http://www.delorie.com/djgpp/doc/libc/libc_321.html for a description)
> to handle serial devices as well as screen devices (and maybe also
> create your own termios interface to serial ports).  The file-system
> extention would probably suffice to access linux-specific tty devices.
> If you plan on a 16-bit port, pthreads (a multi-threading library),
> would be a challenge to implement (but likely possible), and termios
> would be possible to implement, but I don't think there exists a
> termios-compatible library for 16-bit DOS.
> termios probably wouldn't be too difficult to implement for 16-bit
> DOS.  Accesses to linux-specific tty devies would have to be replaced
> with DOS-equivalent functionality.
> 
> Overall, it's a decently-sized job.  Plus if you don't know how to
> write GEM applications, you would have to learn that as well.
> 
> ------------------------------------------------------------------------------
> Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
> powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
> easily build your RIAs with Flex Builder, the Eclipse(TM)based development
> software that enables intelligent coding and step-through debugging.
> Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
> _______________________________________________
> Freedos-user mailing list
> Freedos-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/freedos-user

Thanks for the pointers.  The 4th step is to get it working with 
ncurses and djgpp.  Where do I get the 32 bit dos compatible DJGPP
compiler from???  A gem interface is clearly a stage 2 problem.
Actually, the first thing I probably need to do is get some 
comments into the source so I can follow it easier ;-)

Step 1: Find out how code works in Linux and add comments to it.

Step 2: Reorganize code if necessary to separate out interface from 
        other parts.

Step 3: Port the makefile to freedos.

Step 4: Start porting the code.

A quick look at the makefile:

vpath %.c ../source

CFLAGS += -g -DLINUX
LDFLAGS += -lcurses -lpthread -g

drivewire: drivewire.o

clean:
        rm drivewire drivewire.o

install: drivewire
        cp drivewire ~/bin

I don't understand the vpath line as I've never 
encountered that before.  The install section will 
be replaced by something like: 
install:
        FDOS_BIN_PATH=C:\FDOS_01\BIN
        copy .\drivewire $FDOS_BIN_PATH

Though I'm open to a more robust solution.

The clean section will need to be changed to:
clean:
        del drivewire
        del drivewire.o

I would like to have gdb under freedos, is there a port of it???


------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user

Reply via email to