Subject: | |
From: | |
Reply To: | |
Date: | Tue, 9 Feb 1999 11:27:00 -0400 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
hi,
I wish I could take credit for the ascii/binary idea, but that solution
came from the Response Center about 12 years ago when I was writing a menu
program.
(I save old code you never know what you will need).
The newest version of this program uses the hpcicommand instead of the
createprocess.
Gary Nolan
-----Original Message-----
From: Dirickson Robert S (Steve) [SMTP:[log in to unmask]]
Sent: Tuesday, February 09, 1999 12:32 AM
To: [log in to unmask]
Subject: RE: [RAPID:63] CREATEPROCESS
I don't think that's what Gary is doing; i.e. he's not "fooling" anyone;
he's just using ASCII/BINARY as a (quite clever, BTW) way to let you get
the
value of the address of a variable from Transact. The value passed to ASCII
is a numeric value, in this case the otherwise-inaccessible address value;
ASCII turns the numeric value into a string, and BINARY converts it back to
a numeric value, but in this case in a form you can use.
Unfortunately, I don't think that will work under Transact/iX. The problem
lies in address sizing: a byte address under Transact/iX is not 16 bits.
I'd
guess that that's the error you're getting from the compiler--something
about Parameter 1 to ASCII being the wrong size/shape. And there doesn't
appear to be any intrinsic to "normalize" an address value, i.e. take a
word
address and return the equivalent 32-bit byte address.
You need an intrinsic that takes a 32-bit value and returns that value. In
C, it would look like
int ADDRVALUE(int arg)
{
return arg;
}
Or, we can lobby Kelly to add an "address-of" operator to Transact; then
you
could say
let (CREATEITEMS((INDEX))) = 19;
let (CREATEVALS((INDEX))) = ADDRESSOF((XLSTRING));
or something like that.
Steve
-----Original Message-----
Recently I posted a question about how to pass INFO strings and
XL file names via CREATEPROCESS.
I received a sample program from Gary Nolan, but it is compatibilty
mode and uses the same method as the example in the HP wrtieup.
That is, it "fools" the ASCII intrinsic into processing a string where
it expects an integer parameter. I don't see any way to do this in
native mode; using DEFINE(INTRINSIC) or PROCINTRINSIC
causes a compile error, and not using either one causes an
unresolved external.
My question remains: is there any way to get the byte address
of these strings to pass to CREATEPROCESS?
|
|
|