Hello,

is there a document or sample code for accessing the timer interrupt and the 
serial interrupt in DOS mode.

Rainer


This does not work:

program time;

uses crt,dos;

var timervar:longint;

procedure hardtime; interrupt;
begin
 inc(timervar);
end;

var htimeivecbak : pointer;  // Interrupt Vector
const int_vectime = $1c;

procedure starttim;
begin
 timervar:=0;
 getintvec(int_vectime,htimeivecbak);
 setintvec(int_vectime,@hardtime);
end;

procedure stoptim;
begin
 setintvec(int_vectime,htimeivecbak);
end;

begin
 starttim;
 repeat
  writeln(timervar);
 until keypressed;
 readkey;
 stoptim;
end.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to