$ASMMODE directive
About page: https://www.freepascal.org/docs-html/prog/progsu3.html
Related to: #38550 (closed)
Default
These lines seem a little contradictory:
default - Tells the compiler to use the default assembler style for the current platform.
The default assembler reader is the AT&T reader.
As my quick tests showed (on Windows x86), "platform style" is never used and AT&T
style is always used.
Priority
Also, nothing is said about the priority of the ASMMODE
-directive and the compiler option (-R
).
It seems like the directive should take precedence, and it usually does. However, if you write code in the "intel"-style with the {$ASMMODE default}
directive, and set the intel
style in the options, then everything will compile, although {$ASMMODE default}
implies AT&T
.
It turns out that the directive always takes precedence, but default
means "take the value from the options"? Then there is no point in writing it.
Modes
I found a couple of comments that explain that this also depends on the compatibility mode (delphi, TP):