flat assembler
Message board for the users of flat assembler.

Index > Main > Jump without tabs data.

Author
Thread Post new topic Reply to topic
Roman



Joined: 21 Apr 2012
Posts: 1701
Roman 20 Feb 2024, 11:32
Fasmw 1.73
Code:
proA1:  Msg 'proA1'
        mov edx,1000000
        ret
proA2:  Msg 'proA2'
        inc eax
        ret
proA3:  Msg 'proA3'
        ret
proA4:  Msg 'proA4'
        ret
align 16
proMain:
                lea eax,[.af1+eax*4]
                jmp eax

.af1: jmp proA1
        align 8
   
.af2: jmp proA2
        align 8

.af3: jmp proA3
        align 8

.af4: jmp proA4
        align 8 
    


;In code
mov eax,3
call proMain ;show proA3 i expected proA4
Post 20 Feb 2024, 11:32
View user's profile Send private message Reply with quote
macomics



Joined: 26 Jan 2021
Posts: 915
Location: Russia
macomics 20 Feb 2024, 12:04
Code:
proMain:
                lea eax,[.af1+eax*8] ; lea eax,[.af1+eax*4]
                jmp eax

align 8 ; +++
.af1: jmp proA1    
Post 20 Feb 2024, 12:04
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20147
Location: In your JS exploiting you and your system
revolution 20 Feb 2024, 12:04
I guess you want 8 byte spacing.
Code:
lea eax,[.af1+eax*8]    
Post 20 Feb 2024, 12:04
View user's profile Send private message Visit poster's website Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 1701
Roman 20 Feb 2024, 12:27
Thanks.
Now work fine.
Post 20 Feb 2024, 12:27
View user's profile Send private message 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.