ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I am trying to find out because I have a dos machine. It will run a program. If some how it exits, a com file will run to reboot and with a countdown timer for user intervention. The thing is, if the countdown .com file is run before the program, the countdown time will run/countdown. But if the program is run first, then the countdown time will NOT run/countdown.
I have absolutely no idea why, so I am trying to find out how the .com does the countdown, then from there find out what is wrong.
Distribution: Mandriva 2009 X86_64 suse 11.3 X86_64 Centos X86_64 Debian X86_64 Linux MInt 86_64 OS X
Posts: 2,306
Rep:
ho de-com a dos com file
What do you mean by de-com
The most normal files in dos are 1) sys.com = system file without this dos don,t boot
2) Autoexec.bat = auto startup
3) Config.sys = system config
4) exe files =
5) devices drivers
it's very hard...com files run in real mode, live inside a single segment and have no relocation.
If you use 'ndisasm' (found as tool inside the 'nasm' assembler distribution) you can
de-assemble the small amount of code of your file and try to read/rewrite it.
Distribution: UBUNTU 5.10 since Jul-18,2006 on Intel 820 DC
Posts: 459
Rep:
I can think that the calling program is not really calling your countdown program when it exits. So one way is to bundle them in a batch file like so.
Calling.exe
Countdon.com
This wil tell you clearly what is the problem.
End
Distribution: Mandriva 2009 X86_64 suse 11.3 X86_64 Centos X86_64 Debian X86_64 Linux MInt 86_64 OS X
Posts: 2,306
Rep:
how to de-com a dos com file
O I know what a com file is I was one the old people who did programming under dos in fortran, Pascal, C in basic After that we get more power full
machines we use Cobol But that were the old days
Believe it or not, COBOL still does most of the "heavy lifting" in the business world... and FORTRAN is still the language of choice in the scientific community.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.