-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Command interpreter does not exit with proper errorlevel #95
Comments
I think many command.com's are broken |
Yep, FreeCOM is also broken in a similar way (it is hard coded to always return zero no matter what). This was one of the reasons I went looking for a different DOS-compatible OS (and found PCMOS!) Unfortunately once I figured out how the PCMOS worked and got everything situated, I found out that this is also broken in PCMOS. (in a slightly different way than in FreeCOM). Unfortunately I can use the 4DOS shell on FreeDOS to mitigate this problem, but I've not been very successful using an alternative shell on PCMOS. 4DOS is very confused under PCMOS (it seems to lose the ability to traverse the filesystem).
|
thanks for the heads up. I am quite busy with a carve-out mogration as
parts of the company were sold and that at least will take it to the end of
the year.
Regarding the return code -- if it's ever being taken up, we should follow
the original command.com specs.
…On Thu, Apr 30, 2020 at 4:07 AM Darrin M. Gorski ***@***.***> wrote:
Yep, FreeCOM is also broken in a similar way (it is hard coded to always
return zero no matter what).
This was one of the reasons I went looking for a different DOS-compatible
OS (and found PCMOS!)
Unfortunately once I figured out how the PCMOS worked and got everything
situated, I found out that this is also broken in PCMOS. (in a different
way than in FreeCOM).
Unfortunately I can use the 4DOS shell on FreeDOS to mitigate this
problem, but I've not been very successfuly using an alternative shell on
PCMOS. 4DOS is very confused under PCMOS (it seems to lose the ability to
traverse the filesystem).
- Darrin
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#95 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACNIXVRLHXTWZCGP73OTQNDRPDMP7ANCNFSM4MT5VFAQ>
.
|
Maybe you are looking for something like this:
|
Awesome! How do I build? |
I build with build.sh script in SOURCES/src. |
I'm running that now, will see what I get! Thanks. |
I ran a build (a few actually) with "build.sh" in SOURCE/src but while it DOES build $$SHELL.SYS, it does not build COMMAND.COM ... at least not anywhere I can find. I read somewhere about the "old" vs "new" way to do command.com, so I tried using the resulting $$SHELL.SYS as a command.com, but that doesn't work... Any ideas on how to build COMMAND.COM? |
Try using previous command.com. |
I have added PR #97 that will do everything |
So I switched to the old-style command.com (OLDCMD.BAT) and used the modified $$shell.sys from my trunk build (via build.sh in SOURCES/src). Unfortunately, I get "Improper MOS Version" on boot. Not sure if that's coming from SHELL$$.SYS when the kernel loads it, or COMMAND.COM when the shell is invoked, but one of them is not happy. Will look at req 97 above. Thanks! |
This is a little easier to build + run. My system doesn't like the --Fdrive_c $BOOTDIR so I had to wire up drive_c by hand. Unfortunately, this still doesn't work for me. I suspect the old COMMAND.COM is doing something the newer $$SHELL.SYS (or the kernel) no longer supports. Did this work on your build system? Is the build of command.com lost to time? (I didn't see any references in any of the makefiles) Here's what happens when I boot the newly built MOS from SOURCE/src/latest
|
But does the dosemu version check pass?
I didn't try with my asm patch in that thread,
Your dosemu build feels very badly. |
Hi @dgorski ! If I remember correctly, command.com is just a stub to reload $$shell.sys. Here is the relevant build information from /SOURCES/src/latest/BOSMAKE.BAT ren MOXCPTSK.COM COMMAND.COM So command.com is actually moxcptsk.com in the makefile MAKEUTIL.MAK. |
Oh, and the XO stuff should actually be replaced by a valid serial number and automagically registered if your build completes successfully. |
As was pointed out, this is how command.com should be built.
@the-grue , @stsp ,
PS - I run dosemu via a terminal window, all of my linux machines are headless (and remote). It complained about 25 lines because my default terminal windows are 24. I can run in 25 lines, no difference. |
As was pointed out, this is how command.com should be built. Also update dosemu revision check, as --Fdrive_c appears recent.
As was pointed out, this is how command.com should be built. Also update dosemu revision check, as --Fdrive_c appears recent.
It doesn't matter.
OK, thanks for confirming.
Yes, but for me that was an indication |
Hope I didn't inject any confusion here. I assumed you were using my build scripts, which build a complete distro. I now see you are using dosemu, which I don't test against. I just do bare metal and virtual machines. |
But now you can test it by just |
@the-grue - no problem. Can you elaborate on your build? Do you build on MOS? |
Yeah, pretty sure my build worked on MOS. To do the full build, you'll need Borland C++ 3.1 and Turbo Pascal 7 (if you want to rebuild the help program but not required). Run makeall.bat with some parameters and it should build a full distribution into c:\distro and register it (no more 60 minute timeout). If you have a 1.44 MB floppy in drive A it will format it and create an installable disk image with the full 5.02 distro. This isn't required though if you just want the bits out of the c:\distro directory. Honestly, I haven't touched this code since I added the CDROM driver to the distro, so if you want specifics or a tutorial it'll take me some time to get familiar with it again. |
MAKEMOS.BAT: rename moxcptsk.com command.com [#95]
Hi,
I'm using software that swaps out and creates a subshell (using COMSPEC) to run batch files. These files return errorlevels back to the software to inform the result of the batch run.
Under PCMOS the result is either 0 or 43 depending on if the "exit" command is used, or if the batch file reaches the end. It does not seem to matter what the errorlevel was prior to exist, the return is either 43 or 0.
Under other command.com implementations, the current errorlevel is returned as the result of command.com exiting (that is, it returns the result of the last command).
The use of$COMPAT$ does not seem to matter.
Any chance there is an easy way to adjust the command interpreter for this?
The text was updated successfully, but these errors were encountered: