Function set_pm_interrupt (vector : byte; const intaddr : tseginfo) : boolean;
Sets the address of the protected mode handler for an interrupt
Parameters:
Return values: True if successful, false otherwise.
Notes: The address supplied must be a valid selector:offset protected mode address.
Check int31error variable
get_pm_interrupt, set_rm_interrupt, get_rm_interrupt
Program int_pm;
uses crt, go32;
const int1c = $1c;
var oldint1c : tseginfo;
newint1c : tseginfo;
int1c_counter : Longint;
{$ASMMODE DIRECT}
procedure int1c_handler; assembler;
asm
cli
pushw %ds
pushw %ax
movw %cs:INT1C_DS, %ax
movw %ax, %ds
incl _INT1C_COUNTER
popw %ax
popw %ds
sti
iret
INT1C_DS: .word 0
end;
var i : Longint;
begin
newint1c.offset := @int1c_handler;
newint1c.segment := get_cs;
get_pm_interrupt(int1c, oldint1c);
asm
movw %ds, %ax
movw %ax, INT1C_DS
end;
Writeln('-- Press any key to exit --');
set_pm_interrupt(int1c, newint1c);
while (not keypressed) do begin
gotoxy(1, wherey);
write('Number of interrupts occured : ',
int1c_counter);
end;
set_pm_interrupt(int1c, oldint1c);
end.