Redirect support on MSX-DOS.
-
- New member
- Posts: 9
- Joined: Sun Oct 13, 2024 3:41 am
Redirect support on MSX-DOS.
When compiling for MSX-DOS (using the -subtype=msxdos option), is it correct to assume that so-called redirects (like 'dir > out.txt') are not supported?
Re: Redirect support on MSX-DOS.
They should be enabled by default, you can disable them with the pragma CRT_COMMANDLINE_REDIRECTION=0
Does this question mean that they're not working for you?
Does this question mean that they're not working for you?
-
- New member
- Posts: 9
- Joined: Sun Oct 13, 2024 3:41 am
Re: Redirect support on MSX-DOS.
>Does this question mean that they're not working for you?
Yes, here is the code.
https://github.com/renatus-xxxx/diffly
This is how I built it:
zcc +msx -create-app -O3 -subtype=msxdos diffly.c -bn DIFFLY.COM
Thank you for your response. I really appreciate your help!
Yes, here is the code.
https://github.com/renatus-xxxx/diffly
This is how I built it:
zcc +msx -create-app -O3 -subtype=msxdos diffly.c -bn DIFFLY.COM
Thank you for your response. I really appreciate your help!
Re: Redirect support on MSX-DOS.
I think the parser is a little "picky", it looks like you have to have at least one non-redirection argument and there can't be a space between the pipe and the filename.
-
- New member
- Posts: 9
- Joined: Sun Oct 13, 2024 3:41 am
Re: Redirect support on MSX-DOS.
Thanks for your reply, I appreciate it.
It doesn't seem to work with a combination of arguments and redirects, like this for example
diffly original.txt modified.txt > out.txt
diffly > out.txt
Is there anything that you can think of? All source code and executables can be found here
https://github.com/renatus-xxxx/diffly
It doesn't seem to work with a combination of arguments and redirects, like this for example
diffly original.txt modified.txt > out.txt
diffly > out.txt
Is there anything that you can think of? All source code and executables can be found here
https://github.com/renatus-xxxx/diffly
Re: Redirect support on MSX-DOS.
I think it's the same parser used by CP/M. It got partially jammed after the general crt0 rework if I'm not wrong
Re: Redirect support on MSX-DOS.
For my tests this seems to be working:
Well, subject to my caveats listed above:
Ah, yes, I can definitely see a problem now.
Code: Select all
#include <stdio.h>
int main(int argc, char **argv)
{
int i;
printf("Args count %d\n",argc);
for ( i = 0; i < argc; i++ ) {
printf("%d: %s\n",i, argv[i]);
}
}
Ah, yes, I can definitely see a problem now.
You do not have the required permissions to view the files attached to this post.
-
- New member
- Posts: 9
- Joined: Sun Oct 13, 2024 3:41 am
Re: Redirect support on MSX-DOS.
As you know, there seems to be no problem with the command line arguments, only with the redirection.
If you change the platform to cpm as shown below, the redirection seems to work.
-zcc +msx -create-app -O3 -subtype=msxdos diffly.c -bn DIFFLY.COM
+zcc +cpm -create-app -O3 diffly.c -bn DIFFLY.COM
In other words, there seems to be a problem only with +msx -subtype=msxdos
If you change the platform to cpm as shown below, the redirection seems to work.
-zcc +msx -create-app -O3 -subtype=msxdos diffly.c -bn DIFFLY.COM
+zcc +cpm -create-app -O3 diffly.c -bn DIFFLY.COM
In other words, there seems to be a problem only with +msx -subtype=msxdos
Re: Redirect support on MSX-DOS.
That was a good hint. The handling was different for some reason.
I have a fix including for the blank argument case I found, but I want to do a bit more testing and remove some more limitations.
I have a fix including for the blank argument case I found, but I want to do a bit more testing and remove some more limitations.
Re: Redirect support on MSX-DOS.
long ago I tuned the cp/m part a little iirc, but I'm not sure I got it perfectly reacting to all the possible combinations of >, <, >> .
Re: Redirect support on MSX-DOS.
With luck it should behave a bit better now.
-
- New member
- Posts: 9
- Joined: Sun Oct 13, 2024 3:41 am
Re: Redirect support on MSX-DOS.
I have tried the Nightly Build version and have confirmed that the redirection issue has not been specifically resolved. cpm version is still fine, but msxdos seems to continue to have the same problem.
Re: Redirect support on MSX-DOS.
I only pushed this morning - so after the nightly build!
-
- New member
- Posts: 9
- Joined: Sun Oct 13, 2024 3:41 am
Re: Redirect support on MSX-DOS.
Oops, sorry, I didn't get the fixes in the nightly build yet.
-
- New member
- Posts: 9
- Joined: Sun Oct 13, 2024 3:41 am
Re: Redirect support on MSX-DOS.
I re-built with the latest NightlyBuild version.
I have confirmed that I can redirect from my application on msxdos!
Thanks!!!
I have confirmed that I can redirect from my application on msxdos!
Thanks!!!