M851 WristApp Design Guide Rev 1.2
Timex Corporation 98
CNTDATALOOFFSET equ 1
CNTDATAHIOFFSET equ 2
; indicates the number of bytes to be allocated in the ASD
CNTSYSTEMDATASIZE equ 3
;==============================================================================
; COUNTER APPLICATION DATABASE DATA
;==============================================================================
CNTDATABASESTARTOFFSET equ CNTSYSTEMDATASIZE
CNTDATABASEDATASIZE equ 0
;==============================================================================
; FOREGROUND VARIABLE REDEFINITIONS
;==============================================================================
CNTTempFlags equ (COREForegroundCommonBuffer + 0)
bCNTSetDirection equ 00000001B ; b0 : 0 - Change counter data.
; : 1 - Change direction.
NOTES:
APPLICATION SYSTEM DATA
Variables stored in this section will maintain its data
throughout the life of the application. Access to these
variables must be through the index access instructions
since the absolute address of the variables is determined
only during run-time.
For example:
; Set IYReg the address of the counter ASD.
ld IY, [CORECurrentASDAddress]
; load counter flag value into A register
ld A, [IY + CNTFLAGSOFFSET]
FOREGROUND VARIABLE
Variables stored in this section will be available only if
the application is the foreground application. Upon
return from a mode change or from a popup, the data
stored in this section previously must be assumed to be
destroyed.
Compared to data stored in the Application System Data
area, variables can be accessed directly. The absolute
address of the variable can be determined at design time.
For example:
; Load the data that contains the current
; setting item.
ld A, [CNTTempFlags]
bit A, #bCNTSetDirection
jr Z, cntSetDispAndReqBlinkSetData
5.10.3 Banner State Handler
The core provides a common code for the banner state handler. This handles all the requirements for a
basic banner state handler.