TIP: Click on subject to list as thread! ANSI
echo: power_bas
to: TIM HUTZLER
from: OLIVIER DAGENAIS
date: 1997-01-22 19:31:00
subject: Assy access of strings

 TH> I want a simple, elegant way of accessing a string that is passed to
 TH> a internal proceedure, ie. in the following.
 TH> DECLARE SUB PrintMe (STRING)
 TH> strng = "test"
 TH> PrintMe strng
 TH> STOP
 TH> SUB PrintMe (s as STRING)
 TH> ! ...what do I need to get DS:SI to point to the string?
 TH> END SUB
I'm not sure why you want DS:SI, (use ES:DI, instead) but in Quick-Basic, I'd 
use VARSEG and VARPTR for the variable.  Not sure if it would work inside of 
the sub itself, but if you get the address of the variable, you can most 
likely pass that to the sub.  I think VARSEG and VARPTR are SSEG and SPTR(?) 
in Power Basic.
Speaking of which (ES:DI), why did you ask for an assembler address combo?  
Does PowerBasic support Inline assembler? I've always wondered if it did..
See ya around!
Omega@inorbit.com
--- Maximus/2 3.01
---------------
* Origin: Hyper BBS (613)257-7636 (1:163/557.2)

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™.