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)
|