Contribute  :  Web Resources  :  Past Polls  :  Site Statistics  :  Downloads  :  Forum  
    BiW ReversingThe challenge is yours    
 Welcome to BiW Reversing
 Monday, June 18 2018 @ 05:45 AM CEST
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

BSWAP

 
Post new topic   Reply to topic    www.reversing.be Forum Index -> Coding Corner
View previous topic :: View next topic  
Author Message
sharpe
Frequent poster
Frequent poster


Joined: 20 Mar 2005
Posts: 65

PostPosted: Thu Jan 11, 2007 4:51 pm    Post subject: BSWAP Reply with quote

What does BSWAP do? An example would be super!

Thanks Smile
Back to top
View user's profile Send private message Visit poster's website
stingduk
Regular
Regular


Joined: 19 Feb 2005
Posts: 148

PostPosted: Thu Jan 11, 2007 6:17 pm    Post subject: Reply with quote

bswap swaps bytes

converts any dword given to it from little endian to big endian format and vice versa

mov eax,12345678
bswap eax

after this eax wil be

78563412

if you bswap again eax will be 12345678
Back to top
View user's profile Send private message
sharpe
Frequent poster
Frequent poster


Joined: 20 Mar 2005
Posts: 65

PostPosted: Fri Jan 12, 2007 6:52 am    Post subject: BSWAP Reply with quote

Hiya,

Thats smashing. Thanks Smile
Back to top
View user's profile Send private message Visit poster's website
sharpe
Frequent poster
Frequent poster


Joined: 20 Mar 2005
Posts: 65

PostPosted: Fri Jan 12, 2007 2:52 pm    Post subject: WinASM error with bswap Reply with quote

Hi,

I am unable to build an app in WinASM when using the bswap instruction. is there another another instruction that does the same?
Back to top
View user's profile Send private message Visit poster's website
detten
Site Admin


Joined: 05 Feb 2005
Posts: 317

PostPosted: Fri Jan 12, 2007 3:27 pm    Post subject: Reply with quote

iirc BSWAP is an opcode that was introduced in the 486, so maybe you still have .386 directive at the top of your code? If so replace with .486 and bswap should be recognized.
_________________
Ignorance is bliss, knowledge is power
Back to top
View user's profile Send private message Visit poster's website
sharpe
Frequent poster
Frequent poster


Joined: 20 Mar 2005
Posts: 65

PostPosted: Fri Jan 12, 2007 3:29 pm    Post subject: Reply with quote

Hi Detten,

You were spot on. Thanks for your help Smile
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    www.reversing.be Forum Index -> Coding Corner All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
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 can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
 Copyright © 2018 BiW Reversing
 All trademarks and copyrights on this page are owned by their respective owners.
Powered By Geeklog 
Created this page in 0.07 seconds