flat assembler
Message board for the users of flat assembler.

Index > Main > Help me please to encode these opcodes (SOLVED)

Author
Thread Post new topic Reply to topic
hopcode



Joined: 04 Mar 2008
Posts: 563
Location: Germany
hopcode
I have solved the trouble by reading
AMD docs (a bit more straightforward)
Thanks

After reading this
http://board.flatassembler.net/topic.php?t=2525
and
http://board.flatassembler.net/topic.php?t=3838
I have yet difficoulty to encode this opcodes.
Please check my logic, wether correct or misunderstanding

Following intel docs and tables on sandpile.org
i will try to encode/understand these instructions:
Code:
1) ADD ECX,[mem32] ; 03 0D 1F204000
2) ADD ECX,7       ; 83 C1 07
3) ADD CL,7        ; 80 C1 07
4) ADD ECX,EAX     ; 01 C1
5) ADD CX,7        ; 66 83 C1 07
    


Thank you in advance for your help

hopcode


Last edited by hopcode on 16 Jun 2009, 21:28; edited 1 time in total
Post 15 Jun 2009, 23:30
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17475
Location: In your JS exploiting you and your system
revolution
This is why we use assemblers, to do all the tedious work for us Razz

Although, maybe MazeGen can help you to encode. Laughing
Post 15 Jun 2009, 23:39
View user's profile Send private message Visit poster's website Reply with quote
hopcode



Joined: 04 Mar 2008
Posts: 563
Location: Germany
hopcode
revolution wrote:
MazeGen can help you to encode Laughing

MazeGen reloaded.. Laughing
But seriously, i am trying to build a Lenght Disassembly Engine.
MazeGen, please could you help me to encode these opcodes ?

Regards,
hopcode
Post 16 Jun 2009, 00:02
View user's profile Send private message Visit poster's website Reply with quote
arigity



Joined: 22 Dec 2008
Posts: 45
arigity
perhaps this will help?
Post 16 Jun 2009, 00:12
View user's profile Send private message Reply with quote
windwakr



Joined: 30 Jun 2004
Posts: 827
Location: Michigan, USA
windwakr
You've got ecx and cx mixed up in your examples. "ADD CX,7" is 83 C1 07, and "ADD ECX,7" is 66 83 C1 07.

EDIT: The others are wrong too,

Code:
ADD ECX,[mem32] should be 67 66 03 0D 1F 20 40 00
ADD ECX,EAX should be 66 01 C1
    
Post 16 Jun 2009, 01:23
View user's profile Send private message Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4633
Location: Argentina
LocoDelAssembly
Quote:

You've got ecx and cx mixed up in your examples. "ADD CX,7" is 83 C1 07, and "ADD ECX,7" is 66 83 C1 07.


windwakr, $66 is a prefix for operand size override and $67 is for memory address size override. What you comment is true provided you are assembling for 16-bit, for 32-bit using those overrides would make the processor use half of the bits.
Post 16 Jun 2009, 01:50
View user's profile Send private message Reply with quote
hopcode



Joined: 04 Mar 2008
Posts: 563
Location: Germany
hopcode
arigity wrote:
perhaps this will help?


Thanks, i know it. THAT LDE is one of the best lde.
I know a HDE and
a MDE (with table compression)
and
the ADE32.

I want try to find the best method to organize intel tables.
Hints are welcome.
Post 16 Jun 2009, 02:04
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.