Dos Program on NT

Hi.
I have a computer with NT on it. I wrote a game in dos (mode13h), and I am confused about something.
When I start the computer and run the game, it runs fine. You can play it as long as you want but if you close it down and try and run it again it Freezes. I have tried it many times and it is the same all the time. I have looked at the processed running before and after, and there is no consistant change noticed. Some say that NT does not run Dos programs well, but if this was the case, surely it would not run flawlessly the first time, and if it runs the first time, isn't it reasonable to presume that it could run all the time.

Does anyone have any ideas what I could do to make the game/demo run propperly.

Thanks
Giant

Comments

  • : Hi.
    : I have a computer with NT on it. I wrote a game in dos (mode13h), and I am confused about something.
    : When I start the computer and run the game, it runs fine. You can play it as long as you want but if you close it down and try and run it again it Freezes. I have tried it many times and it is the same all the time. I have looked at the processed running before and after, and there is no consistant change noticed. Some say that NT does not run Dos programs well, but if this was the case, surely it would not run flawlessly the first time, and if it runs the first time, isn't it reasonable to presume that it could run all the time.
    :
    : Does anyone have any ideas what I could do to make the game/demo run propperly.
    :
    : Thanks
    : Giant
    :
    When DOS program runs on NT system it runs inside the so called NTVDM process - wrapper which runs DOS inside it. Now, when you exit the DOS program - the NTVDM is left in memory (by default), waiting for the next DOS or Win16 application. The problem is in your DOS application - something is not released properly or memory allocation system is damaged, iterrupts are not restored, etc... and when you start it again - you come into destroyed DOS shell which of course can freeze it.

    The solution is like this - you have to create a shortcut on a desktop for your DOS program. When you right click on a shortcut - you can bring up the check box "Run in separate memory space" - or something like this. Check it to be ON. It is in second page of the properties panel (I think). As soon as you do it - every time when your DOS program exits - the NTVDM is killed too - that makes NT to launch fresh NTVDM every time, so the problems you left in DOS are cleared.

    The better way is to find a problem, of course...

    Good luck!

    P.S. I designed a lot of DOS apps for NT and if is all OK - you launch them again and again without any problem on the same NTVDM. Big ones - including 13h graphics and such.


  • Thanks for the help, however I can not seem to get it to work.
    I created the shortcut like you said, the went to the properties, but cannot find the specified field in any of the 6 sections available.

    Giant

    : : Hi.
    : : I have a computer with NT on it. I wrote a game in dos (mode13h), and I am confused about something.
    : : When I start the computer and run the game, it runs fine. You can play it as long as you want but if you close it down and try and run it again it Freezes. I have tried it many times and it is the same all the time. I have looked at the processed running before and after, and there is no consistant change noticed. Some say that NT does not run Dos programs well, but if this was the case, surely it would not run flawlessly the first time, and if it runs the first time, isn't it reasonable to presume that it could run all the time.
    : :
    : : Does anyone have any ideas what I could do to make the game/demo run propperly.
    : :
    : : Thanks
    : : Giant
    : :
    : When DOS program runs on NT system it runs inside the so called NTVDM process - wrapper which runs DOS inside it. Now, when you exit the DOS program - the NTVDM is left in memory (by default), waiting for the next DOS or Win16 application. The problem is in your DOS application - something is not released properly or memory allocation system is damaged, iterrupts are not restored, etc... and when you start it again - you come into destroyed DOS shell which of course can freeze it.
    :
    : The solution is like this - you have to create a shortcut on a desktop for your DOS program. When you right click on a shortcut - you can bring up the check box "Run in separate memory space" - or something like this. Check it to be ON. It is in second page of the properties panel (I think). As soon as you do it - every time when your DOS program exits - the NTVDM is killed too - that makes NT to launch fresh NTVDM every time, so the problems you left in DOS are cleared.
    :
    : The better way is to find a problem, of course...
    :
    : Good luck!
    :
    : P.S. I designed a lot of DOS apps for NT and if is all OK - you launch them again and again without any problem on the same NTVDM. Big ones - including 13h graphics and such.
    :
    :


  • Try to fix the program instead.
    Check that you don't overwrite portions of operating system or VGA BIOS code. Does it crash when you run it again in another DOS box? Do other programs crash? Make sure that you don't depend on the memory containing a specific value at startup.

Sign In or Register to comment.

Howdy, Stranger!

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

Categories