M851 WristApp Design Guide Rev 1.2
Timex Corporation 104
cntSetStateModeDepressEvent:
cntSetStateStopResetDepressEvent:
;**************************************************************
; STOP/RESET & MODE DEPRESS
;**************************************************************
; Load the address to HLReg and toggle the set direction flag.
ld HL, #CNTTempFlags
xor [HL], #bCNTSetDirection
;--------------------------------------------------------------
; Clear the entire display.
;--------------------------------------------------------------
LCD_CLR_DISPLAY
;--------------------------------------------------------------
; Refresh the display and request blinking on the editable field.
;--------------------------------------------------------------
jr cntSetRedisplayAndReqBlink ; **EXTERNAL JUMP
cntSetStateCWPulseEvent:
;**************************************************************
; CW PULSE (Increment Field Value)
;**************************************************************
; Check the item to be set.
ld HL, #CNTTempFlags
bit [HL], #bCNTSetDirection
jr NZ, cntSetStateToggleDirection
;--------------------------------------------------------------
; Add counter data by acceleration value.
; Destroys BAReg, IXReg, HLReg.
; Input: IYReg - ASD address
; COREEventArgument - Number of pulses
;--------------------------------------------------------------
car cntAddDataByAcceleration
;--------------------------------------------------------------
; Refresh the display and request blinking on the editable field.
; Destroys BAReg, HLReg, IXReg.
; Input: IYReg - ASD address.
;--------------------------------------------------------------
jr cntSetRedisplayAndReqBlink ; **EXTERNAL JUMP
cntSetStateCCWPulseEvent:
;**************************************************************
; CCW PULSE (Decrement Field Value)
;**************************************************************
; Check the item to be set.
ld HL, #CNTTempFlags
bit [HL], #bCNTSetDirection
jr NZ, cntSetStateToggleDirection
;--------------------------------------------------------------
; Subtract counter data by acceleration value.
; Destroys BAReg, IXReg.
; Input: IYReg - ASD address
; COREEventArgument - Number of pulses
;--------------------------------------------------------------
car cntSubDataByAcceleration
;--------------------------------------------------------------
; Refresh the display and request blinking on the editable field.
; Destroys BAReg, HLReg, IXReg.
; Input: IYReg - ASD address.