[fpc-pascal] Interface with NASM

Matthias K. makadev at googlemail.com
Tue Sep 14 21:31:07 CEST 2010

I've played around with your code and didn't get usefull results
either at first glance. Instead of putting the
printc test into driver, I've wrote a pure pascal unit which does the
same as your test.asm, compiled it, disassembled it and modfied the
nasm program. That worked.

I'm on a different target machine and pascal calling convention
doesn't work at all so this may not be usefull for you, but at least
there is a chance it may be, so here is the pure pascal test.asm. If
this doesn't link correctly it may be another Problem (!so Compiler
Version/svn revision and Target would be good to know!)

unit testp;


procedure tes; pascal;


procedure printchar( c: Char ); pascal; external name 'printc';

procedure tes; pascal; [public, alias: 'tes'];
  printchar( 'A' );


Btw. It would be very interesting to know the solution for your
Problem if its already fixed :)

More information about the fpc-pascal mailing list