On 6/23/06, Arkady V.Belousov <[EMAIL PROTECTED]> wrote: > Hi! > > 23-Июн-2006 17:22 [EMAIL PROTECTED] (Alain M.) wrote to > [email protected]: > > AM> Before your program's first byte at CS:100h is executed, the rest of the > AM> command line (starting with the first argument) is paced at address > AM> CS:80h, zero terminated. That is all you get is using assembler. The > AM> argc[0] didn't work in old versions of DOS so it must be stored > AM> elsewhere and have a function to get it. > > argv[0] (should) contain startup name or should be NULL. Starting from > MS-DOS 3.0, startup name with absolute path placed after original > environment. Strange, but own MS C compiler startup RTL places into argv[0] > not this value, but only executable name. > > AM> It is not guaranteed (between > AM> all DOS flavours) that there will not be extra spaces at the beguining > > They _will_ be, unless you join option with program name: > > >pspdump /test > 0080 06 20 2f 74 65 73 74 0d-00 00 00 00 00 00 00 00 . /test......... > >pspdump/test > 0080 05 2f 74 65 73 74 0d 00-00 00 00 00 00 00 00 00 ./test.......... > >pspdump /test > 0080 07 20 20 2f 74 65 73 74-0d 00 00 00 00 00 00 00 . /test........ > > AM> in case the user puts more then one space after the program name. You > AM> see then some limitations: the line cannot be more then 127 bytes and > AM> "*" are not expanded. > > This (non-expanded "*") isn't limitation! This is very useful feature, > because program itself decides what to do with this _character_, without > requirinq from user extra efforts to escape this character. > > About command line limitation: NDOS/4DOS and newer command.com place > complete, untruncated command line into CMDLINE environemnt variable.
What does everybody think about FreeCOM supporting this? Of course, it is possibly useless without C runtimes supporting it. Which leads to another question: how do DJGPP-compiled shells pass arguments? Cuz in BASH, the commandline can be as long as you want. (Provided you're calling other DJGPP programs, of course). FreeCOM could possibly support this way to improve compatibility with DJGPP apps. > > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Freedos-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/freedos-devel > -- Fall is my favorite season in Los Angeles, watching the birds change color and fall from the trees. David Letterman (1947 - ) See ya Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Freedos-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/freedos-devel
