[fpc-pascal] Can I compile MASM code/file in FPC?

Sven Barth pascaldragon at googlemail.com
Mon Jan 18 11:09:51 CET 2016


Am 17.01.2016 19:54 schrieb "silvioprog" <silvioprog at gmail.com>:
>
> On Sat, Jan 16, 2016 at 5:32 AM, Sven Barth <pascaldragon at googlemail.com>
wrote:
>>
>> Am 16.01.2016 04:45 schrieb "silvioprog" <silvioprog at gmail.com>:
>> >
>> > Hello,
>> >
>> > Can I compile MASM code (or files) in FPC? If so, how to declare some
MASM directives like .code, .data?, .const etc.?:
>>
>> You can't. FPC's assembler readers only support a default syntax
(usually that what GNU as supports by default) and on x86 platforms also
the Intel syntax.
>> If you want to use MASM you need to assemble it yourself and then $link
the resulting file in a unit which also provides access to the functions in
the object file using "external".
>
> Hm... I already use in that way (however as shared lib), the only cons is
that I can't debug it using Lazarus IDE. Anyway, thanks for replying! :-)

You might not be able to debug the source assembly code, but you can debug
the assembler code directly using the Assembler window. Since it's
assembler code anyway there won't be that much of a difference. And you can
display the Register window as well ;)

Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20160118/100e511e/attachment.html>


More information about the fpc-pascal mailing list