flat assembler
Message board for the users of flat assembler.
Index
> Compiler Internals > 'mov eax, cs' (possibly bug) |
Author |
|
Tomasz Grysztar 14 Aug 2006, 14:50
No, "MOV AX,CS" and "MOV EAX,CS" are two different instructions. It was never documented properly by Intel manuals, but the AMD ones do it well.
|
|||
14 Aug 2006, 14:50 |
|
MazeGen 14 Aug 2006, 17:00
Intel documents it very well:
Quote:
|
|||
14 Aug 2006, 17:00 |
|
Tomasz Grysztar 14 Aug 2006, 17:52
But they don't define distinct operand forms for those instructions and thus this feature is not visible in general reference (see attached pic).
fasm uses the syntax as defined by AMD - so you've got "mov eax,ds" and "mov ax,ds", but only "mov ds,ax" in reverse direction (and so fasm doesn't fit into "the most assemblers" mentioned by Intel). There is also a similar story with the LAR and LSL instructions.
|
||||||||||
14 Aug 2006, 17:52 |
|
MazeGen 14 Aug 2006, 18:06
You're right, Intel is too brief in this reference.
On the other side, AMD often doesn't mention some important features of an instruction. For instance, POP [ESP] first increments ESP, then stores. AMD doesn't say anything about it. |
|||
14 Aug 2006, 18:06 |
|
Madis731 15 Aug 2006, 07:38
Conclusion? You need both manuals and some common sence?
|
|||
15 Aug 2006, 07:38 |
|
TDCNL 18 Aug 2006, 12:21
It's clear now
Btw I didn't look deeply into FASM manual yet but is this behaviour documented? _________________ :: The Dutch Cracker :: |
|||
18 Aug 2006, 12:21 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.