Windows programming

Moderators: None (Apply to moderate this forum)
Number of threads: 3670
Number of posts: 9122

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Dos Program on NT Posted by Giant on 1 Oct 2001 at 7:45 AM
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

Report
Re: Dos Program on NT Posted by AsmGuru62 on 1 Oct 2001 at 9:57 AM
: 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.


Report
Re: Dos Program on NT Posted by Giant on 2 Oct 2001 at 1:20 AM
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.
:
:


Report
Re: Dos Program on NT Posted by Sephiroth2 on 2 Oct 2001 at 2:29 PM
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.




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.