Delphi/Pacal DOS program in Windows 2000 - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Delphi/Pacal DOS program in Windows 2000

tcoopertcooper Posts: 3Member
I have been given the task of figuring out how to get a DOS based program compiled in either Delphi or Borland/Turbo Pascal (no source available) to run in Windows 2000.

It is supposed to run in Windows 9x/98's "DOS Mode" using the following instructions...

-------------------------------------------------

The Windows 95/98 must be completely shut down before running the S/W. Choose one of the selections below:

- Press [b]START[/b]
- Press [b]Shut Down...[/b]
- Press [b]Restart in MS-DOS mode[/b]

Press F8 during the boot-up and choose command prompt only (which is similar to DOS)

Change the line in MSDOS.SYS containing BootGUI=1 to BootGUI=0
This will result in the computer automatically starting in DOS. Use WIN to start Windows 95/98. (Use the ATTRIB -h -s -r MSDOS.SYS to change MSDOS.SYS from a hidden and read-only file to a file that you can edit. Use ATTRIB +h +r +s MSDOS.SYS to change it back to a hidden and read-only file.)

Example of AUTOEXEC.BAT and CONFIG.SYS under Windows 95/98:

[b]AUTOEXEC.BAT[/b]
[code]C:WINDOWSCpqSntsr.com
@ECHO OFF
set path=C:;C:WINDOWS;C:NQ
mode con codepage prepare=[(850) c:windowsCOMMANDega.cpi]
mode con codepage select=850
keyb dk,,c:windowsCOMMANDkeyboard.sys
cls[/code]

[b]CONFIG.SYS[/b]
[code]DEVICE=C:WINDOWSHIMEM.SYS
DEVICE=C:WINDOWSEMM386.EXE RAM
device=c:windowsCOMMANDdisplay.sys con=(ega,,1)
Country=044,850,c:windowsCOMMANDcountry.sys[/code]

-------------------------------------------------

NOTE: I typed all of this in from a bad FAX. Hopefully there are not too many errors.

When I try to run the program in a "normal" prompt window I get the following messages...

[code]EMS driver not installed.
XXX-XX S/W Version Copyright (c) 2001 XXXXXXXXX, Denmark
BGI Error: Graphics not initialized (use InitGraph)
BGI Error: Graphics not initialized (use InitGraph)[/code]

I "get" the EMS error as the Windows 2000 command prompt shortcut does not allow me to set up EMS. I have done this with a PIF file for the application (as I have had to do with out TurboPascal/DOS apps we have gotten running) but this doesn't seem to help.

I have tried to use the "Compatability-Mode Technology" describe in Microsoft artice Q279792 (http://support.microsoft.com/search/preview.aspx?scid=kb;en-us;Q279792) but it does not put a Compatibility tab on the DOS program shortcuts. It does put one on the "Command Prompt" shortcut and I have turned on "Windows 95 Compatibility" but I cannot configure EMM on the Command Prompt shortcut so this doesn't work either.

Assuming somebody has a suggestion for this my other problem is the BGI error. Our "other" TP programs throw a similar error when the egavga.bgi file is not in the same directory as the app. With this app there is a svg16.bgi file but it's mere presence doesn't seem to work.

I've tried configuring copies of Autoexec.nt and Config.nt similar to the "directions", hopefully enabling EMM, however these are rejected by the OS when I try to start the app using this shortcut.

Any suggestions would be greatly appreciated.

Thank you all.

Trevor Cooper
University of California, San Diego

Sign In or Register to comment.