Recent

Author Topic: Forcing FPC to output assembler listing using Intel Syntax.  (Read 4379 times)

Xor-el

  • Sr. Member
  • ****
  • Posts: 411
Forcing FPC to output assembler listing using Intel Syntax.
« on: December 26, 2016, 05:08:41 pm »
Hello,
does anyone know how to force FPC to output assembler listing using Intel Syntax?
by default, it outputs it using Att syntax.

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: Forcing FPC to output assembler listing using Intel Syntax.
« Reply #1 on: December 26, 2016, 05:19:52 pm »
add masm as your output format
Code: [Select]
fpc -al -Amasm yourprogram.pas

Xor-el

  • Sr. Member
  • ****
  • Posts: 411
Re: Forcing FPC to output assembler listing using Intel Syntax.
« Reply #2 on: December 26, 2016, 05:22:51 pm »
add masm as your output format
Code: [Select]
fpc -al -Amasm yourprogram.pas

thanks for your response but is there a simple switch to enable this from Lazarus?

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: Forcing FPC to output assembler listing using Intel Syntax.
« Reply #3 on: December 26, 2016, 06:23:14 pm »
In Lazarus:
Project Options -> Custom Options

add -Amasm into "Custom Options" field

Xor-el

  • Sr. Member
  • ****
  • Posts: 411
Re: Forcing FPC to output assembler listing using Intel Syntax.
« Reply #4 on: December 26, 2016, 07:04:52 pm »
In Lazarus:
Project Options -> Custom Options

add -Amasm into "Custom Options" field

done that.
thanks a lot.
now I get another error

assembler masm.exe not found, switching to external assembling

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: Forcing FPC to output assembler listing using Intel Syntax.
« Reply #5 on: December 26, 2016, 08:28:39 pm »
just add "-sh" into the same Compiler Options (right after -Amasm)
...
you won't get a compiled executable, though

Xor-el

  • Sr. Member
  • ****
  • Posts: 411
Re: Forcing FPC to output assembler listing using Intel Syntax.
« Reply #6 on: December 26, 2016, 09:44:21 pm »
thanks a lot.  :)

 

TinyPortal © 2005-2018