Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.os.os2.programmer.misc > #1868
| Path | csiph.com!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Paul Edwards <mutazilah@gmail.com> |
| Newsgroups | comp.os.os2.programmer.misc |
| Subject | command line parameters |
| Date | Fri, 1 Mar 2024 12:40:49 +0800 |
| Organization | A noiseless patient Spider |
| Lines | 57 |
| Message-ID | <urrm8m$12mes$1@dont-email.me> (permalink) |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8; format=flowed |
| Content-Transfer-Encoding | 7bit |
| Injection-Date | Fri, 1 Mar 2024 04:40:55 -0000 (UTC) |
| Injection-Info | dont-email.me; posting-host="1f04345046046ea4eb841c70e7979180"; logging-data="1137116"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/mkPVRhi4DpqNR/zoatVgfQrEIkyRLdb0=" |
| User-Agent | Mozilla/5.0 (OS/2; Warp 4.5; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 |
| Cancel-Lock | sha1:Pic2VPDPjA77aE0wpAg2cKay028= |
| X-Mozilla-News-Host | news://news.eternal-september.org:119 |
| Xref | csiph.com comp.os.os2.programmer.misc:1868 |
Show key headers only | View raw
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