opcodes

Decoding i386 opcodes to instructions

六月ゝ 毕业季﹏ 提交于 2021-01-03 10:45:18
问题 I'm trying to Is there any good resource available to learn 'decoding' of i386 opcodes? Most of the websites talk about how to encode instructions, but I don't find anywhere something telling as to how to decode opcodes to instructions. I've looked at the source code of some disassemblers, but I want some documentation as to how to decode opcodes to instructions. Thanks and Regards, Hrishikesh Murali 回答1: Read the processor manuals, they have it described, though maybe not in complete details

Decoding i386 opcodes to instructions

不问归期 提交于 2021-01-03 10:37:46
问题 I'm trying to Is there any good resource available to learn 'decoding' of i386 opcodes? Most of the websites talk about how to encode instructions, but I don't find anywhere something telling as to how to decode opcodes to instructions. I've looked at the source code of some disassemblers, but I want some documentation as to how to decode opcodes to instructions. Thanks and Regards, Hrishikesh Murali 回答1: Read the processor manuals, they have it described, though maybe not in complete details

Decoding i386 opcodes to instructions

試著忘記壹切 提交于 2021-01-03 10:33:01
问题 I'm trying to Is there any good resource available to learn 'decoding' of i386 opcodes? Most of the websites talk about how to encode instructions, but I don't find anywhere something telling as to how to decode opcodes to instructions. I've looked at the source code of some disassemblers, but I want some documentation as to how to decode opcodes to instructions. Thanks and Regards, Hrishikesh Murali 回答1: Read the processor manuals, they have it described, though maybe not in complete details

Assembly: why some x86 opcodes are invalid in x64?

北战南征 提交于 2020-07-20 10:14:05
问题 My question arises from a simple curiosity: Why in x64 some of the opcodes are invalid (06, 07 for example), whereas in x86 are used for fairly basic instructions (06 and 07 being push and pop)? I though that those simplest instructions would do nicely in both architectures. Why they disabled some of those simple instructions in x64? Why wouldn't they work? Why they disabled some opcodes, creating holes in opcode list, when they could instead assign them to x64 versions of instructions?

How to determine if a word(4 bytes) is a 16-bit instruction or 32-bit instruction?

血红的双手。 提交于 2019-12-12 15:07:18
问题 How do I know if the bytes in the word represent a 16-bit instruction or a 32-bit instruction ? I referred the ARM ARMv7M and I am not clear how to distinguish if it a 16-bit instruction or a 32-bit instruction. It says If bits [15:11] of the halfword being decoded take any of the following values, the halfword is the first halfword of a 32-bit instruction: • 0b11101 • 0b11110 • 0b11111. Otherwise, the halfword is a 16-bit instruction Does it mean that the processor always fetches halfwords,

Using C# OpCodes to emit method that returns an object

纵饮孤独 提交于 2019-12-12 03:08:25
问题 I am creating a dynamic type which has a method that I'd like to return an object. I am failing to understand how to achieve this. Here's what I have so far: // .. stuff to create type builder MethodBuilder builder = typeBuilder.DefineMethod( method.Name, MethodAttributes.Virtual | MethodAttributes.Public, method.CallingConvention, method.ReturnType, typeArray1); builder.InitLocals = true; ILGenerator gen = builder.GetILGenerator(); Object myObjectIdLikeToReturn = someMethodCall(); //gen.??(?

Is there an x86 opcode for moving an immediate byte to a direct memory location (without using registers)?

只谈情不闲聊 提交于 2019-12-09 08:04:07
问题 Is there a way to 'mov'e a specific immediate byte-size number into a direct memory location? I.e. MOV 10h,ffffh to write the value 16 into the memory address 65535 ? If so, which opcode is that, orwould I have to store a memory address into a register first? 回答1: Yes. The opcode is C6 . You should download a copy of the Intel ISA documents, which are freely available. To your follow-up question: the full encoding of your example is: c6 04 25 ff ff 00 00 10 opcode modr/m sib address immediate

Android smali question

余生长醉 提交于 2019-12-04 13:51:33
问题 I'm currently doing some research on smali/"code obfuscator" and I'm trying to get familar with the decompiled source codes at the moment. For this I created a simple app and decompiled it by smali. I'm trying to understand the decompiled source code now to improve and compare the security (against decompiling) after using a code obfuscator later. While most of the smali source code is not that difficult, I'm still having sometimes problems with the format conversion of figures. May you

How is code stored in the EXE format?

萝らか妹 提交于 2019-11-30 21:35:12
My questions are as follows: How does the Portable Executable format (on windows/unix) relate to the x86/x64 instruction set in general? Does the PE format store the exact set of opcodes supported by the processor, or is it a more generic format that the OS converts to match the CPU? How does the EXE file indicate the instruction set extensions needed (like 3DNOW! or SSE/MMX?) Are the opcodes common across all platforms like Windows, Mac and unix? Intel i386 compatible CPU chips like ones from Intel and AMD use a common instruction set. But I'm sure ARM-powered CPUs use different opcodes. Are

How is code stored in the EXE format?

ⅰ亾dé卋堺 提交于 2019-11-30 17:15:09
问题 My questions are as follows: How does the Portable Executable format (on windows/unix) relate to the x86/x64 instruction set in general? Does the PE format store the exact set of opcodes supported by the processor, or is it a more generic format that the OS converts to match the CPU? How does the EXE file indicate the instruction set extensions needed (like 3DNOW! or SSE/MMX?) Are the opcodes common across all platforms like Windows, Mac and unix? Intel i386 compatible CPU chips like ones