KK>Have you tried using VARSEG() and VARPTR()?
Yes.
Currently I am using STRPTR32 to get the location and storing it in a
pointer variable so I can load DS:SI or ES:DI depending on what I
want to do. It's the simplest, if not as elegant as I believe it
*could* be.
Here's what I mean.....
================================
SUB MySub (s AS STRING)
DIM sptr AS DWORD PTR
DIM slen AS WORD
sptr = STRPTR32(s)
slen = LEN (s)
[...]
LES DI,sptr ;ES:DI now point to the string
MOV CX,slen ;length to scan or move is here
[...]
This is the easiest way I know of thus far. Note that I must define
variable areas and use two functions to get the pointer and length.
Maybe I am doing good, but I think there is a more elegant way to get
the pointer and length together.
Anyone have some better ideas?
--- Maximus/2 3.01
---------------
* Origin: Madman BBS * Chico, California * 916-893-8079 * (1:119/88)
|