flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
revolution 20 Oct 2014, 00:44
RIxRIpt wrote: What's the difference between these two RIxRIpt wrote: And why are there two ways to define the same instruction with the same arguments RIxRIpt wrote: P.S. Are there more examples of such thing? (different bytes, the same instruction) |
|||
![]() |
|
RIxRIpt 20 Oct 2014, 10:31
![]() Yes, according to this table: http://ref.x86asm.net/coder32.html#x89 89h is r/m16/32 -> r16/32 and 8Bh is r16/32 -> r/m16/32 |
|||
![]() |
|
DOS386 26 Oct 2014, 05:30
> P.S. Are there more examples of such thing?
> (different bytes, the same instruction) YES, extremely many. 1. This had been discussed already 1'000'000'000'000 times, see FAQ 2. One assembler (A86/A386 by Eric Isaacson) uses this "feature" : "a86.zip\A86MANU.TXT" wrote:
Enjoy ![]() |
|||
![]() |
|
El Tangas 05 Dec 2014, 23:54
Yes, you can use this redundancy sometimes to identify the assembler that created some piece of code. There are even encodings that do not have the same length:
Code: XCHG EAX, ECX; 91h / 87C8h There are also many nonsense encodings, like: Code: LEA EAX, ECX; 8DC8h The source operand of LEA must be an address, so this is meaningless, but you can encode it ![]() |
|||
![]() |
|
revolution 06 Dec 2014, 13:52
El Tangas wrote: There are also many nonsense encodings, like: |
|||
![]() |
|
El Tangas 06 Dec 2014, 21:51
revolution wrote:
I thought it would always just cause a fault because it has no meaning for the CPU. What does it encode on modern CPU's ![]() |
|||
![]() |
|
revolution 06 Dec 2014, 22:51
To see the encoding maps you can use the encodings tables in the Intel or AMD manuals. The reason I am not stating the instruction is because I don't know what it is. It might still be nothing right now, but perhaps tomorrow it will be defined as an AVX1024 extension or something. Or perhaps it already is an AVX256 extension. The point being that you can never rely upon invalid encodings to always be invalid.
|
|||
![]() |
|
JohnFound 07 Dec 2014, 07:33
revolution wrote:
BTW, this instruction has some rational meaning. it could load the address of the register in the register memory: eax=0, ecx=1, edx=2 and so forth. Unfortunately, if was not implemented. _________________ Tox ID: 48C0321ADDB2FE5F644BB5E3D58B0D58C35E5BCBC81D7CD333633FEDF1047914A534256478D9 |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.