flat assembler
Message board for the users of flat assembler.
 Home   FAQ   Search   Register 
 Profile   Log in to check your private messages   Log in 
flat assembler > Windows > Format binary strang output code

Author
Thread Post new topic Reply to topic
Roman



Joined: 21 Apr 2012
Posts: 323
Format binary strang output code
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     eax0Bh
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: 323
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: 14469
Location: ?                               Posts: 6699
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: 323
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


Powered by phpBB © 2001-2005 phpBB Group.

Main index   Download   Documentation   Examples   Message board
Copyright © 2004-2016, Tomasz Grysztar.