flat assembler
Message board for the users of flat assembler.

Index > Main > Puzzling error

Author
Thread Post new topic Reply to topic
roticv



Joined: 19 Jun 2003
Posts: 374
Location: Singapore
roticv 17 Jan 2004, 07:23
I tried to convert one function from masm32.lib into fasm but I got some weird error "invalid value". Do tell me what went wrong. Thank you.

Code:

proc atodw, String 
  ; ---------------------------------------- 
  ; Convert decimal string into dword value 
  ; return value in eax 
  ; ---------------------------------------- 
        push    esi 
        push    edi 
        xor     eax, eax 
        mov     esi, [String] 
        xor     ecx, ecx 
        xor     edx, edx 
        mov     al, [esi] 
        inc     esi 
        cmp     al, 2Dh 
        jnz     hmm ;<- the error here 
        mov     al, byte ptr [esi] 
        not     edx 
        inc     esi 
        jmp     hmm 
  @@: 
        sub     al, 30h 
        lea     ecx, dword [ecx+4*ecx] 
        lea     ecx, dword [eax+2*ecx] 
        mov     al, byte [esi] 
        inc     esi 
hmm: 
        or      al, al 
        jne     @B 
        lea     eax, dword [edx+ecx] 
        xor     eax, edx 
        pop     edi 
        pop     esi 
        return        
    
Post 17 Jan 2004, 07:23
View user's profile Send private message Visit poster's website MSN Messenger Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3499
Location: Bulgaria
JohnFound 17 Jan 2004, 07:29
Hi.
At first I can't see begin (or enter) statement at the begining of the procedure.
Post 17 Jan 2004, 07:29
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
roticv



Joined: 19 Jun 2003
Posts: 374
Location: Singapore
roticv 17 Jan 2004, 07:30
Thanks Very Happy
Post 17 Jan 2004, 07:30
View user's profile Send private message Visit poster's website MSN Messenger Reply with quote
comrade



Joined: 16 Jun 2003
Posts: 1150
Location: Russian Federation
comrade 17 Jan 2004, 18:59
You should prefix local labels with .

_________________
comrade (comrade64@live.com; http://comrade.ownz.com/)
Post 17 Jan 2004, 18:59
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.