5 _debug_str_: String = '';
7 procedure TimerSetup(Hz: Longint);
9 procedure TimerInstallHandler(handler: Pointer);
10 procedure TimerRemoveHandler;
17 oldint08: {$IFDEF __TMT__} FarPointer
23 clock_ticks,clock_flag: Word;
27 timer_handler: Pointer = NIL;
29 procedure int08; interrupt;
33 cmp word ptr timer_handler,0
35 cmp word ptr timer_handler+2,0
40 @@2: mov ax,word ptr ticks
41 mov bx,word ptr ticks+2
45 mov word ptr ticks+2,bx
79 procedure DisableTimerIRQ; assembler;
86 procedure EnableTimerIRQ; assembler;
93 procedure TimerSetup(Hz: Longint);
95 _debug_str_ := 'TIMERINT.PAS:TimerSetup';
96 If (Hz < 19) then Hz := 19;
97 If (Hz > 1193180) then Hz := 1193180;
99 counter := 1193180 DIV Hz;
100 clock_flag := Hz*1000 DIV 18206;
116 SetIntVec($08,newint08);
122 _debug_str_ := 'TIMERINT.PAS:TimerDone';
132 SetIntVec($08,oldint08);
136 procedure TimerInstallHandler(handler: Pointer);
138 _debug_str_ := 'TIMERINT.PAS:TimerInstallHandler';
140 timer_handler := handler;
144 procedure TimerRemoveHandler;
146 _debug_str_ := 'TIMERINT.PAS:TimerRemoveHandler';
148 timer_handler := NIL;
153 GetIntVec($08,oldint08);