Timex M851 Watch User Manual


 
M851 WristApp Design Guide Rev 1.2
Timex Corporation 108
; Load the data that contains the current setting item.
ld A, [CNTTempFlags]
bit A, #bCNTSetDirection
jr Z, cntSetDispAndReqBlinkSetData
; Change the couting direction.
; Display "COUNT DOWN" or "COUNT UP" and "Arrow Down" or
; "Arrow Up" on main DM and SDM respectively.
car cntDisplayCountDirection
; Setup the routines to be called for blinking.
LCD_WRITE_4HZ_GEN_BLINK_DISP_ROUTINE_ADDR cntDisplayCountDirection
LCD_WRITE_4HZ_GEN_BLINK_CLR_ROUTINE_ADDR cntClearL2AndSDM
ret
cntSetDispAndReqBlinkSetData:
; Change the counter value.
; Displays the counter data on the main dot matrix using large
; fonts.
car cntDisplayCounterData
; Display "SET" on 9 segment.
LCD_DISP_SEG_MSG_SET
; Setup the routines to be called for blinking.
LCD_WRITE_4HZ_GEN_BLINK_DISP_ROUTINE_ADDR cntDisplayCounterData
LCD_WRITE_4HZ_GEN_BLINK_CLR_ROUTINE_ADDR lcdClearMainDM
ret
5.10.9 Utility Routines
The following is the code for the Counter utility routines.
cntAddDataBy1
IF @DEF('SUBROUTINE')
UNDEF SUBROUTINE
ENDIF
DEFINE SUBROUTINE "'cntAddDataBy1'"
GLOBAL cntAddDataBy1
cntAddDataBy1:
push SC
; Use decimal addition.
UTL_DECIMAL_MATH_MODE
; Value to be added to the counter data.
ld A, #01h
; Compute the new counter data.
; Popping of SCReg is done inside the routine.
jr cntAddDataBy1EntryPoint
cntAddDataByAcceleration
IF @DEF('SUBROUTINE')
UNDEF SUBROUTINE
ENDIF
DEFINE SUBROUTINE "'cntAddDataByAcceleration'"