Timex M851 Watch User Manual


 
M851 WristApp Design Guide Rev 1.2
Timex Corporation 106
5.10.8 Display Routines
The following is the code for the Counter display routines.
cntDisplayArrowOnSDM
cntDisplayArrowDownOnSDM
cntDisplayArrowUpOnSDM
IF @DEF('SUBROUTINE')
UNDEF SUBROUTINE
ENDIF
DEFINE SUBROUTINE "'cntDisplayArrowOnSDM'"
GLOBAL cntDisplayArrowOnSDM
GLOBAL cntDisplayArrowDownOnSDM
GLOBAL cntDisplayArrowUpOnSDM
cntDisplayArrowOnSDM:
; Get the status flags.
ld A, [IY + CNTFLAGSOFFSET]
; Check the counting direction.
bit A, #bCNTCountDown
jr Z, cntDisplayArrowUpOnSDM
cntDisplayArrowDownOnSDM:
; Load the character to be displayed.
ld L, #DM5_DOWNARROW
jr cntDispArrowOnSDMDisplay
cntDisplayArrowUpOnSDM:
; Load the character to be displayed.
ld L, #DM5_UPARROW
cntDispArrowOnSDMDisplay:
;--------------------------------------------------------------
; Display proportional width character.
; Destroys BAReg, HLReg, IXReg.
; Input: LReg - Characer to be displayed.
; IXReg- Starting DM column.
;--------------------------------------------------------------
ld IX, #LCDUPPERDMCOL1
LCD_DISP_SMALL_PROP_WIDTH_DM_CHAR
ret
cntDisplayCounterData
IF @DEF('SUBROUTINE')
UNDEF SUBROUTINE
ENDIF
DEFINE SUBROUTINE "'cntDisplayCounterData'"
GLOBAL cntDisplayCounterData
cntDisplayCounterData:
;--------------------------------------------------------------
; Display a large-font, 3-digit DM data with zero suppression
; on leading digit positions.
; Destroys BAReg, HLReg, IXReg.
; Input: BReg - 100's digit BCD data.
; AReg - Packed 10's and 1's digit BCD data.
; IXReg- Starting DM column.