On Wed, 02 Feb 2005 19:10:58 -0300, Marcelo Zamateo
<[EMAIL PROTECTED]> wrote:
> Clay Dowling said:
> 
> >
> > double sqlite3_column_double(sqlite3_stmt*, int iCol);
> >
> > returns a double, not a pointer to a double.
> >
> Thank you Clay.
> Excuse me, i'm not good programming in c. A double is 8 bytes width. How
> does a function return anything other than 4 bytes (in eax register) if
> not in a pointer? I'm using sqlite from assembler.
> 
> And what about this:
> 
> sqlite3_column_double returns:
> 68|8|8|62 (hexadecimal values)
> 
> *and to get me even more confused, if called after
> *sqlite3_column_text, sqlite3_column_double returns:
> *68|22A|22A|62 (hexadecimal values)
> -please refer to example in my previous post-

Marcelo,

even though i don't consider myself an expert with assembler i think i
can give you advice on this particular subject.

If you want to know where the double value is returned you could start
with an assembly listing of the function that returns the value
(sqlite3VdbeRealValue), check the manuals for the assembler
instructions involved and reach some conclusions.

>From the quick look i think the value is returned in the stack and not
in directly in eax, which means you have been looking in the wrong
place.

Since your problem is how values are returned in assembler, the best
way to look for them is inspecting the assembly listing of the related
functions (and assembler manuals).

Hope it helps...
Tiago

Reply via email to