Groups | Search | Server Info | Login | Register
Groups > comp.os.os2.programmer.misc > #1868
| From | Paul Edwards <mutazilah@gmail.com> |
|---|---|
| Newsgroups | comp.os.os2.programmer.misc |
| Subject | command line parameters |
| Date | 2024-03-01 12:40 +0800 |
| Organization | A noiseless patient Spider |
| Message-ID | <urrm8m$12mes$1@dont-email.me> (permalink) |
My 32-bit OS/2 applications rely on this parameter on the stack:
__intstart proc
mov eax, [esp+16]
push eax
call __start
in order to get access to the command line.
However, I would like to not have to rely on either
the stack or register at entry for my OS/2 applications,
so I would like an alternate way of getting that
information.
(that way I can provide my own stack format and no
register values, in PDOS-generic form suitable for
running PDOS-generic apps).
For OS/2 16-bit I was able to do this:
#ifdef __16BIT__
{
USHORT seg, offs;
if (DosGetEnv(&seg, &offs) != 0)
{
p = "\0"; /* two NUL characters */
}
p = (char *)(((unsigned long)seg << 16)
| offs);
}
#endif
argv[0] = p;
p += strlen(p) + 1;
But that function doesn't seem to exist in OS/2 2.x.
http://www.edm2.com/index.php/Control_Program_Functions_List
"The" documentation says to use a newer replacement, but
doesn't specify what that might be:
http://www.edm2.com/index.php/DosGetEnv
Until this is resolved, the new pdos.zip at pdos.org
is capable of running pdptest.exe built with makefile.wat,
but it doesn't print the parameters.
Any idea what options I have?
Thanks. Paul.
Back to comp.os.os2.programmer.misc | Previous | Next — Next in thread | Find similar
command line parameters Paul Edwards <mutazilah@gmail.com> - 2024-03-01 12:40 +0800
Re: command line parameters Paul Edwards <mutazilah@gmail.com> - 2024-03-01 15:08 +0800
Re: command line parameters Paul Edwards <mutazilah@gmail.com> - 2024-03-01 18:57 +0800
csiph-web