Forum > General
how to detect which ASM mode the compiler is in?
jamie:
I ran into a strange issue where I decided to do an online assembler...
ASm <<<< Unsupported assembler parser.
...
END:
Compiler stopped at the ASM, stating there was an unsupported assembler parser.?
Setting the compiler in the project to Default, Intel or ATT made no difference, however, setting it in source prior to the attempted assembler did.
{$ASMMODE ATT}
...all is fine
///
How can I determine the current ASM mode at the point where the compiler chokes?
I did this in a patch of code in an existing project instead of starting a new one.
Also this is FPC 3.0.4 but I am not sure if that really makes a difference here.
ASerge:
--- Quote from: jamie on November 18, 2023, 12:48:46 am ---I ran into a strange issue where I decided to do an online assembler...
ASm <<<< Unsupported assembler parser.
...
END:
Compiler stopped at the ASM, stating there was an unsupported assembler parser.?
--- End quote ---
As far as I know the asm operator is enabled in all modes.
Avinash:
not working...
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---begin {$ASMMODE INTEL} asm mov ebx,eax end; {$PUSH} {$ASMMODE ATT} asm movl %eax,%ebx end; {$POP} asm mov ebx,eax end;end.
jamie:
The only other thing I left out is that this is done with the 32-bit compiler.
it's strange this happens, I have not found the reason for it, yet.
ASerge:
--- Quote from: Avinash on November 18, 2023, 10:01:53 am ---not working...
--- End quote ---
As documented in $ASMMODE : Assembler mode (Intel 80x86 only)
These switches are local, and retain their value to the end of the unit that is compiled, unless they are replaced by another directive of the same type
Navigation
[0] Message Index
[#] Next page