Jack Jackson wrote: > I've noticed a difference in command line parsing between FreeDOS and > PC-DOS. > > Both FreeDOS and PC-DOS put the command line, starting with the > character after the executable, in a buffer at offset 0x80 in the PSP. > > The behavior difference I see with FreeDOS is if the first non-blank > character after the executable is a left parenthesis, then FreeDOS sets > 0x80 in the PSP to zero so the rest of the command line is not > available. > > Examples of what is in PSP 0x80: > > Command Line: SOMEPROG (aa bb cc FreeDOS: "\0" DOS: " (aa bb cc\0" > > Command Line: SOMEPROG abc (cc dd ee FreeDOS and DOS: " abc (cc dd > ee\0" > > Does anyone know why FreeDOS behaves differently when the first > character after the executable is a left parenthesis?
Hi Jack, I not know how to determine the value PSP 0x80, but when I try this simple program (compiled/linked with OpenWatcom): #include <stdio.h> #include <stdlib.h> void main(int argc, char const *argv[]){ int ii; for(ii=0; ii<argc; ii++){ printf("argv[%d] = >%s<\r\n", ii, argv[ii]); } } then parameters seems be fine: E:\pokusy>dosparm argv[0] = >E:\POKUSY\DOSPARM.COM< E:\pokusy>dosparm p1 (p2 argv[0] = >E:\POKUSY\DOSPARM.COM< argv[1] = >p1< argv[2] = >(p2< E:\pokusy>dosparm (p1 (p2 argv[0] = >E:\POKUSY\DOSPARM.COM< argv[1] = >(p1< argv[2] = >(p2< It is tested with FreeDOS 1.1 under DOSEMU, probably no reason why it would be different in pure FreeDOS. Franta Hanzlik ------------------------------------------------------------------------------ "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available Simple to use. Nothing to install. Get started now for free." http://p.sf.net/sfu/SauceLabs _______________________________________________ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user