Program On_Interval_Gosub; {$I wrtvram.inc } {$I time.inc } {$I interrup.inc } Procedure PrintTime(Column,Row:Byte); Var time :String[8]; Begin Time := GetTime; WriteVram(0,column+Row*80,Addr(Time[1]),8); End; Procedure InterruptServiceRoutine; Begin PrintTime(26,10); Inline($f3); End; Begin SetInterrupt(Addr(InterruptServiceRoutine),50); ClrScr; Writeln('**** Testing interrupt service routine **** '); Writeln; Writeln('Hooked $0038 interrupt by Kari Lammassaari.'); Writeln; Writeln(' Input prevents DOS-interrupt ! '); GotoXY(1,11); Write('Interrupt driven time =>'); GotoXY(1,14); Write('Press a key to exit ! '); Repeat {This is the program loop . } Until KeyPressed; RemoveInterrupt; { DON'T FORGET THIS ! } End.