******************************************************************** * Clock - OS-9 Level One V2 Clock module * * $Id: clock.asm,v 1.1.1.1 2001/02/21 23:30:52 boisy Exp $ * * NOTE: This clock is TOTALLY VALID for ALL DATES between 1900-2155 * * Ed. Comments Who YY/MM/DD * ------------------------------------------------------------------ * 5 Tandy/Microware original version * 6 Modified to handle leap years properly for BGP 99/05/03 * 1900 and 2100 A.D. nam Clock ttl OS-9 Level One V2 Clock module ifp1 use defsfile endc tylg set Systm+Objct atrv set ReEnt+rev rev set $01 edition set $06 TimerPort set $e030 TkPerSec set 60 TkPerTS equ TkPerSec/10 ticks per time slice mod eom,name,tylg,atrv,ClkEnt,size size equ . name fcs /Clock/ fcb edition SysTbl fcb F$Time fdb FTime-*-2 fcb $80 ClockIRQ ldx #TimerPort lda ,x bita #$10 bne L00B4 L00AE jsr [>D.Poll] poll ISRs bcc L00AE keep polling until carry set jmp [>D.AltIRQ] jump into an alternate IRQ if available L00B4 ldb #$8f start timer stb ,x dec D.Clock] ClkEnt equ * ldd #59*256+$01 last second and last tick std