1.

Solve : MS-DOS parameters too long in Win XP?

Answer»

Hi!
I have a LINKER for the PL/M language made by Intel which work fine under win98 but not under win XP. At the DOS-prompt I write:
c:\ver317c\RL51 & < F.dat

RL51.EXE and F.DAT is located in the same folder


The content of F.DAT is a list of files, to be used by RL51 as parameters.

F.DAT contents:
STARTUP.OBJ , INITIAL.OBJ , &
MANU_CON.OBJ, AUTO_CON.OBJ, &
SCALE_CA.OBJ, VOL_CAL.OBJ , &
TRANSP.OBJ , TARING.OBJ , &
FUNCTION.OBJ, TESTFUNC.OBJ, &
NEWPLACE.OBJ, MANMOTOR.OBJ, &
SCA_FEED.OBJ, VOL_FEED.OBJ, &
MAINFEED.OBJ, FEEDHELP.OBJ, &
INPUTS.OBJ , MOTORCON.OBJ, &
COMMUNIC.OBJ, BUSTASK.OBJ , &
BUSHELP.OBJ , COMMUN.OBJ , &
HELPPROC.OBJ, PLACEHLP.OBJ, &
MOT_HELP.OBJ, DISPLAY.OBJ , &
MULT_DIV.OBJ, ANA_WAIT.OBJ, &
STR_FEED.OBJ, TRACE.OBJ , &
RXHELP.OBJ , TXHELP.OBJ, &
CRC.OBJ , PUBLICS.OBJ , &
UTIL51.lib , &
PLM51.lib &
TO F_W_C.ABS OVERLAY

As you can see, there are a lot of files to be used by the linker. When I invoke the command mentioned above, the following error MESSAGE appears:

C:\ver317c>rl51 & < F.DAT
The syntax of the command is incorrect.

It seems like XP does not like the "&" and the "<", so I used the SET-command to assign the string in the file F.DAT to a variable instead, and I wrote all the parameters at one line inside a batch file called link.bat. When running link.bat, the folloing was shown on the screen:

C:\ver317c>rl51 STARTUP.OBJ, INITIAL.OBJ, MANU_CON.OBJ, AUTO_CON.OBJ, SCALE_CA.O
BJ, VOL_CAL.OBJ, TRANSP.OBJ, TARING.OBJ, FUNCTION.OBJ, TESTFUNC.OBJ, NEWPLACE.OB
J, MANMOTOR.OBJ, SCA_FEED.OBJ, VOL_FEED.OBJ, MAINFEED.OBJ, FEEDHELP.OBJ, INPUTS.
OBJ MOTORCON.OBJ, COMMUNIC.OBJ, BUSTASK.OBJ , BUSHELP.OBJ , COMMUN.OBJ , HELPPR
OC.OBJ, PLACEHLP.OBJ, MOT_HELP.OBJ, DISPLAY.OBJ , MULT_DIV.OBJ, ANA_WAIT.OBJ, ST
R_FEED.OBJ, TRACE.OBJ , RXHELP.OBJ , TXHELP.OBJ, CRC.OBJ , PUBLICS.OBJ ,
UTIL51.lib , PLM51.lib TO F_W_C.ABS OVERLAY
The system cannot EXECUTE the specified program.

Then I shortened down the list of files, and after some experiments I found that if the list was short enough (less files in the list), the linker worked. So it seems to me that XP does not take as many characters in the parameter list as DOS under WIN98 does. The problem is that I need to link all the files in the project and must keep all file names in the list of parameters. How can I manage to do it?

BEST regards,
Morten from Norway
I suspect the problem is with what has been typed at the command line. I haven't been able to find any use of the "&" character in the command line.

Why won't RL51 < F.dat work?

I found a web site:

http://www.intel.com/design/mcs51/technote/3073.htm

but they seem to perpetuate the problem. Try it without the "&" and see what happens. It's my understanding that the command line limit for WinXp is 128 characters.

Let us know. Thanks!

I need to use the whole parameterlist, otherwise it will not link as supposed.

I have removed the "&", the result is the same.

I print the command and the parameter lis tinto a batch-file instead:
When the list is redused from a contents of 36 files/499 characters down to 7 files/116 characters the linker works, except that the error list is huge of COURSE, as a lot of files are missing in the link. Then one more file is added to the list, the result is 128 characters (including the command). Now the error "The system cannot execute the specified program." appears again. I reduced the length into 127 by simply removing one space, now it works!

So, my question now is: Are the number of allowed character in the command line greater for win98? How can I increase the size in DOS under XP Proffesional?

Thanks again!
Best I could come up with is the max characters for CMD is 8K. The max characters for DOS (command) is 127. Win95 and WinNT had a max_path variable that could be changed. I couldn't find max_path on a XP machine, although you might want to define a value and see what happens.

You might find something useful at:

http://maillist.perforce.com/pipermail/jamming/1998-November/000592.html

Let us know how you make out.



Discussion

No Comment Found