TIP: Click on subject to list as thread! ANSI
echo: power_bas
to: KURT KUZBA (Rcvd)
from: TIM HUTZLER
date: 1997-01-15 08:00:00
subject: Re: Assy access of strin

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)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.