Product specifications

2. Every 1/50
th
of a second the variable ONE50 is set to one and can be used
for delay loop timing.
3. By using a variable called CLRCLK you have the following:
A) CLRCLK = 0 – No action taken
B) CLRCLK = 1 – Clear CLOCK. Time is ’00 00 00’
C) CLRCLK = 2 – CLOCK is set to time contained
within 6 byte table TIMSET.
;
;SEVCLK – INTERRUPT SERVICING ROUTINE SECTION
; IM 2 – POINTER TABLE IJTABLE SET UP USING CODE
; LISTED IN SECTION 3.3
;
; ROUTINE MAINTAINS 6 DIGIT HUNDRED HOUR CLOCK
;
; USES REFERENCE TABLE HELD IN CDATA (CLOCK DATA)
;
; ALSO CONTROL VARIABLE CLRCLK
;
; NO PARAMETERS REQUIRED ON ETRY
; REGISTERS AFFECTED ON EXIT ARE AF, BC, DE AND HL
;
CLOCK:
HOURS: DB 30H,30H ;(see description above)
MINS: DB 30H,30H ;(see description above)
SECS: DB 30H,30H ;(see description above)
WIDGET: DB 30H ;1/50
th
of a second widget
;counter
ONE50: DB 0 ;see description above
CDATA: DB ‘99’,’59’, ’59’ ;set up clock counter reference
DB ‘0’ + 49 ;data
TIMSET: DB ‘1’, ‘1’, ‘3’, ‘4’ ;6 byte table used to reset
DB ‘5’, ‘6’, ;table CLOCK to some specific
;time when CLRCLK = 2
CLRCLK: DB 0 ;see description above
;
SEVCLK: LD A,1 ;set 1/50
th
second counter to 1
LD (ONE50),A
LD A,(CLRCLK) ;Check value of CLRCLK.
CP 0 ;and drop through to SEVCL2
JP NZ,SEVCL5 ;else goto SEVCL5
SEVCL2: LD DE,CLOCK+6 ;Increment clock by 1/50
th
LD HL,CDATA+6 ;of a second using one hundred
LD B,7 ;hour reference values in table
SEVCL3: LD A,(DE) ;CDATA
CP (HL)
JR C,SEVCL4
;
SEVC3A: LD A, ‘0’-1
SEVCL4: INC A