From a1d9aa1ffef915373f654a2368bcff32a09aba46 Mon Sep 17 00:00:00 2001 From: pierre Date: Tue, 9 May 2000 10:54:03 +0000 Subject: [PATCH] add code to allow calling interrupt routines --- compiler/cg386cal.pas | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/compiler/cg386cal.pas b/compiler/cg386cal.pas index 5141d0c662..bd70e3bdd7 100644 --- a/compiler/cg386cal.pas +++ b/compiler/cg386cal.pas @@ -895,7 +895,16 @@ implementation {$endif noAllocEdi} end else if not inlined then - emitcall(pprocdef(p^.procdefinition)^.mangledname) + begin + { We can call interrupts from within the smae code + by just pushing the flags and CS PM } + if (po_interrupt in p^.procdefinition^.procoptions) then + begin + emit_none(A_PUSHF,S_L); + emit_reg(A_PUSH,S_L,R_CS); + end; + emitcall(pprocdef(p^.procdefinition)^.mangledname); + end else { inlined proc } { inlined code is in inlinecode } begin @@ -1413,7 +1422,10 @@ implementation end. { $Log$ - Revision 1.130 2000-03-31 22:56:45 pierre + Revision 1.131 2000-05-09 10:54:03 pierre + add code to allow calling interrupt routines + + Revision 1.130 2000/03/31 22:56:45 pierre * fix the handling of value parameters in cdecl function Revision 1.129 2000/03/19 08:17:36 peter