Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Command Line Arguments

0 views
Skip to first unread message

Simon Bale

unread,
May 5, 1997, 3:00:00 AM5/5/97
to

Could someone tell me how to get the arguments of the command line and dump
them into a buffer. It would be helpful if you could demonstrate how this
is done in an EXE file because I understand it is different for a COM
programme.

Thanks

--
___________________________________________

Simon Bale

Simon...@btinternet.com
___________________________________________

Jerzy Tarasiuk

unread,
May 5, 1997, 3:00:00 AM5/5/97
to

>>>>> Simon Bale <Simon...@btinternet.com> writes:
> Could someone tell me how to get the arguments of the command line and dump
> them into a buffer. It would be helpful if you could demonstrate how this
> is done in an EXE file because I understand it is different for a COM

It is the same: when your program starts, locations PSP:80h to 0FFh
contain arguments (byte 80h size w/o terminating CR). And ES=DS=PSP.
Example: the command is "MYPROG brown fox" results in values
0a 20 62 72 6f 77 6e 20 66 6f 78 0d stored in PSP:80h to 8bh.
10 ^---" brown"---^ ^-" fox"-^ CR

0 new messages