flat assembler
Message board for the users of flat assembler.

Index > Main > convert inc file!

Author
Thread Post new topic Reply to topic
Kenny80



Joined: 08 May 2005
Posts: 22
Kenny80
Not sure where to post this!

this is sha1,inc from witeg's homepage, i changed macro lines to more fasm friendly but still it complains about some lines

everytime i try use this inc file in program i get following error:

Error invalid address

lea ebp,[ebp+esp+05A827999h]

sha1.inc(161)
sha1.inc(27)

line (161) is Trans_0 eax,ebx,ecx,edx,ebp,dword [_temp_buffer+4*0]
and
line (27) is lea argument_5, [argument_5+esp+05A827999h]

i added file here, anyone who can help me point out error?


Description:
Download
Filename: sha1.inc
Filesize: 14.29 KB
Downloaded: 146 Time(s)

Post 30 Oct 2005, 08:17
View user's profile Send private message Reply with quote
Reverend



Joined: 24 Aug 2004
Posts: 408
Location: Poland
Reverend
Try to change it:
line (27) is lea argument_5, [esp+argument_5+05A827999h]

Just place esp on first position. I am not sure if it works, but I guess it may help.
Post 01 Nov 2005, 09:02
View user's profile Send private message Visit poster's website Reply with quote
Kenny80



Joined: 08 May 2005
Posts: 22
Kenny80
...omfg...sometimes u just want put gun to my head blow brain out, so simple solution.....it worked btw!
Post 01 Nov 2005, 13:12
View user's profile Send private message Reply with quote
Reverend



Joined: 24 Aug 2004
Posts: 408
Location: Poland
Reverend
It is because of specific opcode encoding. When using combinations of two registers eg. [eax+edx], even that it is the same as [edx+eax] they're encoded in different way. But esp is an exception and can be encoded only in one way, and so we cannot have [esp*2] or [esp+esp]. This register can only be as a base register (on a first position).

But btw. fasm should in my opinion know if it's esp, and choose apriopriate encoding. Will it be ever made or is such situation part of creation principles, and we all have to learn to put esp on first position? Smile
Post 01 Nov 2005, 14:50
View user's profile Send private message Visit poster's website Reply with quote
Kenny80



Joined: 08 May 2005
Posts: 22
Kenny80
source is free, i'm not that good at asm to take on task, but would really be handy i agree
Post 01 Nov 2005, 19:15
View user's profile Send private message Reply with quote
Reverend



Joined: 24 Aug 2004
Posts: 408
Location: Poland
Reverend
Yes, but the question was rather aimed at Privalov Cool
Post 02 Nov 2005, 11:45
View user's profile Send private message Visit poster's website Reply with quote
Kenny80



Joined: 08 May 2005
Posts: 22
Kenny80
btw are u same reverend at R A G? (Reformed Asm Group)?
Post 02 Nov 2005, 12:10
View user's profile Send private message Reply with quote
Reverend



Joined: 24 Aug 2004
Posts: 408
Location: Poland
Reverend
Kenny80: Yes, I am. Nice to know that I'm recognized in the webspace Wink
Post 02 Nov 2005, 17:32
View user's profile Send private message Visit poster's website 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-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.