Board index » delphi » DNQ - handling interrupts within unit?

DNQ - handling interrupts within unit?

On Thu, 25 Mar 1999 04:54:27 GMT, d_oben...@mindspring.com (Dave

Quote
Obenauf) wrote:
> Dumb Newbie question:
>    Is there any way to use an interrupt handler that's contained
> in a unit. I inherited some code that has an interrupt handler within
> a unit, but the main program makes no use of it, and I'd like to
> change that. The handler looks something like this:

> procedure Int_Handler ; interrupt;
>    begin
>            (inline
>            blah
>            blah)
>    end;

If the unit looks like this

unit u;
interface
implementation
procedure Int_Handler ; interrupt;
begin (**) end;
end.

i.e. if the interrupt procedure is referred to only in the
implementation part of the unit, change this to

unit u;
interface
procedure Int_Handler ; interrupt; { interface declaration }
implementation
procedure Int_Handler;             { no 'interrupt' here }
begin (**) end;
end.

Regards
Horst

 

Re:DNQ - handling interrupts within unit?


Thanks a bunch!

Dave

Quote
Horst Kraemer wrote:

[snip]

> i.e. if the interrupt procedure is referred to only in the
> implementation part of the unit, change this to

> unit u;
> interface
> procedure Int_Handler ; interrupt; { interface declaration }
> implementation
> procedure Int_Handler;             { no 'interrupt' here }
> begin (**) end;
> end.

> Regards
> Horst

Other Threads