Porting a DOS app

This may sound like a bizarre subject, but I’m faced with “porting” a fairly
complex DOS application to QNX. Eventually it will have to be extensively
rewritten to take full advantage of the realtime O/S, but I’m wondering how
much luck I would have trying to get it running under QNX without changing
its current structure too much (just making the 16-to-32-bit transition will
be interesting). As a single DOS task, it makes almost no “operating system”
type calls – it mainly uses portable calls such as “fopen”, etc. It does
interact with h/w at the port level, but that should also continue to work.

The main issue that I see is with the display support. It uses the display
in simple 80x25 character mode, using DOS calls such as “_settextwindow”,
“_outtext” etc. to write to the screen. There is no user input at all
(keyboardless).

Has anyone ever done anything like this, or heard of any compatibility
libraries that might be useful for the job?

Doug Gordon

“Doug Gordon” <gordonwd@nospamfrc.com> wrote in message
news:ahs17h$n5c$1@inn.qnx.com

The main issue that I see is with the display support. It uses the display
in simple 80x25 character mode, using DOS calls such as “_settextwindow”,
“_outtext” etc. to write to the screen. There is no user input at all
(keyboardless).

This doesn’t sound like a fun job to me. For text output, possibly the
easiest thing to do would be to use curses/ncurses. GNU ncurses is
available for QNX 6.x (and possibly 4.2x, I’m not sure). It is very simple,
and if you only have a few commands it shouldn’t be difficult to replace
them. O’Reily sells a book called “Programming with curses”, and of course
there’s lots of documentation online.

Good luck; you’re gonna need it.

-James Ingraham

One thing to watch out for is loops. A DOS program assumes it can run
forever. In QNX it needs to give up the CPU every now and then. Or I guess
you could just run it at a low priority.

“James Ingraham” <jamesi@sagerobot.com> wrote in message
news:ahs3si$m4g$1@nntp.qnx.com

“Doug Gordon” <> gordonwd@nospamfrc.com> > wrote in message
news:ahs17h$n5c$> 1@inn.qnx.com> …
The main issue that I see is with the display support. It uses the
display
in simple 80x25 character mode, using DOS calls such as
“_settextwindow”,
“_outtext” etc. to write to the screen. There is no user input at all
(keyboardless).

This doesn’t sound like a fun job to me. For text output, possibly the
easiest thing to do would be to use curses/ncurses. GNU ncurses is
available for QNX 6.x (and possibly 4.2x, I’m not sure). It is very
simple,
and if you only have a few commands it shouldn’t be difficult to replace
them. O’Reily sells a book called “Programming with curses”, and of
course
there’s lots of documentation online.

Good luck; you’re gonna need it.

-James Ingraham