[futurebasic] Re: Inline Assembly - assem. newbie Question

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : December 1997 : Group Archive : Group : All Groups

From: wilcox <wilcox@...>
Date: Thu, 4 Dec 1997 20:49:07 -0500
A couple of days ago, I said:

>>>Well, I figured that much out, but I don't see how to pass parameters with
>>>the toolbox calls. Such as, in the toolbox call DebuggStr, it takes one
>>>parameter, a string. How would I pass Debuggstr something like "FOOBAR"?
>>>Would I MOVE "FOOBAR" into the a6, or a7, or what?

Then, somebody chimmed in:

>>You got me; as I said, play with the Universal Headers a bit; I'm sure
>>there's some useful info there.

Then, Chris pipped:

>I may be totally off, but I believe you need to push the parameters you are
>passing to a toolbox call (such as _Debugger) onto the stack _before_ you
>make your call.  This being the case (as I think it is) you need to make
>sure to push the parameters onto the stack in the correct order to be
>popped off by the function.

Ok. I told you I was an asem. newbie, but you "push the parameters on the
stack" by using the FB command PUSH, right?

And, the "correct order" Chris was talking about is the order a
"higher-level" language (C, Pascal, FB) toolbox call takes the parameters,
right? Eg: If I wanted to pass "Hi" "This" "Is" "Fun" through the PARAMTEXT
function in FB, I would use CALL PARAMTEXT ("Hi", "This", "Is", "Fun"). In
assembly, I would push "Hi" on the stack first, then "This", then "Is",
then lastly "Fun", right? Or, would it be the opposite way ("Fun", "Is",
"This", "Hi")?

Thanks everyone,