M851 WristApp Design Guide Rev 1.2
Timex Corporation 111
ld HL, IY
; Decrement the counter.
sub [HL], A
inc HL
sbc [HL], #0
; Get the current counter data.
ld HL, [IY]
;--------------------------------------------------------------
; Check if counter data exceeds its minumum. If it exceeds
; then compute for the excess data so that it would look
; like it has wraparound.
;--------------------------------------------------------------
cp HL, #CNTMAXDATA
jr C, cntSubDataExit
jr Z, cntSubDataExit
ld HL, IY
add [HL], #@LOW(CNTMAXDATA + 1)
inc HL
adc [HL], #@HIGH(CNTMAXDATA)
cntSubDataExit:
pop IY
pop SC
ret
5.11 Creating the WristApp
This section will guide you to a series of steps to build a WristApp. At this point, it is assumed that all files
required for the wristapp has been coded (and hopefully reviewed). A WristApp Builder utility is provided
in the SDK package that will facilitate the process. The utility is located in the C:\M851\BIN directory.