Reactive la syntaxe Nasm en compilation et ajoute le détail en désassemblage
This commit is contained in:
parent
7c57e86f81
commit
cb1cbae9c9
2
ia86.cpp
2
ia86.cpp
|
@ -336,6 +336,7 @@ void Desassembler::Desassemble(uint8_t *content, uint32_t address,uint32_t size,
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
srcsize=cs_disasm(handle, content, size, address, 0, &insn);
|
srcsize=cs_disasm(handle, content, size, address, 0, &insn);
|
||||||
|
cs_option(handle, CS_OPT_DETAIL, CS_OPT_ON);
|
||||||
if (srcsize == 0)
|
if (srcsize == 0)
|
||||||
throw Error("Désassembleur - désassemblage.....................[ERREUR]");
|
throw Error("Désassembleur - désassemblage.....................[ERREUR]");
|
||||||
else
|
else
|
||||||
|
@ -384,6 +385,7 @@ Assembler::Assembler(TextWindow *log) : log(log)
|
||||||
{
|
{
|
||||||
log->append(e.what());
|
log->append(e.what());
|
||||||
}
|
}
|
||||||
|
ks_option(ks, KS_OPT_SYNTAX, KS_OPT_SYNTAX_NASM);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<Code> Assembler::MultiAssemble(std::string source,uint32_t address)
|
std::vector<Code> Assembler::MultiAssemble(std::string source,uint32_t address)
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
inc dx
|
inc dx
|
||||||
mov esi,0x44440234
|
mov esi,0x44440234
|
||||||
hlt
|
hlt
|
||||||
|
jmp 0x14D
|
||||||
.org 0x8D
|
.org 0x8D
|
||||||
mov es,ax
|
mov es,ax
|
||||||
.org 0x14D
|
.org 0x14D
|
||||||
|
|
Loading…
Reference in New Issue