> The link files in C:\FreeDos\Links set an environment variable. For > example I found this in the file blkdrop.bat > > set _LINK.BLKDROP=%DOSDRV%\GAMES\BLKDROP\BLKDROP.EXE > > If I run this, I expect the environment variable _LINK.BLKDROP to be > added to the system, but when I do a "set" I don't see it. Why is > that? (I must be misunderstanding how the "set" command works).
After you type SET xxx=yyy you should see it show up when you type the SET command afterwards. There are two reasons I can think of why it wouldn't show up. One would be if you are out of environment space so it never actually got added. The amount of environment space is limited, and I'm not sure how different DOS versions react if a variable never got added due to a size limitation (some may just fail silently). I don't remember having that problem myself, so I'm not sure. The other reason would be that there are (or at least can be) multiple copies of the environment space. There is a master environment space and as programs and shells are executed sometimes they only a receive a copy of the environment space. If they make any changes they only appear in the copy and are never transferred back to the master environment. The details can get complicated, so I think we'd need to know a little more about the entire sequence of things you're doing to try to do to isolate the source of the problem. > All .bat link files run the programs with 9 parameters (%1 - %9) I'm > guessing this is because a dos program can take a maximum of 9 > parameters and by doing it this way, all program parameters should be > covered. Is that correct? No, they can have more than 9 parameters. %0 is the name of the batch file itself, and you can use the SHIFT command to access the higher-numbered variables (the tenth parameter would move into %9, the ninth into %8, etc.). The lower numbered parameters just disappear so you need to make sure you don't need any of them again after the SHIFT. When you're running an executable file (.EXE or .COM) instead of a batch file you can do and access all kinds of things that you can't do from a batch file. That's where batch file utilities are helpful -- they let you "expand" the capabilities of a batch file. > Why are some of the link files .COM files containing binary data? I'm not sure what you mean by "link files .COM files". COM files are binary executable files and always contain binary data. They can (and usually do) contain some readable text data embedded in the binary code, but they don't have to. _______________________________________________ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user