flat assembler
Message board for the users of flat assembler.

Index > Windows > Format binary strang output code

Author
Thread Post new topic Reply to topic
Roman



Joined: 21 Apr 2012
Posts: 1796
Roman 22 Jan 2017, 11:58
I do in Fasm 1.69.03 and the same result in Fasm 1.71:
Code:
format binary
nop
mov eax,11
ret 
    


Look in IDA Pro and see:
Code:
seg000:00000000                 db 90h
seg000:00000001                 db  66h ; f
seg000:00000002 ;               ------------------------
seg000:00000002                 mov     eax, 0Bh
seg000:00000007                 retn
    

My question why fasm put in bin file unnecessary 66h ?!
I tested this in my program
Code:
db 0xb8,11,0,0,0
    

And i get mov eax,11 !!!


Last edited by Roman on 22 Jan 2017, 12:05; edited 1 time in total
Post 22 Jan 2017, 11:58
View user's profile Send private message Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 1796
Roman 22 Jan 2017, 12:01
If i write this code, bin file correct and not have 66h
Code:
format binary
nop
;mov eax,11
db 0xb8,11,0,0,0
ret    
Post 22 Jan 2017, 12:01
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20343
Location: In your JS exploiting you and your system
revolution 22 Jan 2017, 13:10
If you need 32-bit code then you can use use32.
Code:
format binary
use32
mov eax,11    
Post 22 Jan 2017, 13:10
View user's profile Send private message Visit poster's website Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 1796
Roman 22 Jan 2017, 14:30
Thanks
Post 22 Jan 2017, 14:30
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.