Board index » delphi » RTC interruption
Dominiqu
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
|
Dominiqu
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
RTC interruption
I'd like to use the periodic interruption from the RTC. Does it alreday
exist a unit that manage RTC interruption ? Thanks. Dominique |
Dr John Stockto
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:RTC interruptionJRS: In article <3990EAB5.A9846...@loaser.univ-lille1.fr> of Wed, 9 Aug 2000 07:23:01 seen in news:comp.lang.pascal.borland, Dominique Quote<m...@loaser.univ-lille1.fr> wrote: program that does that; you might be able to adapt it. -- |
ThePascalDocto
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:RTC interruptionIn article <Dk$8lpFEpck5E...@merlyn.demon.co.uk>, Dr says... Quote
-------------------begin unit---------------- { Quote} USES DOS; TYPE CONST Procedure Enable(rate:IpsType; var rt:integer); Procedure Disable(var rt: integer); Function systimer: Longint; IMPLEMENTATION CONST Procedure Int70ISR; assembler; push ax mov al,0Ch { Reset interrupt at timer by reading Register C } mov ax, seg @DATA {Get Turbo data segment} {here's the RTC counter/timer:} mov al,20H {EOI} pop ds iret end; Procedure Enable; Begin rt:=-1; {set error as default; clear if successful} If Int70Active then Exit; { Initialize RT clock vectors } asm cli end; { Enable periodic interrupts from real-time clock } { Enable Int70 } rt:=0; {success} End; Procedure Disable; Begin rt:=-1; {set error as default; clear if successful} asm cli end; { Disable Int70 } SetIntVec($70,OldInt70); OldInt70 := NIL; Int70Active:=FALSE; End; VAR BEGIN SaveExit := ExitProc; { Set up exit procedure } END. --------------begin test program-------------------- var begin enable(ips1024,rt); repeat end. No charge. |