[fpc-pascal] Interface with NASM

Felipe Monteiro de Carvalho felipemonteiro.carvalho at gmail.com
Wed Sep 15 09:32:11 CEST 2010


I changed it to a very similar program, but one which can be built
with a single instruction:

program driver;

uses asmio;

{$ASMMODE Intel}

procedure tes; assembler; [alias:'tes'];
asm
 push ebp
 mov  ebp,esp
 mov  EAX,65
 push EAX
 call printc
 leave
 ret
end;

begin
 tes;
end.

It crashes inside printc apparently when getting the parameter.

-- 
Felipe Monteiro de Carvalho



More information about the fpc-pascal mailing list