flat assembler
Message board for the users of flat assembler.
Index
> Main > Length disassembler |
Author |
|
SFeLi 17 Oct 2009, 05:20
Intel IA-32 Manual Volume 2b has a table listing all instructions and their operand types. You need to construct a light version of such table in your disassembler: an opcode and flags for its type(start of the 2-byte opcode, prefix, invalid) and its operands (modrm, displacement, immediate) etc. As for SIB you just need to examine modrm byte to check if SIB is present.
|
|||
17 Oct 2009, 05:20 |
|
Gyver 17 Oct 2009, 09:26
I suggest you to read and download the beaengine.lib!
http://beatrix2004.free.fr/ If i remeber right, there're 2 pdf documents that explain very well how decode instructions! Good lectures! |
|||
17 Oct 2009, 09:26 |
|
TheLord 17 Oct 2009, 10:27
Hi,
Thanks for answering. SFeLi, thanks for the advice, that's also what I found out, by reading some stuff. I thought there would be a way to determine which field are used by which instruction with a byte mask in the opcode, or a logical operation to determine if ... or something like that. Gyver thanks, (are you french?) I already read the pdf, It was not explaining how to determine if field are used, I did not check the source code that Beatrix gives with, maybe I should ! |
|||
17 Oct 2009, 10:27 |
|
TheLord 19 Oct 2009, 09:46
hi,
Just for confirming, there is no possibility for an instruction to have a SIB without modR/M right ? all things lead me to this conclusion, but it would be better for me to get a confirmation thanks |
|||
19 Oct 2009, 09:46 |
|
MazeGen 19 Oct 2009, 10:05
SIB can be referred only through R/M field of ModR/M byte.
|
|||
19 Oct 2009, 10:05 |
|
TheLord 19 Oct 2009, 11:17
Thanks, I did not noticed that the disp was in fact included in the SIB like this one :
MOV DL,BYTE[DS:SI+0xFF] I was counting a SIB + a 1 byte disp which was wrong. btw, does any one know how I can test a length disassembler against all possible instructions ? is there any tool ? any file that contains all inst etc ? Thanks |
|||
19 Oct 2009, 11:17 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.