delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/07/20/06:36:16

Date: Fri, 20 Jul 2001 13:34:28 +0300
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: sajjaramesh AT usa DOT net
Message-Id: <3405-Fri20Jul2001133427+0300-eliz@is.elta.co.il>
X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.9
CC: djgpp AT delorie DOT com
In-reply-to: <001701c110fc$640a8aa0$1557868b@oemcomputer>
(sajjaramesh AT usa DOT net)
Subject: Re: memory sharing
References: <9wz37.445$a04 DOT 1454 AT newsfeeds DOT bigpond DOT com> <2593-Fri13Jul2001165659+0300-eliz AT is DOT elta DOT co DOT il> <003101c10c5d$2f7b8300$cf5b8690 AT oemcomputer> <8361-Sat14Jul2001163627+0300-eliz AT is DOT elta DOT co DOT il> <001701c110fc$640a8aa0$1557868b AT oemcomputer>
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> From: "Ramesh  Sajja" <sajjaramesh AT usa DOT net>
> Date: Fri, 20 Jul 2001 17:14:26 +0800
> 
> Could you please please give me some sample code to pass segment:offset
> values thru command line .
> I have tried execv function , I was able to pass character variables only.

You need to convert the values into character strings, and then invoke
the second program passing it the string you created.  Something like
this:

   char cmd_line[30];
   sprintf (cmd_line, "%x:%x", segment, offset);
   spawnl (P_WAIT, "prog.exe", "prog.exe", cmd_line, NULL);

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019