Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!snorkelwacker!ai-lab!friedman@apple-gunkies.ai.mit.edu From: friedman@apple-gunkies.ai.mit.edu (Noah Friedman) Newsgroups: comp.os.msdos.programmer Subject: Re: Long command lines Summary: There should be no command-line length limit at all Message-ID: <10379@life.ai.mit.edu> Date: 31 Aug 90 17:46:38 GMT References: <2954@mindlink.UUCP> <2677@dataio.Data-IO.COM> Sender: news@ai.mit.edu Organization: The Free Software Foundation Lines: 38 In article <2677@dataio.Data-IO.COM> bright@Data-IO.COM (Walter Bright) writes: >In article <2954@mindlink.UUCP> a269@mindlink.UUCP (Mischa Sandberg) writes: ><4DOS does exactly that. 4DOS is a replacement for COMMAND.COM > >Limiting it to 256 bytes only defers the problem for a little while... >A better limit would be 64k. Among other problems, when the command string is stored in the PSP, the first byte is used to store the length. I guess this value must be treated as signed, because 8 bits allows for a maximum (unsigned) value of 255. I started to write an MS-DOS compatible system, but I found that there were so many bugs and stupid designs that I couldn't in good conscience reproduce them. I hope to design a filesystem that allows filenames of arbitrary length and characters (except for '/' and ASCII 0) and command-line length of a similar nature. I think I can even improve on DOS's process management. Of course, this doesn't help the average DOS user, since my os wouldn't be able to run DOS programs. I don't know of any way to get a commercial program to read a command line greater than 128 characters, because they get this list from the PSP. In your own programs, you might try using the two FCB blocks in the PSP if they aren't being used for some other purpose (I don't think DOS uses them anymore) to store arguments and retrieve them. Of course, this also involves writing your own command shell to PUT those arguments there, since command.com won't. --- Noah Friedman friedman@ai.mit.edu my new OS, I'm