On Sun, Jun 2, 2024 at 5:13 AM Jerome Shidel via Freedos-devel <
freedos-devel@lists.sourceforge.net> wrote:

>
> FreeCOM copies the first 126 bytes to the new PSP terminated by 0xd. Then
> it creates an environment variable “CMDLINE” with the entire command line.
>
>
Ah I see! Thanks! :D So I suppose that the programs will have to know about
this CMDLINE env variable?
It's the first I've heard of it, which is why I'm asking, and obviously
because I'd like to also support this in DOG.

What's strange to me is that localcfg doesn't seem to explicitly do it,
though it still gets the full command line,
but then I realized that since it doesn't know about it, it doesn't
actually get the full line. It does only see the first 127 characters,
which is why you can get odd errors even though your line should be fine,
depending on where the break is...

I spent way too many hours reading FreeCOM and kernel sources to try to
unravel some magic.. But at least I was having fun! XD

Makes me think that maybe we should write a FreeDOS Run-time Initialization
Routine for Open Watcom? They have the example wildargv.c.
I'll make a note, I'll see what I can do once I start porting DOG to OW :)
Thanks again for the explanation and the resulting deep dive! :P

-Wolf

-- 

  |\_
  | .\---.
 /   ,__/
/   /Wolf <wolf+...@bergenheim.net>_
_______________________________________________
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel

Reply via email to