Board index » delphi » Migrate dos turbo 7.0 programs to win9x

Migrate dos turbo 7.0 programs to win9x

I have some programs written in turbo pascal 7.0 for dos.  I need to
run them on a machine running windows 9x.  What is the best way to
migrate the programs ?

Sent via Deja.com http://www.deja.com/
Before you buy.

 

Re:Migrate dos turbo 7.0 programs to win9x


Quote
In article <8sq4jf$k2...@nnrp1.deja.com>, Eric Headley wrote:
>I have some programs written in turbo pascal 7.0 for dos.  I need to
>run them on a machine running windows 9x.  What is the best way to
>migrate the programs ?

That depends on how you want to migrate them. Do you want to make a win32
console mode program(to get LFN and more mem and access to win23 api),
or wanna go for the GUI approach?

In the first case, recompiling with Delphi or FreePascal
(www.freepascal.org) is an option, depending on the use of lowlevel
functionality in your program.

Do you want GUI, than it probably will be near a complete rewrite in Delphi
(or FreePascal, but for now I would suggest Delphi for speed reasons)

Re:Migrate dos turbo 7.0 programs to win9x


Marco van de Voort wrote:

Quote
> That depends on how you want to migrate them. Do you want to make a win32
> console mode program(to get LFN and more mem and access to win23 api),
> or wanna go for the GUI approach?

I meant win32 of course

Quote
> In the first case, recompiling with Delphi or FreePascal
> (www.freepascal.org) is an option, depending on the use of lowlevel
> functionality in your program.

> Do you want GUI, than it probably will be near a complete rewrite in Delphi
> (or FreePascal, but for now I would suggest Delphi for speed reasons)

And here I meant development speed of developping GUI programs, not the
speed of generated programs/compiler

It is atm possible in FPC to code using win32 api, but a RAD like Delphi
will speed up the process (but cost $$$)

--

Marco van de Voort (Mar...@stack.nl or ma...@freepascal.org)

Re:Migrate dos turbo 7.0 programs to win9x


JRS:  In article <8sq4jf$k2...@nnrp1.deja.com> of Fri, 20 Oct 2000
18:57:56 seen in news:comp.lang.pascal.borland, Eric Headley

Quote
<erichead...@my-deja.com> wrote:
>I have some programs written in turbo pascal 7.0 for dos.  I need to
>run them on a machine running windows 9x.  What is the best way to
>migrate the programs ?

If the programs are satisfactory as they are, and the problem is just
that they need to run on a new PC, then no recoding should be necessary
(not sure about graphics modes).

You could boot the new machine into DOS, but as you say "running" that
may be unacceptable; so just run the programs in a Win9x DOS window -
there should be a "MS-DOS Prompt" icon.

I normally keep two such windows permanently open.

You can then improve speed by compiling in Delphi for console mode; this
will probably require some code changes (conditional directives help).

If you want them to look newer, you could seek TP for Windows; if you
want them to look modern, you could use Delphi GUI mode.  This will
require significant work.  The human interface, if any, will need re-
doing; the calculating parts will hardly change; file I/O may benefit
from work

--
? John Stockton, Surrey, UK.  j...@merlyn.demon.co.uk   Turnpike v4.00   MIME ?
 Web <URL:http://www.uwasa.fi/~ts/http/tsfaq.html> -> Timo Salmi: Usenet Q&A.
 Web <URL:http://www.merlyn.demon.co.uk/news-use.htm> :  about usage of News.
No Encoding. Quotes before replies. Snip well. Write clearly. Don't Mail News.

Re:Migrate dos turbo 7.0 programs to win9x


Dr John Stockton <s...@merlyn.demon.co.uk> wrote:

Quote
> JRS:  In article <8sq4jf$k2...@nnrp1.deja.com> of Fri, 20 Oct 2000
> 18:57:56 seen in news:comp.lang.pascal.borland, Eric Headley
> <erichead...@my-deja.com> wrote:
>>I have some programs written in turbo pascal 7.0 for dos.  I need to
>>run them on a machine running windows 9x.  What is the best way to
>>migrate the programs ?

> If the programs are satisfactory as they are, and the problem is just
> that they need to run on a new PC, then no recoding should be necessary
> (not sure about graphics modes).

My programs using the standard VGA 640x480x16 mode work fine on 9x and NT4.

However it's likely that the poster will also need to apply a CRT pach to
avoid RTE200, if this hasn't been done on the older machines.

--
______________________________________________________________________
     The Scarlet Manuka,      |        Nitpickers' Party motto:
  Pratchett Quoter At Large,  |  "He who guards his lips guards his
 First Prophet of Bonni, is:  |  soul, but he who speaks rashly will
   sa...@maths.uwa.edu.au     |    come to ruin." -- Proverbs 13:3
______________________________|_______________________________________

Re:Migrate dos turbo 7.0 programs to win9x


If DOS programs need to access any files, they can run into trouble with Win98
as the current path will not be available to the program the way it was under
Win3.x.

For opening files, create a Path variable in your program and read Paramstr(0)
to find the current Path of the program when it starts. Pass this info to any
routine that must open a file in the current directory, or modify as needed to
access sub-directories. If other directories must be accessed that info can be
passed to the program through a .PIF. (This includes directories on other
networked PC's.) You would then read Paramstr(1), ...(2), etc. to pass that
info.

Quote
The Scarlet Manuka wrote:
> Dr John Stockton <s...@merlyn.demon.co.uk> wrote:
> > JRS:  In article <8sq4jf$k2...@nnrp1.deja.com> of Fri, 20 Oct 2000
> > 18:57:56 seen in news:comp.lang.pascal.borland, Eric Headley
> > <erichead...@my-deja.com> wrote:
> >>I have some programs written in turbo pascal 7.0 for dos.  I need to
> >>run them on a machine running windows 9x.  What is the best way to
> >>migrate the programs ?

> > If the programs are satisfactory as they are, and the problem is just
> > that they need to run on a new PC, then no recoding should be necessary
> > (not sure about graphics modes).

> My programs using the standard VGA 640x480x16 mode work fine on 9x and NT4.

> However it's likely that the poster will also need to apply a CRT pach to
> avoid RTE200, if this hasn't been done on the older machines.

> --
> ______________________________________________________________________
>      The Scarlet Manuka,      |        Nitpickers' Party motto:
>   Pratchett Quoter At Large,  |  "He who guards his lips guards his
>  First Prophet of Bonni, is:  |  soul, but he who speaks rashly will
>    sa...@maths.uwa.edu.au     |    come to ruin." -- Proverbs 13:3
> ______________________________|_______________________________________

--
Val Mehling - anti-spam in effect.
For e-mail reply to: va...@earthlink.net

http://home.earthlink.net/~valjm/
Libertarian for Bush * Cheney

Other Threads