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
OD>I'm not sure why you want DS:SI, (use ES:DI, instead) but in
OD>Quick-Basic, I'd use VARSEG and VARPTR for the variable.
Actually, PowerBASIC has a STRPTR32 that passes the actual far
address of the string. That's the best approach I have found thus
far.
OD>Speaking of which (ES:DI), why did you ask for an assembler
OD>address combo? Does PowerBasic support Inline assembler? I've ays
OD>wondered if it did..
Yes, PB32 does. It does not compare with A86 or MASM, but it does
allow you to manipulate variables close to the heart of the machine.
It makes BASIC more useable for some of the stuff I do.
OD>See ya around!
U bet!
--- Maximus/2 3.01
---------------
* Origin: Madman BBS * Chico, California * 916-893-8079 * (1:119/88)
|