News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

one reason why sqlite3 sucks..

Started by egons, May 24, 2011, 11:18:20 AM

Previous topic - Next topic

egons

  invoke sqlite3_open,eax,ADDR datab;ADDR DBName
        mov eax,datab
        invoke sqlite3_exec,eax,addr sqlc,addr CallBackCount,0,0; count record of node.tab
        mov eax,datab
       invoke sqlite3_exec,eax,addr sql2,addr CallBack,0,0; get nodes

while working in CallBack procedure you've meet w/unhandled exception only if you want to change CPU registers. I hate it :dazzled:

hutch--

Just make sure you are using the correct calling convention and passing the correct number and sizes of data, I would be surprised if the function(s) worked OK at high level but not with registers. Also check if your own code preserves the normal registers as again if it works at high level with other compilers, it will be Intel ABI complaint.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

egons

I've meet w/moby_dic example, which crashed ebx. no idea why code works. now looks like i must to store *all* registers *facepalm.jpeg*

egons

btw application correctly work w/one record in a table instead couple of it :tdown

hutch--

Try using conventional register preservations in your own code to ensure you are not messing up important registers.


    push ebx
    push esi
    push edi

  ; write your code here

    pop edi
    pop esi
    pop ebx

    ret
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

egons

#5
oh, my thinko was vetry weird :bdg. I've found pretty one example. it helps to enumerate all records of table.
thanks for your reply :U

farrier

It is a GOOD day to code!
Some assembly required!
ASM me!
With every mistake, we must surely be learning. (George...Bush)