summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfishsoupisgood <github@madingley.org>2019-05-28 12:09:03 +0100
committerfishsoupisgood <github@madingley.org>2019-05-28 12:09:03 +0100
commitee33718ab57c5a041b55c70c0ae7e046b3d1592b (patch)
tree118fa6880cb9f8d592516c5b40325f9b7448d0af
parent8110dec1577d9a9002119c15467d71d8a1f51bc8 (diff)
downloadwristapps-ee33718ab57c5a041b55c70c0ae7e046b3d1592b.tar.gz
wristapps-ee33718ab57c5a041b55c70c0ae7e046b3d1592b.tar.bz2
wristapps-ee33718ab57c5a041b55c70c0ae7e046b3d1592b.zip
general tidy up add all the timex apps and the toebes apps and numpad
-rw-r--r--Makefile27
-rw-r--r--flash/flash.asm135
-rw-r--r--from_others/Makefile9
-rw-r--r--from_others/numpad/Makefile58
-rw-r--r--from_others/numpad/numpad-a.zap33
-rw-r--r--from_others/numpad/numpad-b.zap33
-rw-r--r--from_others/numpad/numpad-c.zap33
-rw-r--r--from_others/numpad/numpad-d.zap33
-rw-r--r--from_others/numpad/numpad.txt165
-rw-r--r--from_others/numpad/numpad.zsm718
-rw-r--r--from_timex/Makefile11
-rw-r--r--from_timex/chrono12.zap27
-rw-r--r--from_timex/conv01.zap31
-rw-r--r--from_timex/copyme01.zap25
-rw-r--r--from_timex/golf01.zap29
-rw-r--r--from_timex/melody17.zap25
-rw-r--r--from_timex/note13.zap31
-rw-r--r--from_timex/pulse01.zap29
-rw-r--r--from_timex/quick13.zap31
-rw-r--r--from_timex/timer13.zap31
-rw-r--r--from_timex/wksiso11.zap33
-rw-r--r--from_timex/wksusa11.zap33
-rw-r--r--from_timex/world01.zap31
l---------from_toebes/3ball/3ball.asm1
l---------from_toebes/3ball/3ball.known_good1
-rw-r--r--from_toebes/3ball/3ball.zap29
-rw-r--r--from_toebes/3ball/3ball.zsm (renamed from 3ball/3ball.asm)296
-rw-r--r--from_toebes/Makefile46
-rw-r--r--from_toebes/datahid2/Data Hider App Beta.txt43
-rw-r--r--from_toebes/datahid2/datahid2.zap33
-rw-r--r--from_toebes/dayfind/dayfind.asm (renamed from dayfind/dayfind.asm)759
l---------from_toebes/dayfind/dayfind.known_good1
-rw-r--r--from_toebes/dayfind/dayfind.zap31
-rw-r--r--from_toebes/dayfind/dayfind.zsm375
l---------from_toebes/endoff/endoff.asm1
l---------from_toebes/endoff/endoff.known_good1
-rw-r--r--from_toebes/endoff/endoff.zap25
-rw-r--r--from_toebes/endoff/endoff.zsm145
l---------from_toebes/flash/flash.asm1
l---------from_toebes/flash/flash.known_good1
-rw-r--r--from_toebes/flash/flash.zap25
-rw-r--r--from_toebes/flash/flash.zsm135
l---------from_toebes/hello/hello.asm1
l---------from_toebes/hello/hello.known_good1
-rw-r--r--from_toebes/hello/hello.zap25
-rw-r--r--from_toebes/hello/hello.zsm (renamed from hello/hello.asm)3
l---------from_toebes/hexdump/hexdump.asm1
l---------from_toebes/hexdump/hexdump.known_good1
-rw-r--r--from_toebes/hexdump/hexdump.zap33
-rw-r--r--from_toebes/hexdump/hexdump.zsm322
l---------from_toebes/number/number.asm1
-rw-r--r--from_toebes/number/number.known_goodbin0 -> 147 bytes
-rw-r--r--from_toebes/number/number.zsm117
-rw-r--r--from_toebes/passwd/passwd.asm237
-rw-r--r--from_toebes/passwd/passwd.known_goodbin0 -> 337 bytes
-rw-r--r--from_toebes/passwd/passwd.zap25
-rw-r--r--from_toebes/passwd/passwd.zsm232
l---------from_toebes/pick6/pick6.asm1
l---------from_toebes/pick6/pick6.known_good1
-rw-r--r--from_toebes/pick6/pick6.zap33
-rw-r--r--from_toebes/pick6/pick6.zsm335
-rw-r--r--from_toebes/promdump/promdump.asm336
l---------from_toebes/promdump/promdump.known_good1
-rw-r--r--from_toebes/promdump/promdump.zap33
-rw-r--r--from_toebes/promdump/promdump.zsm336
-rw-r--r--from_toebes/shipbell/shipbell.asm176
l---------from_toebes/shipbell/shipbell.known_good1
-rw-r--r--from_toebes/shipbell/shipbell.zap27
-rw-r--r--from_toebes/shipbell/shipbell.zsm176
l---------from_toebes/sound1/sound1.asm1
-rw-r--r--from_toebes/sound1/sound1.known_goodbin0 -> 46 bytes
-rw-r--r--from_toebes/sound1/sound1.spcbin0 -> 50 bytes
-rw-r--r--from_toebes/sound1/sound1.zsm83
l---------from_toebes/spend0/spend0.asm1
l---------from_toebes/spend0/spend0.known_good1
-rw-r--r--from_toebes/spend0/spend0.zap37
-rw-r--r--from_toebes/spend0/spend0.zsm656
-rw-r--r--from_toebes/spend0/spendset.exebin0 -> 28160 bytes
-rw-r--r--from_toebes/testsnd/testsnd.asm155
l---------from_toebes/testsnd/testsnd.known_good1
-rw-r--r--from_toebes/testsnd/testsnd.zap26
-rw-r--r--from_toebes/testsnd/testsnd.zsm154
-rw-r--r--from_toebes/tipcalc/tipcalc1.zap35
l---------from_toebes/update/update.asm1
l---------from_toebes/update/update.known_good1
-rw-r--r--from_toebes/update/update.zap25
-rw-r--r--from_toebes/update/update.zsm133
l---------include/dl150/WRISTAPP.I1
-rw-r--r--include/dl150/wristapp.i (renamed from dl150/include/wristapp.i)1
l---------include/dl150s/WRISTAPP.I1
-rw-r--r--include/dl150s/wristapp.i (renamed from dl150s/include/wristapp.i)0
-rw-r--r--number/number.asm117
-rw-r--r--password/password.asm232
-rwxr-xr-xtools/zap2app14
-rw-r--r--update/update.asm133
95 files changed, 6660 insertions, 1164 deletions
diff --git a/Makefile b/Makefile
index d8482f5..b561b76 100644
--- a/Makefile
+++ b/Makefile
@@ -1,26 +1,9 @@
+SUBDIRS=from_timex from_others from_toebes
+default:
+ for i in ${SUBDIRS}; do ${MAKE} -C $$i; done
-APPDIRS=hello number update flash password dayfind 3ball
-
-APPS=${foreach appdir,${APPDIRS},${appdir}/${appdir}.app}
-PS=${APPS:%.app=%.p}
-LSTS=${APPS:%.app=%.lst}
-
-CROSS=../asl/
-
-AFLAGS=-i dl150/include -cpu datalink
-AS=${CROSS}asl ${AFLAGS}
-
-P2BIN=${CROSS}p2bin
-
-
-default:${APPS}
-
-%.app:%.p
- ${P2BIN} $< $@ -r 0x110-\$$
-
-%.p:%.asm
- ${AS} -L ${@:%.p=%.lst} -o $@ $<
clean:
- /bin/rm -f ${APPS} ${PS} ${LSTS}
+ for i in ${SUBDIRS}; do ${MAKE} -C $$i $@; done
+
diff --git a/flash/flash.asm b/flash/flash.asm
deleted file mode 100644
index 3a97f77..0000000
--- a/flash/flash.asm
+++ /dev/null
@@ -1,135 +0,0 @@
-;Name: Flash
-;Version: FLASH
-;Description: by John A. Toebes, VIII
-;This is a simple number update/flash program
-;
-;TIP: Download your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!
-;HelpFile: watchapp.hlp
-;HelpTopic: 106
- INCLUDE "wristapp.i"
-;
-; (1) Program specific constants
-;
-FLAGBYTE EQU $61
-; Bit 1 indicates that we need to clear the display first
-;
-CURVAL EQU $62 ; The current value we are displaying
-;
-; (2) System entry point vectors
-;
-START EQU *
-L0110: jmp MAIN ; The main entry point - WRIST_MAIN
-L0113: rts ; Called when we are suspended for any reason - WRIST_SUSPEND
- nop
- nop
-L0116: rts ; Called to handle any timers or time events - WRIST_DOTIC
- nop
- nop
-L0119: rts ; Called when the COMM app starts and we have timers pending - WRIST_INCOMM
- nop
- nop
-L011c: rts ; Called when the COMM app loads new data - WRIST_NEWDATA
- nop
- nop
-
-L011f: lda STATETAB,X ; The state table get routine - WRIST_GETSTATE
- rts
-
-L0123: jmp HANDLE_STATE0
- db STATETAB-STATETAB
-;
-; (3) Program strings
-S6_FLASH: timex6 "FLASH "
-S6_SAMPLE: timex6 "SAMPLE"
-;
-; (4) State Table
-;
-STATETAB:
- db 0
- db EVT_ENTER,TIM2_8TIC,0 ; Initial state
- db EVT_TIMER2,TIM_ONCE,0 ; The timer from the enter event
- db EVT_RESUME,TIM_ONCE,0 ; Resume from a nested app
- db EVT_MODE,TIM_ONCE,$FF ; Mode button
- db EVT_DNANY4,TIM_ONCE,0 ; NEXT, PREV, SET, MODE button pressed
- db EVT_UPANY4,TIM_ONCE,0 ; NEXT, PREV, SET, MODE button released
- db EVT_END
-;
-; (5) State Table 0 Handler
-; This is called to process the state events.
-; We see ENTER, TIMER2, RESUME, DNANY4 and UPANY4 events
-;
-HANDLE_STATE0:
- bset 1,APP_FLAGS ; Indicate that we can be suspended
- lda BTNSTATE ; Get the event
- cmp #EVT_DNANY4 ; Did they press a button?
- bne CHKENTER ; No, pass on to see what else there might be
- lda BTN_PRESSED ; Let's see what the button they pressed was
- cmp #EVT_PREV ; How about the PREV button
- beq DO_PREV ; handle it
- cmp #EVT_NEXT ; Maybe the NEXT button?
- beq DO_NEXT ; Deal with it!
- cmp #EVT_SET ; Perhaps the SET button
- beq DO_SET ; If so, handle it
- ; In reality, we can't reach here since we handled all three buttons
- ; in the above code (the MODE button is handled before we get here and the
- ; GLOW button doesn't send in an event for this). We can just fall through
- ; and take whatever we get from it.
-CHKENTER
- cmp #EVT_ENTER ; Is this our initial entry?
- bne REFRESH
-;
-; This is the initial event for starting us
-;
-DO_ENTER
- bclr 1,FLAGBYTE ; Indicate that we need to clear the display
- jsr CLEARSYM ; Clear the display
- lda #S6_FLASH-START
- jsr PUT6TOP
- lda #S6_SAMPLE-START
- jsr PUT6MID
- lda #SYS8_MODE
- jmp PUTMSGBOT
-;
-; (6) Our real working code...
-
-DO_NEXT
- bset 0,SYSFLAGS ; Mark our update direction as up
- bra DO_UPD
-DO_PREV
- bclr 0,SYSFLAGS ; Mark our update direction as down
-DO_UPD
- clra
- sta UPDATE_MIN ; Our low end is 0
- lda #99
- sta UPDATE_MAX ; and the high end is 99 (the max since this is a 2 digit value)
- ldx #CURVAL ; Point to our value to be updated
- lda #UPD_MID34 ; Request updating in the middle of the display
- jsr START_UPDATEP ; And prepare the update routine
- bset 4,BTNFLAGS ; Mark that the update is now pending
- bclr 1,FLAGBYTE
- lda #SYS8_SET_MODE
- jmp PUTMSGBOT
-
-DO_SET
- clr CURVAL ; When they hit the set button, we just clear to zero
-SHOWVAL
- brset 1,FLAGBYTE,NOCLEAR ; Do we need to clear the display first?
-REFRESH
- jsr CLEARALL ; Yes, clear everything before we start
- bset 1,FLAGBYTE ; And remember that we have already done that
-NOCLEAR
- bclr 7,BTNFLAGS ; Turn off any update routine that might be pending
- ldx #CURVAL
- lda #BLINK_MID34
- jsr START_BLINKP
- bset 2,BTNFLAGS ; Mark a blink routine as pending
- rts
-;
-; (7) This is the main initialization routine which is called when we first get the app into memory
-;
-MAIN:
- lda #$c0 ; We want button beeps and to indicate that we have been loaded
- sta WRISTAPP_FLAGS
- clr FLAGBYTE ; start with a clean slate
- clr CURVAL
- rts
diff --git a/from_others/Makefile b/from_others/Makefile
new file mode 100644
index 0000000..5bcc7bd
--- /dev/null
+++ b/from_others/Makefile
@@ -0,0 +1,9 @@
+SUBDIRS=numpad
+
+default:
+ for i in ${SUBDIRS}; do ${MAKE} -C $$i; done
+
+
+clean:
+ for i in ${SUBDIRS}; do ${MAKE} -C $$i $@; done
+
diff --git a/from_others/numpad/Makefile b/from_others/numpad/Makefile
new file mode 100644
index 0000000..18b7788
--- /dev/null
+++ b/from_others/numpad/Makefile
@@ -0,0 +1,58 @@
+VERSIONS=a b c d
+PROG=numpad
+
+APPS=${VERSIONS:%=${PROG}-%.app}
+ASMS=${VERSIONS:%=${PROG}-%.asm} numpad.asm
+LSTS=${VERSIONS:%=${PROG}-%.p}
+LSTS=${VERSIONS:%=${PROG}-%.lst}
+ZAPS=${VERSIONS:%=${PROG}-%.zap}
+STAMPS=${VERSIONS:%=${PROG}-%.stamp}
+HEX=${APPS:%.app=%.app.hex} ${APPS:%.app=%.zap.app.hex}
+ZAPAPPS=${ZAPS:%.zap=%.zap.app}
+
+CROSS=../../../asl/
+
+ZAP2APP=../../tools/zap2app
+AFLAGS=-i ../../include/dl150 -cpu datalink
+AS=${CROSS}asl ${AFLAGS}
+P2BIN=${CROSS}p2bin
+
+default:${STAMPS}
+
+numpad.asm:numpad.zsm
+ sed -e 's/^INCLUDE/ INCLUDE/' < $< > $@ || /bin/rm -f $@
+
+numpad-a.asm:numpad.asm
+ sed -e '/?C{/,/?C}/d' < $< | sed -e '/?A{/,/?A}/d' > $@ || /bin/rm -f $@
+
+numpad-b.asm:numpad.asm
+ sed -e '/?C{/,/?C}/d' < $< > $@ || /bin/rm -f $@
+
+numpad-c.asm:numpad.asm
+ sed -e '/?B{/,/?B}/d' < $< > $@ || /bin/rm -f $@
+
+numpad-d.asm:numpad.asm
+ sed -e '/?C{/,/?C}/d' < $< | sed -e '/?W{/,/?W}/d' > $@ || /bin/rm -f $@
+
+%.p:%.asm
+ ${AS} -L ${@:%.p=%.lst} -o $@ $<
+
+%.app:%.p
+ ${P2BIN} $< $@ -r 0x110-\$$
+
+
+%.hex:%
+ yes '' | dd bs=272 count=1 | cat - $< | hexdump -C > $@ || /bin/rm -f $@
+
+
+%.stamp:%.app.hex %.zap.app.hex
+ diff -uN ${@:%.stamp=%.app.hex} ${@:%.stamp=%.zap.app.hex} && touch $@
+
+%.zap.app:%.zap
+ ${ZAP2APP} $< $@
+
+.PRECIOUS:${APPS}
+
+clean:
+ /bin/rm -f ${APPS} ${PS} ${LSTS} ${HEX} ${STAMPS} ${ZAPAPPS} ${ASMS}
+
diff --git a/from_others/numpad/numpad-a.zap b/from_others/numpad/numpad-a.zap
new file mode 100644
index 0000000..0dc06fc
--- /dev/null
+++ b/from_others/numpad/numpad-a.zap
@@ -0,0 +1,33 @@
+TDL0705982¬
+Numpad/Chrono A¬
+NUMPAD-A¬
+A multi-function WristApp, which includes three 12 digit Number Pads, a Chronometer, a Countdown Timer, and an Alarm Enhancer
+Version 1.4A (Always beeps when it returns to time mode)
+
+(c) 1998 Michael Polymenakos (mpoly@panix.com). Compiled using tools and knowledge published by John A. Toebes, VIII
+
+TIP: Read the NUMPAD.TXT file
+watchapp.hlp¬
+101¬
+none¬
+Timex Data Link 150 Watch¬
+CC0186CC019CCC0348819D9D129081D6012781CC01A300001BFF001AFF0000FF0003FF0082FF00A2FF0001FF0004FF0039FFFF1D310C111B18171831171E16190A0D2401443C322A20121E1E1E1E1E1E1E1E1E1E1E1E183C3C641E1E1E1E1E1E1E1E1E1E1E1E00091E001E1E1E1E1E1E1E1E1E1E1E1EA60CB766A6C0B7961F680968021E683FC6CD02CC12901F6614663F6781CD4F3AB691A1012615A61B3C6705670EA6C2B79BCD4E4AADE0A639CC4E89BE672603CC025B14660E66DFA11B2730BEC3A182272CA104272ADE014AA10327074D270220125C5C5A2B04A30A2602AE1EA30A2503DE015A9FBEC3D7014A2005AEFF5C5C5A9FA40FA10C27F4A10F2602A60BBE67CF015358585858BF60BB60B7C39FAB3AB760069303CD4E8ECD577AB660CD587EB660AB06CD58A8A63CCD5845B6C3A40F97A0062A08DE0154BF1D101E8197DE0154BF1D141E811266A11B2718A11A27141E664D2722A103273DA104272BA1A2270BCC0336CD577ACD5AD91B661D661866A634CD5845204D0166081866CD0348116681B626B765106681A6C8CD584C1866CD03481466810466D50066EDB6C54C2616B6C62610B666A808B766A4082606B668A880B7683FC6AE036F615A2AFBBFC5B6C6B7C4156612660466BD0A66BA1A66BE64CD593E0866023FA31966CD590003663ABE63CD593ECD5930BE62CD6823BE61CD593ECD5910BEC4CD5951BEC62603CD594DCD58E0A61CB71D191E076602181EA60EB71D191E0F6802181E1B66136681B6C54C2691A606B760A658CD584C1C66204CAD560D66050E60443A600166E0B62697B065BF65BB64B764AE03E661D0016625091266E7616C605A2AF0BE62B3C52719BFC5B6C627133AC42A0F4AB7C4A6C4076602A686B79BCD4E4ACC02DDB6C6AE63CD6B0DB7C6CC02D7C604C1A402264818680E68021968B6B8CD690E2402B6C14CB7C7A60497585858DE04762719A308270D2221B3C7271597E669A4FE2013BEC7A305220820F1BEC7A30522EB97E669AA01E7699F4A2ACD81¬
+19299¬
+0¬
+Numpad/Chrono A¬
+NUMPAD-A¬
+A multi-function WristApp, which includes three 12 digit Number Pads, a Chronometer, a Countdown Timer, and an Alarm Enhancer
+Version 1.4A (Always beeps when it returns to time mode)
+
+(c) 1998 Michael Polymenakos (mpoly@panix.com). Compiled using tools and knowledge published by John A. Toebes, VIII
+
+TIP: Read the NUMPAD.TXT file
+watchapp.hlp¬
+101¬
+none¬
+Timex Data Link 150s Watch¬
+CC0186CC019CCC0348819D9D129081D6012781CC01A300001BFF001AFF0000FF0003FF0082FF00A2FF0001FF0004FF0039FFFF1D310C111B18171831171E16190A0D2401423A30281E101E1E1E1E1E1E1E1E1E1E1E1E183C3C641E1E1E1E1E1E1E1E1E1E1E1E00091E001E1E1E1E1E1E1E1E1E1E1E1EA60CB766A6C0B7961F680968021E683FC6CD02CC12901F6614663F6781CD4F29B691A1012615A61B3C6705670EA6C2B79BCD4E39ADE0A639CC4E78BE672603CC025B14660E66DFA11B2730BEC3A182272CA104272ADE014AA10327074D270220125C5C5A2B04A30A2602AE1EA30A2503DE015A9FBEC3D7014A2005AEFF5C5C5A9FA40FA10C27F4A10F2602A60BBE67CF015358585858BF60BB60B7C39FAB3AB760069303CD4E7DCD5AA0B660CD577FB660AB06CD57A9A63CCD5746B6C3A40F97A0062A08DE0154BF1D101E8197DE0154BF1D141E811266A11B2718A11A27141E664D2722A103273DA104272BA1A2270BCC0336CD5AA0CD59DA1B661D661866A634CD5746204D0166081866CD0348116681B626B765106681A6C8CD574D1866CD03481466810466D50066EDB6C54C2616B6C62610B666A808B766A4082606B668A880B7683FC6AE036F615A2AFBBFC5B6C6B7C4156612660466BD0A66BA1A66BE64CD583F0866023FA31966CD580103663ABE63CD583FCD5831BE62CD682CBE61CD583FCD5811BEC4CD5852BEC62603CD584ECD57E1A61AB71D191E076602181EA60CB71D191E0F6802181E1B66136681B6C54C2691A606B760A658CD574D1C66204CAD560D66050E60443A600166E0B62697B065BF65BB64B764AE03E661D0016625091266E7616C605A2AF0BE62B3C52719BFC5B6C627133AC42A0F4AB7C4A6C4076602A686B79BCD4E39CC02DDB6C6AE63CD6B16B7C6CC02D7C604C1A402264818680E68021968B6B8CD69172402B6C14CB7C7A60497585858DE04762719A308270D2221B3C7271597E669A4FE2013BEC7A305220820F1BEC7A30522EB97E669AA01E7699F4A2ACD81¬
+7622¬
+0¬ \ No newline at end of file
diff --git a/from_others/numpad/numpad-b.zap b/from_others/numpad/numpad-b.zap
new file mode 100644
index 0000000..4125f0f
--- /dev/null
+++ b/from_others/numpad/numpad-b.zap
@@ -0,0 +1,33 @@
+TDL0705982¬
+Numpad/Chrono B¬
+NUMPAD-B¬
+A multi-function WristApp, which includes three 12 digit Number Pads, a Chronometer, a Countdown Timer, and an Alarm Enhancer
+Version 1.4B (Basic)
+
+(c) 1998 Michael Polymenakos (mpoly@panix.com). Compiled using tools and knowledge published by John A. Toebes, VIII
+
+TIP: Read the NUMPAD.TXT file
+watchapp.hlp¬
+101¬
+none¬
+Timex Data Link 150 Watch¬
+CC0186CC019CCC034B819D9D129081D6012781CC01A300001BFF001AFF0000FF0003FF0082FF00A2FF0001FF0004FF0039FFFF1D310C111B18171831171E16190A0D2401443C322A20121E1E1E1E1E1E1E1E1E1E1E1E183C3C641E1E1E1E1E1E1E1E1E1E1E1E00091E001E1E1E1E1E1E1E1E1E1E1E1EA60CB766A6C0B7961F680968021E683FC6CD02CF12901F6614663F6781CD4F3AB691A1012618A61B3C67056711096807A6C2B79BCD4E4AADDDA639CC4E89BE672603CC025E14660E66DCA11B2730BEC3A182272CA104272ADE014AA10327074D270220125C5C5A2B04A30A2602AE1EA30A2503DE015A9FBEC3D7014A2005AEFF5C5C5A9FA40FA10C27F4A10F2602A60BBE67CF015358585858BF60BB60B7C39FAB3AB760069303CD4E8ECD577AB660CD587EB660AB06CD58A8A63CCD5845B6C3A40F97A0062A08DE0154BF1D101E8197DE0154BF1D141E811266A11B2718A11A27141E664D2722A103273DA104272BA1A2270BCC0339CD577ACD5AD91B661D661866A634CD5845204D0166081866CD034B116681B626B765106681A6C8CD584C1866CD034B1466810466D50066EDB6C54C2616B6C62610B666A808B766A4082606B668A880B7683FC6AE036F615A2AFBBFC5B6C6B7C4156612660466BD0A66BA1A66BE64CD593E0866023FA31966CD590003663ABE63CD593ECD5930BE62CD6823BE61CD593ECD5910BEC4CD5951BEC62603CD594DCD58E0A61CB71D191E076602181EA60EB71D191E0F6802181E1B66136681B6C54C2691A606B760A658CD584C1C66204CAD560D66050E60443A600166E0B62697B065BF65BB64B764AE03E661D0016625091266E7616C605A2AF0BE62B3C52719BFC5B6C627133AC42A0F4AB7C4A6C4076602A686B79BCD4E4ACC02E0B6C6AE63CD6B0DB7C6CC02DAC604C1A402264818680E68021968B6B8CD690E2402B6C14CB7C7A60497585858DE04762719A308270D2221B3C7271597E669A4FE2013BEC7A305220820F1BEC7A30522EB97E669AA01E7699F4A2ACD81¬
+35010¬
+0¬
+Numpad/Chrono B¬
+NUMPAD-B¬
+A multi-function WristApp, which includes three 12 digit Number Pads, a Chronometer, a Countdown Timer, and an Alarm Enhancer
+Version 1.4B (Basic)
+
+(c) 1998 Michael Polymenakos (mpoly@panix.com). Compiled using tools and knowledge published by John A. Toebes, VIII
+
+TIP: Read the NUMPAD.TXT file
+watchapp.hlp¬
+101¬
+none¬
+Timex Data Link 150s Watch¬
+CC0186CC019CCC034B819D9D129081D6012781CC01A300001BFF001AFF0000FF0003FF0082FF00A2FF0001FF0004FF0039FFFF1D310C111B18171831171E16190A0D2401423A30281E101E1E1E1E1E1E1E1E1E1E1E1E183C3C641E1E1E1E1E1E1E1E1E1E1E1E00091E001E1E1E1E1E1E1E1E1E1E1E1EA60CB766A6C0B7961F680968021E683FC6CD02CF12901F6614663F6781CD4F29B691A1012618A61B3C67056711096807A6C2B79BCD4E39ADDDA639CC4E78BE672603CC025E14660E66DCA11B2730BEC3A182272CA104272ADE014AA10327074D270220125C5C5A2B04A30A2602AE1EA30A2503DE015A9FBEC3D7014A2005AEFF5C5C5A9FA40FA10C27F4A10F2602A60BBE67CF015358585858BF60BB60B7C39FAB3AB760069303CD4E7DCD5AA0B660CD577FB660AB06CD57A9A63CCD5746B6C3A40F97A0062A08DE0154BF1D101E8197DE0154BF1D141E811266A11B2718A11A27141E664D2722A103273DA104272BA1A2270BCC0339CD5AA0CD59DA1B661D661866A634CD5746204D0166081866CD034B116681B626B765106681A6C8CD574D1866CD034B1466810466D50066EDB6C54C2616B6C62610B666A808B766A4082606B668A880B7683FC6AE036F615A2AFBBFC5B6C6B7C4156612660466BD0A66BA1A66BE64CD583F0866023FA31966CD580103663ABE63CD583FCD5831BE62CD682CBE61CD583FCD5811BEC4CD5852BEC62603CD584ECD57E1A61AB71D191E076602181EA60CB71D191E0F6802181E1B66136681B6C54C2691A606B760A658CD574D1C66204CAD560D66050E60443A600166E0B62697B065BF65BB64B764AE03E661D0016625091266E7616C605A2AF0BE62B3C52719BFC5B6C627133AC42A0F4AB7C4A6C4076602A686B79BCD4E39CC02E0B6C6AE63CD6B16B7C6CC02DAC604C1A402264818680E68021968B6B8CD69172402B6C14CB7C7A60497585858DE04762719A308270D2221B3C7271597E669A4FE2013BEC7A305220820F1BEC7A30522EB97E669AA01E7699F4A2ACD81¬
+51942¬
+0¬ \ No newline at end of file
diff --git a/from_others/numpad/numpad-c.zap b/from_others/numpad/numpad-c.zap
new file mode 100644
index 0000000..b0cb1e0
--- /dev/null
+++ b/from_others/numpad/numpad-c.zap
@@ -0,0 +1,33 @@
+TDL0705982¬
+Numpad/Chrono C¬
+NUMPAD-C¬
+A multi-function WristApp, which includes three 12 digit Number Pads, a Chronometer, a Countdown Timer, and an Alarm Enhancer
+Version 1.4C (Day-Chime feature)
+
+(c) 1998 Michael Polymenakos (mpoly@panix.com). Compiled using tools and knowledge published by John A. Toebes, VIII
+
+TIP: Read the NUMPAD.TXT file
+watchapp.hlp¬
+101¬
+none¬
+Timex Data Link 150 Watch¬
+CC0186CC0195CC032F819D9D129081D6012781CC019C00001BFF001AFF0000FF0003FF0082FF00A2FF0001FF0004FF0039FFFF1D310C111B18171831171E16190A0D2401443C322A20121E1E1E1E1E1E1E1E1E1E1E1E183C3C641E1E1E1E1E1E1E1E1E1E1E1E00091E001E1E1E1E1E1E1E1E1E1E1E1EA60CB766A6C0B7963FC6CD02BE12901F6614663F6781CD4F3AB691A1012618A61B3C67056711096807A6C2B79BCD4E4AADDDA639CC4E89BE672603CC025714660E66DCA11B2730BEC3A182272CA104272ADE014AA10327074D270220125C5C5A2B04A30A2602AE1EA30A2503DE015A9FBEC3D7014A2005AEFF5C5C5A9FA40FA10C27F4A10F2602A60BBE67CF015358585858BF60BB60B7C39FAB3AB760069303CD4E8ECD577AB660CD587EB660AB06CD58A8A63CCD5845B6C3A40F97A0062A08DE0154BF1D101E8197DE0154BF1D141E811266A11B2718A11A27141E664D2722A103273DA104272BA1A2270BCC031DCD577ACD5AD91B661D661866A634CD584520430166081866CD032F116681B626B765106681A6C8CD584C1866CD032F1466810466D50066EDB6C54C260CB6C62606B666A808B7663FC6AE036F615A2AFBBFC5B6C6B7C4156612660466C70A66C41A66BE64CD593E0866023FA31966CD590003662FBE63CD593ECD5930BE62CD6823BE61CD593ECD5910BEC4CD5951BEC62603CD594DCD58E0A61CB71D191E076602181E1B66136681B6C54C269CA606B760A658CD584C1C66204CAD560D66050E60443A600166E0B62697B065BF65BB64B764AE03E661D0016625091266E7616C605A2AF0BE62B3C52719BFC5B6C627133AC42A0F4AB7C4A6C4076602A686B79BCD4E4ACC02CFB6C6AE63CD6B0DB7C6CC02C9C604C1A4022658B6B0CD690E2402B6B9A1142208A1082504146820021568B6B8CD690E2402B6C14CB7C7A60497585858DE04762719A308270D2221B3C7271597E669A4FE2013BEC7A305220820F1BEC7A30522EB97E669AA01E7699F4A2ACD81¬
+19015¬
+0¬
+Numpad/Chrono C¬
+NUMPAD-C¬
+A multi-function WristApp, which includes three 12 digit Number Pads, a Chronometer, a Countdown Timer, and an Alarm Enhancer
+Version 1.4C (Day-Chime feature)
+
+(c) 1998 Michael Polymenakos (mpoly@panix.com). Compiled using tools and knowledge published by John A. Toebes, VIII
+
+TIP: Read the NUMPAD.TXT file
+watchapp.hlp¬
+101¬
+none¬
+Timex Data Link 150s Watch¬
+CC0186CC0195CC032F819D9D129081D6012781CC019C00001BFF001AFF0000FF0003FF0082FF00A2FF0001FF0004FF0039FFFF1D310C111B18171831171E16190A0D2401423A30281E101E1E1E1E1E1E1E1E1E1E1E1E183C3C641E1E1E1E1E1E1E1E1E1E1E1E00091E001E1E1E1E1E1E1E1E1E1E1E1EA60CB766A6C0B7963FC6CD02BE12901F6614663F6781CD4F29B691A1012618A61B3C67056711096807A6C2B79BCD4E39ADDDA639CC4E78BE672603CC025714660E66DCA11B2730BEC3A182272CA104272ADE014AA10327074D270220125C5C5A2B04A30A2602AE1EA30A2503DE015A9FBEC3D7014A2005AEFF5C5C5A9FA40FA10C27F4A10F2602A60BBE67CF015358585858BF60BB60B7C39FAB3AB760069303CD4E7DCD5AA0B660CD577FB660AB06CD57A9A63CCD5746B6C3A40F97A0062A08DE0154BF1D101E8197DE0154BF1D141E811266A11B2718A11A27141E664D2722A103273DA104272BA1A2270BCC031DCD5AA0CD59DA1B661D661866A634CD574620430166081866CD032F116681B626B765106681A6C8CD574D1866CD032F1466810466D50066EDB6C54C260CB6C62606B666A808B7663FC6AE036F615A2AFBBFC5B6C6B7C4156612660466C70A66C41A66BE64CD583F0866023FA31966CD580103662FBE63CD583FCD5831BE62CD682CBE61CD583FCD5811BEC4CD5852BEC62603CD584ECD57E1A61AB71D191E076602181E1B66136681B6C54C269CA606B760A658CD574D1C66204CAD560D66050E60443A600166E0B62697B065BF65BB64B764AE03E661D0016625091266E7616C605A2AF0BE62B3C52719BFC5B6C627133AC42A0F4AB7C4A6C4076602A686B79BCD4E39CC02CFB6C6AE63CD6B16B7C6CC02C9C604C1A4022658B6B0CD69172402B6B9A1142208A1082504146820021568B6B8CD69172402B6C14CB7C7A60497585858DE04762719A308270D2221B3C7271597E669A4FE2013BEC7A305220820F1BEC7A30522EB97E669AA01E7699F4A2ACD81¬
+43151¬
+0¬ \ No newline at end of file
diff --git a/from_others/numpad/numpad-d.zap b/from_others/numpad/numpad-d.zap
new file mode 100644
index 0000000..b9dbf13
--- /dev/null
+++ b/from_others/numpad/numpad-d.zap
@@ -0,0 +1,33 @@
+TDL0705982¬
+Numpad/Chrono D¬
+NUMPAD-D¬
+A multi-function WristApp, which includes three 12 digit Number Pads, a Chronometer, and a Countdown Timer
+Version 1.4D (Alarm Enhancer Disabled)
+
+(c) 1998 Michael Polymenakos (mpoly@panix.com). Compiled using tools and knowledge published by John A. Toebes, VIII
+
+TIP: Read the NUMPAD.TXT file
+watchapp.hlp¬
+101¬
+none¬
+Timex Data Link 150 Watch¬
+CC0186CC019CCC034B819D9D129081D6012781CC01A300001BFF001AFF0000FF0003FF0082FF00A2FF0001FF0004FF0039FFFF1D310C111B18171831171E16190A0D2401443C322A20121E1E1E1E1E1E1E1E1E1E1E1E183C3C641E1E1E1E1E1E1E1E1E1E1E1E00091E001E1E1E1E1E1E1E1E1E1E1E1EA60CB766A6C0B7961F680968021E683FC6CD02CF12901F6614663F6781CD4F3AB691A1012618A61B3C67056711096807A6C2B79BCD4E4AADDDA639CC4E89BE672603CC025E14660E66DCA11B2730BEC3A182272CA104272ADE014AA10327074D270220125C5C5A2B04A30A2602AE1EA30A2503DE015A9FBEC3D7014A2005AEFF5C5C5A9FA40FA10C27F4A10F2602A60BBE67CF015358585858BF60BB60B7C39FAB3AB760069303CD4E8ECD577AB660CD587EB660AB06CD58A8A63CCD5845B6C3A40F97A0062A08DE0154BF1D101E8197DE0154BF1D141E811266A11B2718A11A27141E664D2722A103273DA104272BA1A2270BCC0339CD577ACD5AD91B661D661866A634CD5845204D0166081866CD034B116681B626B765106681A6C8CD584C1866CD034B1466810466D50066EDB6C54C2616B6C62610B666A808B766A4082606B668A880B7683FC6AE036F615A2AFBBFC5B6C6B7C4156612660466BD0A66BA1A66BE64CD593E0866023FA31966CD590003663ABE63CD593ECD5930BE62CD6823BE61CD593ECD5910BEC4CD5951BEC62603CD594DCD58E0A61CB71D191E076602181EA60EB71D191E0F6802181E1B66136681B6C54C2691A606B760A658CD584C1C66204CAD560D66050E60443A600166E0B62697B065BF65BB64B764AE03E661D0016625091266E7616C605A2AF0BE62B3C52719BFC5B6C627133AC42A0F4AB7C4A6C4076602A686B79BCD4E4ACC02E0B6C6AE63CD6B0DB7C6CC02DAC604C1A402260718680E6802196881¬
+53362¬
+0¬
+Numpad/Chrono D¬
+NUMPAD-D¬
+A multi-function WristApp, which includes three 12 digit Number Pads, a Chronometer, and a Countdown Timer
+Version 1.4D (Alarm Enhancer Disabled)
+
+(c) 1998 Michael Polymenakos (mpoly@panix.com). Compiled using tools and knowledge published by John A. Toebes, VIII
+
+TIP: Read the NUMPAD.TXT file
+watchapp.hlp¬
+101¬
+none¬
+Timex Data Link 150s Watch¬
+CC0186CC019CCC034B819D9D129081D6012781CC01A300001BFF001AFF0000FF0003FF0082FF00A2FF0001FF0004FF0039FFFF1D310C111B18171831171E16190A0D2401423A30281E101E1E1E1E1E1E1E1E1E1E1E1E183C3C641E1E1E1E1E1E1E1E1E1E1E1E00091E001E1E1E1E1E1E1E1E1E1E1E1EA60CB766A6C0B7961F680968021E683FC6CD02CF12901F6614663F6781CD4F29B691A1012618A61B3C67056711096807A6C2B79BCD4E39ADDDA639CC4E78BE672603CC025E14660E66DCA11B2730BEC3A182272CA104272ADE014AA10327074D270220125C5C5A2B04A30A2602AE1EA30A2503DE015A9FBEC3D7014A2005AEFF5C5C5A9FA40FA10C27F4A10F2602A60BBE67CF015358585858BF60BB60B7C39FAB3AB760069303CD4E7DCD5AA0B660CD577FB660AB06CD57A9A63CCD5746B6C3A40F97A0062A08DE0154BF1D101E8197DE0154BF1D141E811266A11B2718A11A27141E664D2722A103273DA104272BA1A2270BCC0339CD5AA0CD59DA1B661D661866A634CD5746204D0166081866CD034B116681B626B765106681A6C8CD574D1866CD034B1466810466D50066EDB6C54C2616B6C62610B666A808B766A4082606B668A880B7683FC6AE036F615A2AFBBFC5B6C6B7C4156612660466BD0A66BA1A66BE64CD583F0866023FA31966CD580103663ABE63CD583FCD5831BE62CD682CBE61CD583FCD5811BEC4CD5852BEC62603CD584ECD57E1A61AB71D191E076602181EA60CB71D191E0F6802181E1B66136681B6C54C2691A606B760A658CD574D1C66204CAD560D66050E60443A600166E0B62697B065BF65BB64B764AE03E661D0016625091266E7616C605A2AF0BE62B3C52719BFC5B6C627133AC42A0F4AB7C4A6C4076602A686B79BCD4E39CC02E0B6C6AE63CD6B16B7C6CC02DAC604C1A402260718680E6802196881¬
+19220¬
+0¬ \ No newline at end of file
diff --git a/from_others/numpad/numpad.txt b/from_others/numpad/numpad.txt
new file mode 100644
index 0000000..f63cf20
--- /dev/null
+++ b/from_others/numpad/numpad.txt
@@ -0,0 +1,165 @@
+NUMPAD 1.4 is a multi-function WristApp for the DataLink 150/150s Watch
+
+(c) 1998 Michael Polymenakos (mpoly@panix.com). Compiled using tools and knowledge published by John A. Toebes, VIII
+
+1. Release notes
+2. Usage Instructions
+3. Program Versions
+4. Installation
+5. Known Bugs
+6. About the Source Code
+
+1. Release notes
+
+ Latest source and .ZAP file available at http://www.panix.com/~mpoly/software/numpad.zip
+ If you receive this file from another source, you may want to download the file from the above
+ URL to ensure that you have the most recent version.
+
+ Distribute freely; Please include this file and software credits with the distribution.
+ Comments are always welcome at mpoly@panix.com
+
+ This is Version 1.4. New features over 1.3:
+ - Ability to control the ButtonBeeps without resetting them from the PC
+ - 'Return to time mode' tone
+
+2. Usage Instructions
+ There are four functions in Numpad:
+
+ NUMPAD: A simple wristapp that allows the recording "on the fly"
+ of three numbers, of 12 digits each.
+
+ Keys:
+ MODE: Exit and advance to next Numpad
+ NEXT: Increment Digit
+ PREV: Decrement Digit
+ SET : Cursor Advance
+ GLOW: Cursor Back (Indiglo is disabled in this mode, but Night mode works)
+
+ Note: The numbers are lost every time the WristApp is uploaded.
+
+ CHRONO: A Simple Stopwatch. In addition to the usual functions,
+ there is a Countdown timer that will beep every N minutes, if it is set.
+
+ Keys:
+ MODE: Switch to Numpad
+ NEXT: Start/Stop Chronometer
+ PREV: Enter/Leave Split mode.
+ If pressed while chronometer is stopped, reset to 0
+ If pressed while chronometer is set to 0, reset the Countdown Timer
+ If pressed while Timer is reset, toggle Chronometer Alarm and ButtonBeeps ON/OFF
+ SET : Reset chronometer to 0, and continue in same mode
+ If pressed while chronometer is set to 0, advance the Countdown value by 1
+ (Keep pressed to advance quickly)
+ GLOW: Indiglo is enabled in this mode
+
+ WEEKLY: This is an invisible function, which affects the way the alarms are handled by
+ the watch.
+
+ Each alarm has an 8-character text field associated with it. Weekly uses the
+ last (8th) character in that field to automatically set the alarms ON and OFF,
+ allowing for a weekly schedule.
+
+ To use WEEKLY, set your alarms to DAILY, and set the last digit of the alarm text
+ to one of the following values:
+
+ 0 - Ring on Weekdays only
+ 1 - Ring on Mondays only
+ 2 - Tuesdays
+ .
+ .
+ 7 - Sundays
+ 8 - Weekends
+ 9 - Do not adjust
+
+ Any non-numeric values in the field have the same result as 9.
+ Alarms are adjusted using the current timezone (1 or 2).
+
+ When setting alarms ON or OFF manually, please note: If the 8th digit in the
+ TEXT field is 0 through 8, your setting will be reset as soon as you return to
+ TIME mode. This is not a bug, but the way the program functions.
+
+ CORRECTBEEP:
+ There is a bug in the Timex ROM. The manual for the watch reads:
+
+ <<ALARM MODE - PRESS PREVIOUS (to) Cycle thru Alarm and Hourly Chime arm/disarm.>>
+
+ But this is not what happens. When arming/disarming the hourly Chime, the Button
+ Beeps are also armed/disarmed regardless of the user's setting in the upload program.
+ The CorrectBeep code fixes this, and causes the watch to behave as described in the
+ documentation. (The ButtonBeeps will not be corrected until the watch returns
+ to TIME mode).
+
+ The user can control the ButtonBeeps using the Previous button in the 'Chrono' mode
+ (see above). When the ButtonBeeps are set, the tone symbol is displayed in Chrono mode.
+
+3. Program Versions
+ In response to various requests, there are 4 versions of the software available:
+
+ NUMPAD-A.ZAP - The standard application. When the watch returns to TIME mode, it will
+ always beep (regardless of the ButtonBeeps setting).
+ NUMPAD-B.ZAP - The standard application. When the watch returns to TIME mode, it will
+ beep only if ButtonBeeps are set ON.
+ NUMPAD-C.ZAP - A new feature has been added: Chime Control. The hourly Chime will be
+ turned OFF from 8pm through 8am, and ON for the rest of the day. Currently
+ the only way to change the ON/OFF hours is to alter and recompile the
+ provided source code. Use the Alarm screen to control ButtonBeeps.
+ Requested by a Datalink user, who likes the chime, but whose wife does not!
+ NUMPAD-D.ZAP - As above, but with the WEEKLY function disabled for those who do
+ not need it. The ButtonBeep control functions are present
+
+4. Installation.
+ 4a) Users of Datalink software 2.1D and later:
+ a) Copy the .ZAP files provided in this extract into the APP subdirectory of your Timex
+ directory.
+
+ d) Restart TimexDL and select the wristapp you wish to upload.
+
+ 4b) Users of Datalink software 2.1C and earlier:
+ a) In your Timex Software Directory, locate the file TIMEXDL.DAT, and edit it
+
+ b) Look for the [WristApps] Section. Increment the WristAppTotal count, and add
+ new lines for Numpad below. This is an example of what the section may look like
+ after you are done:
+ [WristApps]
+ WristAppTotal=9
+ SelectedWristApp=7
+ WristAppSendOption=True
+ WristApp000=CHRONO12.ZAP
+ WristApp001=WKSUSA11.ZAP
+ WristApp002=WKSISO11.ZAP
+ WristApp003=TIMER13.ZAP
+ WristApp004=QUICK13.ZAP
+ WristApp005=NOTE13.ZAP
+ WristApp006=MELODY17.ZAP
+ WristApp007=NUMPAD-A.zap
+ WristApp008=NUMPAD-D.zap
+
+ c) Copy the .ZAP files provided in this extract into the APP subdirectory of your Timex
+ directory.
+
+ d) Restart TimexDL and select the wristapp you wish to upload.
+
+5. Known Bugs.
+ 5a) If you set an Alarm for 0:00 (midnight), the Weekly feature will treat it as if though
+ it was set for the night before. So, 0:00 Tuesday morning, is really treated as
+ 24:00 Monday night.
+ 5b) When you finish downloading the app, there will be some garbage characters in the COMM
+ mode screen. Nothing to worry about.
+
+6. About the Source Code
+ You can modify and recompile the source code using the compiler found at John Toebes'
+ pages (http://www.geocities.com/ResearchTriangle/7650/). The source code in this version
+ will not compile as-is, because the total size of the code for all the features exceeds
+ the Datalink's 742 byte limitation.
+
+ The source code for Numpad 1.0 was much better organized and documented that the code for
+ this version. In order to conserve memory, I had to use every trick that would save me one
+ byte here and another byte there. I'll be glad to explain any code segment to anyone
+ interested in making improvements.
+
+ If you do create something interesting using Numpad as your starting point, please release
+ it to the public with the source code, so that we all benefit. Please provide proper
+ attribution for the code you reused.
+
+
+Enjoy!
diff --git a/from_others/numpad/numpad.zsm b/from_others/numpad/numpad.zsm
new file mode 100644
index 0000000..4aaced7
--- /dev/null
+++ b/from_others/numpad/numpad.zsm
@@ -0,0 +1,718 @@
+;Name: Numpad/Chrono
+;Version: NUMPAD
+;Description: A multi-function WristApp, which includes three 12 digit Number Pads, a Chronometer, a Countdown Timer, and an Alarm Enhancer
+;Version 1.4
+;
+;(c) 1998 Michael Polymenakos (mpoly@panix.com). Compiled using tools and knowledge published by John A. Toebes, VIII
+;
+;TIP: Read the NUMPAD.TXT file
+;
+;HelpFile: watchapp.hlp
+;HelpTopic: 101
+
+INCLUDE "WRISTAPP.I"
+
+;
+; NOTE: This code can not be compiled 'as-is'. You will need to remove one or more features
+; to make the program fit in the 742 bytes of memory available.
+;
+; ;?C marks day-chime specific code
+; ;?B marks correct-beeps specific code
+; ;?W Weekly alarm enhancer code
+; ;?A Line of code that needs to be removed for 'always beep on return' feature.
+;
+; Version Remove Lines Marked
+; A ;?C ?A
+; B ;?C
+; C ;?B
+; D ;?C ;?W
+;
+
+
+;
+; Program Constants
+;
+
+DASH equ $1E ; Dash in Timex6 charset
+
+;
+; Memory Addresses
+
+; steal 5 bytes from the stack.
+
+CURSOR equ $C3 ; Points to the next byte to be updated by numpad
+COUNT_NOW equ $C4 ; Minutes left to countdown
+COUNT_LAST equ $C5 ; Last value of MINUTE encountered in timer routine
+COUNT_INIT equ $C6 ; User's selected value for countdown
+DOW equ $C7 ; Current Day-Of-Week
+
+; We have bytes $60 thru $67 to use for memory (8 bytes)
+
+TICKER equ $26 ; System tick counter, incremented by 1 every 1/100 sec
+
+TEMP equ $60 ; Used sparingly
+HOURS equ $61 ; --+
+MINUTES equ $62 ; | The chronometer time value. This matches what is
+SECONDS equ $63 ; | displayed on screen
+HUNDREDS equ $64 ; --+
+
+LASTTICK equ $65 ; Last value of TICKER encountered, see PT_TICK routine
+
+; Our timer status flags
+
+STATUS equ $66 ; Chronometer Status Flags, bits as follows:
+
+ST_BPRESSED equ 7 ; The user has pressed at least one button in Timer
+ST_SETCOUNT equ 6 ; We are in Set-Countdown mode
+ST_REDRAWING equ 5 ; We are in the redrawing routine
+ST_100S equ 4 ; 100s of seconds need to be redrawn (10's are always redrawn)
+ST_ALARM equ 3 ; Use alarm instead of beep on countdown
+ST_SPLIT equ 2 ; we are in split mode
+ST_REDRAW equ 1 ; The chronometer is the current program
+ST_RUNNING equ 0 ; time is running
+
+SV_BPRESSED equ 128
+SV_SETCOUNT equ 64
+SV_REDRAWING equ 32
+SV_100S equ 16
+SV_ALARM equ 8
+SV_SPLIT equ 4
+SV_REDRAW equ 2
+SV_RUNNING equ 1
+
+CURRENT_PROGRAM equ $67 ; 0 - 3, Subprogram currently active
+
+;
+; System entry point vectors
+;
+
+START equ *
+L0110 jmp PM_MAIN ; The main entry point
+L0113 jmp PM_SLEEP ; Called when we are suspended for any reason
+L0116 jmp PT_TICK ; Called to handle any timers or time events
+L0119 rts ; Called when the COMM app starts and we have timers pending
+ nop
+ nop
+;011C jmp PM_MAIN ; Called when the COMM app loads new data (Reset application)
+L011C bset 1,BTNFLAGS ; Request a TICK event every 1/10 sec.
+ rts
+L011F lda STATETAB0,X ; The state table get routine
+ rts
+
+L0123 jmp PM_HANDLE_STATE0
+ db STATETAB0-STATETAB0
+
+;
+; State Table
+;
+
+STATETAB0
+ db 0
+ db EVT_ENTER,TIM_ONCE,0 ; Initial state
+ db EVT_RESUME,TIM_ONCE,0 ; Resume from a nested app
+ db EVT_NEXT,TIM_ONCE,0
+ db EVT_PREV,TIM_ONCE,0 ; Various buttons pressed
+ db EVT_DNSET,TIM_ONCE,0
+ db EVT_UPSET,TIM_ONCE,0
+ db EVT_MODE,TIM_ONCE,0
+ db EVT_GLOW,TIM_ONCE,0
+ db EVT_USER2,TIM_ONCE,$FF ; User Event : Exit app
+ db EVT_END
+
+; Various display Strings
+
+BANNERS
+S8_CHRONO timex "-CHRONO-"
+S8_NUMPAD timex "NUMPAD 1"
+
+; Cursor Table - for turning "cursor" segments on
+
+CURSORS db ROW_T1I,ROW_T2I,ROW_T3I,ROW_T4I,ROW_T5I,ROW_T6I
+
+; DIGITS is the main storage for the NUMPAD wristapps
+
+DIGITS equ DIGITS1-16 ; So that offsets are right
+
+DIGITS1 db DASH,DASH,DASH,DASH,DASH,DASH
+ db DASH,DASH,DASH,DASH,DASH,DASH
+
+; Note: there must be exactly 4 bytes filler between here and digits2
+
+X_IN_Y db 24,60,60,100 ; 24 hours in a day, 60 minutes in an hour, etc...
+
+DIGITS2 db DASH,DASH,DASH,DASH,DASH,DASH
+ db DASH,DASH,DASH,DASH,DASH,DASH
+
+; Note: there must be exactly 4 bytes filler between here and digits3
+
+ db 0
+
+ROLL_TABLE equ ROLL_TABLEX-$1D
+ROLL_TABLEX db 9,DASH,0 ; See PN_CHANGE routine
+
+DIGITS3 db DASH,DASH,DASH,DASH,DASH,DASH
+ db DASH,DASH,DASH,DASH,DASH,DASH
+
+;
+; General/Setup routines
+;
+PM_MAIN ; This routine gets called after app/data is uploaded
+ lda #SV_SPLIT+SV_ALARM ; Defaults for chronometer
+ sta STATUS ; Set default status
+
+ lda #$C0 ; Store WristApp flags
+ sta WRISTAPP_FLAGS ; Button Beeps = System, Loaded = Yes
+;?B{
+ bclr 7,MODE_FLAGS
+ brclr 4,MODE_FLAGS,PM_MAIN1
+ bset 7,MODE_FLAGS
+;?B}
+PM_MAIN1
+ clr COUNT_INIT ; Clear Countdown
+ jsr PT_RESET_TIMER ; Reset Chronometer time
+ bset 1,BTNFLAGS ; Request a TICK event every 1/10 sec.
+
+PM_SLEEP ; Called when we get suspended
+ bclr ST_BPRESSED,STATUS ; Clear the button-pressed indicator
+ bset ST_SPLIT,STATUS ; Set split mode (Disables display of timer)
+ clr CURRENT_PROGRAM ; Reset current program to 0
+ rts
+;
+; Application State table handler
+;
+
+PM_HANDLE_STATE0 ; This routine gets called whenever an event is triggered
+ jsr SNDSTOP ; Shudup!
+ lda BTNSTATE ; Get the event
+ cmp #EVT_MODE ; Is it the mode button?
+ bne PM_HANDLE_APP ; No, handle program
+
+PM_HANDLE_NEXT_APP
+ lda #EVT_ENTER
+ inc CURRENT_PROGRAM ; Yes, increment program number
+
+ brclr 2,CURRENT_PROGRAM,PM_HANDLE_APP ; Are we now in program number 4?
+
+ ; for some inexplicable reason, when this application returns to TIME mode, it
+ ; does not produce the distinctive sound that it is supposed to. this is a workaround
+ ; for that. This is pretty good code to comment out if you need an extra 10 bytes
+;?A{
+ brclr 4,MODE_FLAGS,PM_NO_RETURN_BEEP ; Should we make a 'return to time' beep?
+;?A}
+ lda #SND_RETURN
+ sta SYSSOUND ; Play Sound
+ jsr SNDSTART ;
+
+PM_NO_RETURN_BEEP
+
+ bsr PM_SLEEP ; Get ready to say bye
+
+ lda #EVT_USER2 ; Go back to original state
+ jmp POSTEVENT
+
+PM_HANDLE_APP
+ ldx CURRENT_PROGRAM ; Is this program 0?
+ bne PN_HANDLE_NUMPAD ; Yes, go to timer
+ jmp PT_HANDLE_TIMER
+
+
+;###########################
+;# NUMPAD APPLICATION CODE #
+;###########################
+; Application handler gets called on any event
+
+PN_HANDLE_NUMPAD ; Called if we are the current app, and there is an event pending
+ bset ST_SPLIT,STATUS ; Set split mode (Disables display of timer)
+
+; bset 1,APP_FLAGS ; Indicate that we can be suspended
+ ; Disabled; we cannot be suspended.
+
+ brset ST_BPRESSED,STATUS,PM_HANDLE_NEXT_APP ; If the user did something in timer, we want out...
+
+ cmp #EVT_ENTER ; Is this our initial entry?
+ beq PN_CURSORFIRST ; Yes, just move cursor to top/left position
+
+ ldx CURSOR ; Next 2 routines need CURSOR in X
+
+ cmp #EVT_DNSET ; SET Button - Move cursor right
+ beq PN_CURSORRIGHT ;
+
+ cmp #EVT_GLOW ; SET Button - Move cursor left
+ beq PN_CURSORLEFT ;
+
+ ldx DIGITS,X ; Next 3 routines need DIGIT,CURSOR in X
+
+ cmp #EVT_PREV ; PREV decrements the value
+ beq PN_CHANGE_DOWN ;
+
+ ;cmp #EVT_NEXT ; NEXT increments the value
+ tsta ; since #EVT_NEXT = 0
+ beq PN_CHANGE_UP ;
+
+ bra PN_CHANGE_OK ; Catch-all
+
+; Routines to handle digit changes
+; Increment or decrement the digit
+; X must have the current digit value in it.
+
+PN_CHANGE_UP
+ incx ; Twice, because it will be dec'd later
+ incx
+
+PN_CHANGE_DOWN
+ decx
+ bmi PN_CHANGE_DASH ; If it is $FF or 10, Change it to DASH
+ cpx #10
+ bne PN_CHANGE_ROLL
+
+PN_CHANGE_DASH
+ ldx #DASH
+
+PN_CHANGE_ROLL
+ cpx #10 ; Handle transition from 9 <-> DASH <-> 0
+ blo PN_CHANGE_OK ; Does it need to be rolled?
+ ldx ROLL_TABLE,X
+
+PN_CHANGE_OK ; Done
+ txa
+ ldx CURSOR
+ sta DIGITS,X
+ bra PN_REDRAW ; Remember, redraw needs Cursor in X
+
+; Routines to handle Cursor Movement
+PN_CURSORFIRST ; Set cursor to 0 (left/top most) digit
+ ldx #$FF ; (Set it to -1 and let following routine fix it)
+
+PN_CURSORRIGHT ; Move cursor right
+ incx
+ incx
+
+PN_CURSORLEFT ; Move cursor left
+ decx
+
+PN_REDRAW ; Set Cursor, then redraw. X must contain current cursor
+PN_CURSOR_SET ; Handle rolling off the edge in both directions
+ txa
+ and #$0F ; A = A mod 16
+ cmp #$0C ; if a = 13 then a = 0
+ beq PN_CURSORFIRST ;
+ cmp #$0F ; if a = -1 then a = 12
+ bne PN_CURSOR_SET1 ;
+PN_CURSORLAST ;
+ lda #$0B ;
+
+PN_CURSOR_SET1 ; A contains CURSOR mod 16
+ ldx CURRENT_PROGRAM
+ stx S8_NUMPAD+7 ; Patch display to read 'NUMPAD n'
+ lslx
+ lslx
+ lslx
+ lslx
+ stx TEMP ; TEMP = (Program * 16)
+ add TEMP
+ sta CURSOR ; CURSOR = CURSOR + (Program * 16)
+ txa
+ add #DIGITS - START ; TEMP = DIGITS - START + (Program * 16)
+ sta TEMP
+
+ brset 3,$93,PN_CURSOR_KEEPGLOW ; Are we in night mode?
+ jsr INDIGLO_OFF ; no, turn off indiglo, in case GLOW was pressed
+
+PN_CURSOR_KEEPGLOW
+ jsr CLEARALL ; Clear the display
+
+ lda TEMP
+
+ jsr PUT6TOP ; Print Line 1
+ lda TEMP
+ add #6
+ jsr PUT6MID ; Print Line 2
+
+ lda #S8_NUMPAD-START
+ jsr BANNER8 ; Print banner
+;
+; Cursor logic - displays a "," on the digit currently being edited
+; Some effort made to keep this code compatible with the 150 and the 150S
+;
+ lda CURSOR
+ and #$0F ; Cursor = Cursor mod 16
+ tax
+ sub #$06
+ bpl PN_REDRAWMID ; If cursor >=6 then we are on line 2
+PN_REDRAWTOP ; See definition of DISP_ROW in WRISTAPP.I
+ ldx CURSORS,X
+ stx DISP_ROW
+ bset COL_T1I,DISP_COL
+ rts
+PN_REDRAWMID
+ tax
+ ldx CURSORS,X
+ stx DISP_ROW
+ bset COL_M1I,DISP_COL
+ rts
+
+;###########################
+;# TIMER APPLICATION CODE #
+;###########################
+
+PT_HANDLE_TIMER
+ bset ST_REDRAW,STATUS
+
+PT_HANDLE_TIMER0
+ cmp #EVT_ENTER ; Is this our initial entry?
+ beq PT_ENTER
+
+ cmp #EVT_RESUME ; Are we resuming from Suspense?
+ beq PT_RESUME
+
+ bset ST_BPRESSED,STATUS ; Mark that the user has pressed a button here
+
+ ;cmp #EVT_NEXT ; Next button
+ tsta
+ beq PT_START_STOP
+
+ cmp #EVT_PREV ; PREV button
+ beq PT_SPLIT
+
+ cmp #EVT_GLOW ; Let it glow, let it glow, let it glow
+ beq PT_RETURN
+
+ cmp #EVT_UPSET ; Did they release the SET key?
+ beq PT_COUNTDOWN_DONE ; yes - get out of countdown set mode
+
+ jmp PT_COUNTDOWN_SET ; Must be the SET button (DOWN)
+
+
+PT_ENTER ; Routine called when we first enter the timer
+PT_RESUME ; and if we are resuming
+ jsr CLEARALL
+;
+ jsr PUT_HOURX ; just to display the colon
+
+; lda #ROW_MC23 ; format display as __:__.__
+; sta DISP_ROW
+; bset COL_MC23,DISP_COL
+
+; lda #ROW_MP45 ; replaced by call to PUT_MINUTEX, below
+; sta DISP_ROW
+; bset COL_MP45,DISP_COL
+
+ bclr ST_REDRAWING,STATUS
+
+PT_COUNTDOWN_DONE ; Stop incrementing the counter, if we are
+ bclr ST_SETCOUNT,STATUS
+
+PT_SPLIT_OFF ; Set split off
+ bset ST_100S,STATUS ; Show the real 100th digit
+
+ lda #S8_CHRONO-START ; Display "CHRONO" again
+ jsr BANNER8
+
+ bra PT_REDRAW_AND_CLEAR_SPLIT
+
+PT_START_STOP ; Called when NEXT is pressed
+ brclr ST_RUNNING,STATUS,PT_START ; If we are stopped, then Start
+ bset ST_100S,STATUS ; Prepare to display the 100's
+ jsr PT_TICK ; To redisplay the 1/100s byte with the present value
+ bclr ST_RUNNING,STATUS ; Stop
+ rts
+
+PT_START ; Restarts the timer
+ lda TICKER
+ sta LASTTICK
+ bset ST_RUNNING,STATUS ; Run!
+PT_RETURN
+ rts
+
+PT_SPLIT_TOGGLE ; We are here because the timer is running
+ ;brset ST_SPLIT,STATUS,PT_SPLIT_OFF ; Already in SPLIT? Clear it, done
+ lda #SYS8_SPLIT ; enter SPLIT mode
+ jsr PUTMSGBOT
+ bset ST_100S,STATUS
+ jsr PT_TICK ; To fore update of 1/100s byte with the present value
+ bset ST_SPLIT,STATUS
+ rts
+
+PT_SPLIT ; Called when PREVIOUS is pressed
+ brset ST_SPLIT,STATUS,PT_SPLIT_OFF ; If we are stopped and split, just clear split
+ brset ST_RUNNING,STATUS,PT_SPLIT_TOGGLE ; If we are running, just go to split mode
+
+ lda COUNT_LAST ; If count_last = FF
+ inca
+ bne PT_RESET_TIMER ; Zero the stopwatch
+
+ lda COUNT_INIT ; Is counter turned off?
+ bne PT_SPLIT_CLEAR_COUNT_INIT ; Turn off counter
+
+ lda STATUS ; Nothing else to do, so toggle alarm/beep mode
+ eor #SV_ALARM ; Flip Alarm bit
+ sta STATUS
+;?B{
+ and #SV_ALARM
+ bne PT_SPLIT_CLEAR_COUNT_INIT
+
+ lda MODE_FLAGS ; toggle keybeeps
+ eor #$80 ; bit 7
+ sta MODE_FLAGS
+;?B}
+PT_SPLIT_CLEAR_COUNT_INIT
+ clr COUNT_INIT
+
+PT_RESET_TIMER ; Clear Hours, Minutes, Seconds
+ ldx #3
+PT_RESET_LOOP
+ clr HOURS,X
+ decx
+ bpl PT_RESET_LOOP
+
+ stx COUNT_LAST ; Conveniently, X contains $FF, which will force
+ ; an update the moment we start the chronometer
+ lda COUNT_INIT
+
+PT_RESET_COUNT_NOW
+ sta COUNT_NOW ; reset countdown
+
+PT_REDRAW_AND_CLEAR_SPLIT
+ bclr ST_SPLIT,STATUS
+ bset ST_REDRAW,STATUS
+
+PT_REDRAW ; Redraws the timer display
+
+ brset ST_SPLIT,STATUS,PT_RETURN ; Don't redraw if we are in split mode
+ brset ST_REDRAWING,STATUS,PT_RETURN ; Don't redraw if we are already redrawing
+ bset ST_REDRAWING,STATUS ; Having some strange problems with segments getting
+ ; trashed when buttons pressed. It appears that the
+ ; problem is that tick events happen while this routine is
+ ; running. This flag checks for the problem
+ ldx HUNDREDS
+ jsr FMTXLEAD0
+
+ ; Hide the 100s digit. Because we usually get a tick every 10/100s of a second,
+ ; this digit tends to appear 'stuck' on the display, even though it is
+ ; internally computed correctly.
+
+ brset ST_100S,STATUS,PT_REDRAW_NOHIDE ; Show the real 100th digit
+ clr DATDIGIT2
+PT_REDRAW_NOHIDE
+ bclr ST_100S,STATUS
+ jsr PUTTOP56
+
+ brclr ST_REDRAW,STATUS,PT_REDRAW_SKIP ; Skip the rest if we don't need them.
+
+ ldx SECONDS
+ jsr FMTXLEAD0
+ jsr PUTMID56
+
+ ldx MINUTES
+ jsr PUT_MINUTEX
+ ;jsr FMTXLEAD0
+ ;jsr PUTMID34
+
+ ldx HOURS
+ ;jsr PUT_HOURX
+ jsr FMTXLEAD0
+ jsr PUTMID12
+
+ ldx COUNT_NOW
+ jsr FMTX
+
+ ldx COUNT_INIT
+ bne PT_REDRAW_100S
+ jsr FMTBLANK0
+
+PT_REDRAW_100S
+ jsr PUTTOP12
+
+PT_REDRAW_INDICATORS
+ lda #ROW_ALARM ; Now show or hide the little "o)))" icon
+ sta DISP_ROW
+ bclr COL_ALARM,DISP_COL ; hide it
+ brclr ST_ALARM,STATUS,PT_REDRAW_DONE0
+ bset COL_ALARM,DISP_COL ; show it
+
+PT_REDRAW_DONE0
+;?B{
+ lda #ROW_NOTE ; Now show or hide the little "Note" icon
+ sta DISP_ROW
+ bclr COL_NOTE,DISP_COL ; hide it
+ brclr 7,MODE_FLAGS,PT_REDRAW_DONE1
+ bset COL_NOTE,DISP_COL ; show it
+;?B}
+PT_REDRAW_DONE1
+PT_REDRAW_SKIP
+ bclr ST_REDRAWING,STATUS
+ bclr ST_REDRAW,STATUS
+PT_RETURN2
+ rts ; DONE
+
+PT_COUNTDOWN_SET ; User pressed the SET button
+ lda COUNT_LAST ; If count_last = FF
+ inca ; (i.e. stopwatch display is not 00)
+ bne PT_RESET_TIMER ; just reset the stopwatch
+
+ lda #6 ; Ok, increment the countdown period. If the user keeps this button
+ sta TEMP ; pressed for over 8/10s sec, we will start incrementing it rapidly
+
+ lda #SYS8_SET ; Display 'SET'
+ jsr PUTMSGBOT
+
+ bset ST_SETCOUNT,STATUS
+ bra PT_COUNTDOWN_INC
+
+PT_TICK ; Called approx. every 1/10th second
+
+ bsr PA_FUDGE_ALARMS
+
+PT_COUNTDOWN_TIMED_INC ; The user is pressing on the SET key, handle it
+ brclr ST_SETCOUNT,STATUS,PT_COUNTDOWN_TIMED_INC_DONE ; No s/he is not
+ brset 7,TEMP,PT_COUNTDOWN_INC; Have we been in this mode for > 8/10ths second? (Temp = -1)
+ dec TEMP
+
+PT_COUNTDOWN_TIMED_INC_DONE
+ brclr ST_RUNNING,STATUS,PT_RETURN2 ; Do nothing if we are paused
+
+ lda TICKER ; This is a constantly rolling counter, it increments by one every 1/100sec
+ tax
+ sub LASTTICK ; figure out how many 1/100s elapsed since we were last here
+ stx LASTTICK ; and remember it for next time
+
+ add HUNDREDS ; Add that to our 'hundreds' byte
+ sta HUNDREDS
+
+ ldx #3 ; for byte=hundreds to hours
+
+PT_TICK_LOOP ; Whenever one of the bytes overflows,
+ lda HOURS,X ; this loop increments the next higher
+ sub X_IN_Y,X ; byte.
+ blo PT_TICK_DONE
+ bset ST_REDRAW,STATUS ; We'll have to redraw
+ sta HOURS,X ; Store subtracted value in current byte
+ inc HOURS-1,X ; and Increment the next higher byte
+ decx ; note: TEMP gets trashed
+ bpl PT_TICK_LOOP ; loop
+
+PT_TICK_DONE
+ ldx MINUTES ; Yes - Have the minutes changed since we were here last?
+ cpx COUNT_LAST
+ beq PT_TICK_DONE0 ; No - bye
+ stx COUNT_LAST ; Remember the current number of minutes
+
+ lda COUNT_INIT ; Are we using the countdown feature?
+ beq PT_TICK_DONE0 ; No - bye
+
+ dec COUNT_NOW
+ bpl PT_TICK_DONE0 ; Out of time?
+
+ deca ; Reset the time, A still contains COUNT_INIT
+ sta COUNT_NOW
+
+ lda #SND_CONF
+ brclr ST_ALARM,STATUS,PT_TICK_BEEP ; Should we beep or should we start the alarm?
+ lda #SND_ALARM
+
+PT_TICK_BEEP
+ sta SYSSOUND ; Play Sound
+ jsr SNDSTART ;
+
+PT_TICK_DONE0 ; Done, now redraw the screen
+ jmp PT_REDRAW
+
+PT_COUNTDOWN_INC
+ lda COUNT_INIT ; Increment the value of COUNT_INIT by A+1
+ ldx #99
+ jsr INCA_WRAPX
+
+PT_COUNTDOWN_INC0
+ sta COUNT_INIT
+ jmp PT_RESET_COUNT_NOW ; Update the COUNT_NOW byte (for display) and redraw
+
+;######################
+;# WEEKLY ALARM CODE #
+;######################
+
+PA_FUDGE_ALARMS
+
+ ; Note: TEMP and DOW are the same variable!
+
+ lda CURRENT_APP
+ and #$02
+ bne PA_RETURN ; Do not run this code if we are in ALARM or COMM mode
+;?B{
+ bset 4,MODE_FLAGS
+ brset 7,MODE_FLAGS,PA_ADJUST
+ bclr 4,MODE_FLAGS
+;?B}
+;?C{
+ ; Hourly Chime Control Code
+ ; Note : This only works for Time Zone 1
+
+ lda TZ1_HOUR
+
+ jsr CHECK_TZ ; See which one we are really using
+ bcc PA_SET_CHIME ; If we were right, just skip on to do the work
+ lda TZ2_HOUR ; Wrong guess, just load up the second time zone
+
+PA_SET_CHIME
+ cmp #20 ; 8 O'Clock PM
+ bhi PA_CHIME_OFF
+ cmp #08 ; 8 o'Clock AM
+ blo PA_CHIME_OFF
+
+ bset 2,MODE_FLAGS
+ bra PA_SET_CHIME_DONE
+
+PA_CHIME_OFF
+ bclr 2,MODE_FLAGS
+PA_SET_CHIME_DONE
+;?C}
+PA_ADJUST
+;?W{
+ lda TZ1_DOW ; Assume that we are using the first timezone
+ jsr CHECK_TZ ; See which one we are really using
+ bcc PA_SET_DOW ; If we were right, just skip on to do the work
+ lda TZ2_DOW ; Wrong guess, just load up the second time zone
+
+PA_SET_DOW
+ inca ; Adjust to our numbering scheme
+ sta DOW
+ lda #4 ; For 5 alarms
+
+PA_LOOP
+ tax ; Silly register tricks
+ lslx
+ lslx
+ lslx
+ ldx $0476,X ; get last digit on display
+ beq PA_WEEKDAY ; if 0, do weekday routine
+ cpx #8 ; if 8, do weekend routine
+ beq PA_WEEKEND
+ bhi PA_NEXT ; if > 8 do nothing
+ cpx DOW ; compare with day of week
+ beq PA_ALARM_ON
+PA_ALARM_OFF ; Set the alarm off
+ tax
+ lda ALARM_STATUS,X ; Set the alarm off
+ and #$FE
+ bra PA_SET
+PA_WEEKEND ; Is today a weekend?
+ ldx DOW
+ cpx #5
+ bhi PA_ALARM_ON
+ bra PA_ALARM_OFF
+PA_WEEKDAY ; Is today a weekday?
+ ldx DOW
+ cpx #5
+ bhi PA_ALARM_OFF
+PA_ALARM_ON ; Set the alarm on
+ tax
+ lda ALARM_STATUS,X
+ ora #$01
+PA_SET
+ sta ALARM_STATUS,X ; done
+ txa
+PA_NEXT
+ deca
+ bpl PA_LOOP ; next timer
+;?W}
+PA_RETURN
+ rts
diff --git a/from_timex/Makefile b/from_timex/Makefile
new file mode 100644
index 0000000..509fd39
--- /dev/null
+++ b/from_timex/Makefile
@@ -0,0 +1,11 @@
+ZAPS=chrono12.zap conv01.zap copyme01.zap golf01.zap melody17.zap note13.zap pulse01.zap quick13.zap timer13.zap wksiso11.zap wksusa11.zap world01.zap
+APPS=${ZAPS:%.zap=%.app}
+
+default: ${APPS}
+
+%.app:%.zap
+ ../tools/zap2app $< $@
+
+clean:
+ /bin/rm -f ${APPS}
+
diff --git a/from_timex/chrono12.zap b/from_timex/chrono12.zap
new file mode 100644
index 0000000..15f76a2
--- /dev/null
+++ b/from_timex/chrono12.zap
@@ -0,0 +1,27 @@
+TDL0306962¬
+Stopwatch¬
+CHRONO12¬
+The Timex Stopwatch WristApp is a chronograph.
+It times events by starting from zero and counting up.
+
+TIP: Download your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!¬
+watchapp.hlp¬
+101¬
+none¬
+Timex Data Link 150 Watch¬
+CC01D4819D9DCC0200CC01DC819D9DD601E981CC0137003C371B0E1C0E1D24243D371C1D181924B691A11A270FA11B2713A1002731A1032742CC01D1CD577ACD030B207DC604A1261310651B671565CD577AA69CCD58ACA648CC584CA637CD4E894FC704A18102900E02650B0A67081290B626B766204A13902046016505CD577A1165039030B667A820B767B665A804B765B661C702B7B662C702B8B663C702B9B664C702BA1C67CD030B4FC702B6A604C702B5200B0B67061B6715652002AD03CC02BB1390A6C0B79618963F613F623F633F643F673F65810000FF0003FF0001FFFF1AFF001B84001FFF0037FFFF1DC604C4A1082607006504186720021967156713671167B62697B1662504B06620043066BB66BF66BB64A1632204B7642042A0643C63A16322F8B7641467B663A13C2530A03CB76312673C62B662A13C25223F62B661A16324063C6110672014A663B764A63BB763B76213901265096744CD030609673E0A6715CD0398056735CD036C03672FCD0339016729CC0314C602B54A260FB667A840B767C602B64CC702B6A604C702B5C602B6A11E25041B671565CC02BB81000000000000016505CD577A116502902A0A6738B661BA62BA63BA642619A6D0CD584CA624B71D141EA636B71D161EA6A8CD58ACCC0398AD18201B0A6707A61FCD584520110C6704CD578781A6C8CC584CA617CC5845AD07AD2AAD5BCC0398046504BE612003CE02B7A300260BCD595CA636B71D171E2009CD5951A636B71D161ECC5910046506BE62B6612006CE02B8C602B7A1002614A300260BCD595CA624B71D151E200ECD59512003CD593EA624B71D141ECC5920046508BE63B661BA622009CE02B9C602B7CA02B8A100260EA3002605CD595C2008CD59512003CD593ECC59300A6714039011B667A808B767076704AE082002AE092010046504BE642003CE02BAD66B60A40F97A614CD570D046504BE642003CE02BADE6B6054545454A622CC570D¬
+56756¬
+0¬
+Stopwatch¬
+CHRONO22¬
+The Timex Stopwatch WristApp is a chronograph.
+It times events by starting from zero and counting up.
+
+TIP: Download your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!¬
+watchapp.hlp¬
+101¬
+none¬
+Timex Data Link 150s Watch¬
+CC01EB819D9DCC0206CC01F3819D9DD6013781CC014E003C371B0E1C0E1D24243D371C1D1819240000FF0003FF0001FFFF1AFF001B84001FFF0037FFFF1DB691A11A270FA11B2713A1002731A1032742CC01E8CD5AA0CD030B207DC604A1261310651B671565CD5AA0A69CCD57ADA648CC574DA637CD4E784FC704A18102900E02650B0A67081290B626B766204A13902046016505CD5AA01165039030B667A820B767B665A804B765B661C70202B662C70203B663C70204B664C702051C67CD030B4FC70201A604C70200200B0B67061B6715652002AD03CC02BB1390A6C0B79618963F613F623F633F643F673F6581000000000000C604C4A1082607006504186720021967156713671167B62697B1662504B06620043066BB66BF66BB64A1632204B7642042A0643C63A16322F8B7641467B663A13C2530A03CB76312673C62B662A13C25223F62B661A16324063C6110672014A663B764A63BB763B76213901265096744CD030609673E0A6715CD0398056735CD036C03672FCD0339016729CC0314C602004A260FB667A840B767C602014CC70201A604C70200C60201A11E25041B671565CC02BB81016505CD5AA0116502902A0A6738B661BA62BA63BA642619A6D0CD574DA622B71D141EA634B71D161EA6A8CD57ADCC0398AD18201B0A6707A61FCD574620110C6704CD5AAD81A6C8CC574DA617CC5746AD07AD2AAD5BCC0398046504BE612003CE0202A300260BCD585DA634B71D171E2009CD5852A634B71D161ECC5811046506BE62B6612006CE0203C60202A1002614A300260BCD585DA622B71D151E200ECD58522003CD583FA622B71D141ECC5821046508BE63B661BA622009CE0204C60202CA0203A100260EA3002605CD585D2008CD58522003CD583FCC58310A6714039011B667A808B767076704AE082002AE092010046504BE642003CE0205D66B69A40F97A612CD5A33046504BE642003CE0205DE6B6954545454A620CC5A33¬
+55081¬
+0¬ \ No newline at end of file
diff --git a/from_timex/conv01.zap b/from_timex/conv01.zap
new file mode 100644
index 0000000..37a0cd8
--- /dev/null
+++ b/from_timex/conv01.zap
@@ -0,0 +1,31 @@
+TDL0704962¬
+Conversion¬
+Conv11¬
+The Timex Conversion WristApp gives you a table for converting values from one unit to another.
+
+Choose the Input/Configure button to select the conversion that you find most useful. Your choices include currency, distance, temperature, tips, and more.
+
+TIP: Download to your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!¬
+watchapp.hlp¬
+108¬
+convmain.exe¬
+Timex Data Link 150 Watch¬
+CC01B2CC0192CC02B1819D9D819D9DD6019581CC0135001400150E1B1D1E1C0D313D170E0D128FB691A11B261CCD58D2C604A1260AA617CD58A8A648CC584C4FC704A1A637CD4E8981A11A2704A11E2605CD579F2024A180260414632006A18326051563CD0272A1022609C602C7B76117632006A1A526021390A61DCD5845CC01BD139081001AFF001B01001EFF0080FF0083FF0002FF0001FFFFA5FF0037FFFF1DA6C0B7963F613F623F6381076303CC5979B66148BB61B762AD211363AD3ECD5910AD77CD5920CD0262A624B71D151E0C6306A624B71D141ECC59301263AD1DCD58E0AD56CD58F0CD0262A624B71D111E0C6306A624B71D101ECC5900B663A43EB763BE62036305DE02CA2003DE0360260210639FA1FF26041E63200DA16425091C63A06497260210630F630BA61DB7A2A61EB7A3106381CC594DBE62036305DE02CB2003DE0361006303CC593ECC5951BE62036305DE02CC2003DE0362CC593E3FA51290B6610563160763071763C602C72022C102C824034C201A166320180763071763C602C8200CC102C723034A200416632002B761A61DCD5845CC01BD3CA5B6A5A108250D27BBC102C92506A608B7A520B081003108000100000200000300000400000500000600000700000800000900000A00000C00000E00001000001200001400001600001800001A00001C00001E00002000002200002400002600002800002A00002C00002E00003000003200003700003C00004100004600004B00005000005500005A00005F00010000011900013200014B000200000232000300000400000500000732000A000000014600032900050B000651000834000A16000B5C000D3F000F2100110300142C001755001B19001E4200220700252F002858002C1D002F4600330A00363300395C003D2000404900440E004736004A5F004E2400514C005511005D45010214010A48011318011B4C01241B012C4F01351F013D52014622020C5D02373302620A032844041955050B020651240833460C4D37110328¬
+61397¬
+1¬
+Sample Data¬
+Conversion¬
+Conv21¬
+The Timex Conversion WristApp gives you a table for converting values from one unit to another.
+
+Choose the Input/Configure button to select the conversion that you find most useful. Your choices include currency, distance, temperature, tips, and more.
+
+TIP: Download to your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!¬
+watchapp.hlp¬
+108¬
+convmain.exe¬
+Timex Data Link 150s Watch¬
+CC0247CC03F3CC0291819D9D819D9DD602A781CC0135001400150E1B1D1E1C0D313D170E0D128FB691A11B261CCD57D3C604A1260AA617CD57A9A648CC574D4FC704A1A637CD4E7881A11A2704A11E2605CD5ACB2024A180260414632006A18326051563CD0252A1022609C602C4B76117632006A1A526021390A61DCD5746CC0192076303CC587AB66148BB61B762AD211363AD3ECD5811AD77CD5821CD0237A622B71D151E0C6306A622B71D141ECC58311263AD1DCD57E1AD56CD57F1CD0237A622B71D111E0C6306A622B71D101ECC5801B663A43EB763BE62036305DE02C72003DE035D260210639FA1FF26041E63200DA16425091C63A06497260210630F630BA61DB7A2A61EB7A3106381CC584EBE62036305DE02C82003DE035E006303CC583FCC5852BE62036305DE02C92003DE035FCC583FA6C0B7963F613F623F63813FA51290B6610563160763071763C602C42022C102C524034C201A166320180763071763C602C5200CC102C423034A200416632002B761A61DCD5746CC01923CA5B6A5A108250D27BBC102C62506A608B7A520B081001AFF001B01001EFF0080FF0083FF0002FF0001FFFFA5FF0037FFFF1D003108000100000200000300000400000500000600000700000800000900000A00000C00000E00001000001200001400001600001800001A00001C00001E00002000002200002400002600002800002A00002C00002E00003000003200003700003C00004100004600004B00005000005500005A00005F00010000011900013200014B000200000232000300000400000500000732000A000000014600032900050B000651000834000A16000B5C000D3F000F2100110300142C001755001B19001E4200220700252F002858002C1D002F4600330A00363300395C003D2000404900440E004736004A5F004E2400514C005511005D45010214010A48011318011B4C01241B012C4F01351F013D52014622020C5D02373302620A032844041955050B020651240833460C4D37110328139081¬
+54635¬
+1¬
+Sample Data¬
diff --git a/from_timex/copyme01.zap b/from_timex/copyme01.zap
new file mode 100644
index 0000000..f25289f
--- /dev/null
+++ b/from_timex/copyme01.zap
@@ -0,0 +1,25 @@
+TDL0807962¬
+CopyMe Game¬
+copyme14¬
+CopyMe is a memory game. The watch displays a sequence of 0's that you must duplicate using the watch's buttons. If you are successful, the watch adds another step to the sequence. Make it through 15 steps and you win!
+
+TIP: Download to your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!¬
+WATCHAPP.HLP¬
+112¬
+none¬
+Timex Data Link 150 Watch¬
+CC0271CC0276CC033B819D9D819D9DD6025D81CC017E001D0C00161B1D1D140E1D1D24241018180D2424100A160E242405180A17181D243D2437241018240C18192224160E25241C181B1B2224240006241C1D0E191C1A1215150E1701040F010101010101010101010101010101B691A11B2713A11A2734A11E273FA1A52744A185274FCC025CC604A126163F633F643F65A617CD587EA61CCD58A8A628CD5845814FC704A1A638CD4E8981CD577AB665A1002706A602B7652000CD0368CD0372CC025CB665A1012606CD58D2CD58D8CC025CC604C3A1042716A101262019931390A6FFB767A600B766A638CD4E898109680B0A6808CD4E80168FCD4E4ACD0368B665A100270AA1022714A1012725203BCD02E73F61C6016DC7016C4FB766C604C3A1002609A601B765CD0283201DCD03722018CE04C3CD03ADBE61D6016FC104C32605CD029E2003CD02D481001AFF001B01001EFF0038FFFF85FF00A5FF001DA6C0B7968119931390A6FFB767A600B76681A6FACD0323CD577ACD03CCA6E1CD0323CD03803F61A63ECD5845813C61B661C1016C2627C6016C4CC7016CC6016CC1016E2313A600B765A656CD587ECD58D8A636CD58452003CD02832005A622CD584581A646CD5845A6FACD0323A603B7653F67129081B6B0BBB1BBB2BBB3BBB4BBB8BBAFBBAEB7625FBF64B662A401B763B662A40244B863443662B662A403A10125014CD7016FBE645CBF64C3016E25DA81AEFA5A26FD4A26F84FC77FF081A6FACD0323A6FACD032381036704A61D2002A600B766BE61DE016FCD03AD3C67B667A10C26111390A6FFB767A600B765A600B766CD03728115921F92CD4E8E189381CD58D8A630CD587EA636CD584581CD58D2CD58D85FBF64A67DCD0323BE64D6016F97CD03ADA67DCD0323CD58D2CD58D8BE645CBF64C3016C25DD81A3022304A6462002A614A300270BA3042707BE66CD57452005BE66CD570D81CD5787A64ECD5845C6016C5FA10A2505A00A5C20F7B763A3002602AE24A647CD56D5BE63A63DCD56D581¬
+41136¬
+0¬
+CopyMe Game¬
+copyme24¬
+CopyMe is a memory game. The watch displays a sequence of 0s and you must duplicate that sequence using the watch's buttons. If you are successful, the watch adds another step to the sequence. Make it through 15 steps and you win!
+
+TIP: Download to your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!¬
+WATCHAPP.HLP¬
+112¬
+none¬
+Timex Data Link 150s Watch¬
+CC0359CC025DCC0322819D9D819D9DD603E281CC017E001D0C00161B1D1D140E1D1D24241018180D2424100A160E242405180A17181D243D2437241018240C18192224160E25241C181B1B2224240006241C1D0E191C1A1215150E1701040F010101010101010101010101010101B691A11B2713A11A2734A11E273FA1A52744A185274FCC025CC604A126163F633F643F65A617CD577FA61CCD57A9A628CD5746814FC704A1A638CD4E7881CD5AA0B665A1002706A602B7652000CD034FCD035ECC025CB665A1012606CD57D3CD57D9CC025CC604C3A1042716A101262019931390A6FFB767A600B766A638CD4E788109680B0A6808CD4E6F168FCD4E39CD034FB665A100270AA1022714A1012725203BCD02CE3F61C6016DC7016C4FB766C604C3A1002609A601B765CD026A201DCD035E2018CE04C3CD0399BE61D6016FC104C32605CD02852003CD02BB8119931390A6FFB767A600B76681A6FACD030ACD5AA0CD03B8A6E1CD030ACD036C3F61A63ECD5746813C61B661C1016C2627C6016C4CC7016CC6016CC1016E2313A600B765A656CD577FCD57D9A636CD57462003CD026A2005A622CD574681A646CD5746A6FACD030AA603B7653F67129081B6B0BBB1BBB2BBB3BBB4BBB8BBAFBBAEB7625FBF64B662A401B763B662A40244B863443662B662A403A10125014CD7016FBE645CBF64C3016E25DA81AEFA5A26FD4A26F84FC77FF081A6FACD030AA6FACD030A81036704A61D2002A600B766BE61DE016FCD03993C67B667A10C26111390A6FFB767A600B765A600B766CD035E8115921F92CD4E7D189381A6C0B79681CD57D9A630CD577FA636CD574681CD57D3CD57D95FBF64A67DCD030ABE64D6016F97CD0399A67DCD030ACD57D3CD57D9BE645CBF64C3016C25DD81A3022304A6442002A612A300270BA3042707BE66CD5A6B2005BE66CD5A3381CD5AADA64ECD5746C6016C5FA10A2505A00A5C20F7B763A3002602AE24A650CD59E7BE63A64FCD59E781001AFF001B01001EFF0038FFFF85FF00A5FF001D¬
+40984¬
+0¬
diff --git a/from_timex/golf01.zap b/from_timex/golf01.zap
new file mode 100644
index 0000000..49c4247
--- /dev/null
+++ b/from_timex/golf01.zap
@@ -0,0 +1,29 @@
+TDL0704962¬
+Golf¬
+golf12¬
+The Timex Golf WristApp is a golfer's electronic scorecard. Enter the number of strokes per hole and let the watch calculate the total for the round and the front and back nine.
+
+You can recall your totals or hole scores at any time.
+
+TIP: Download to your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!¬
+WATCHAPP.HLP¬
+111¬
+none¬
+Timex Data Link 150 Watch¬
+CC037DCC037C819D9D819D9D819D9DD602AC81CC01F5000C130E0A171D1D1000130F1D1800181D1D1D051100181D1D241C0C181B0E2424181E1D2431241217242424011C1D242424242402170D2424242424031B0D2424242424041D112424242424051D112424242424061D112424242424071D112424242424081D112424242424091D112424242401001D112424242401011D112424242401021D112424242401031D112424242401041D112424242401051D112424242401061D112424242401071D112424242401081D11242401010101010101010101010101010101010101010101B691A11B2616C604A1260711611761CC03644FC704A1A637CD4E8981A11F2602206EA11E2608CD4E7ACD03812062A11A2605CD579F2059A182264E0461201061CD577AA606CD5882A624B71D121EA624B71D121EA617CD58A8A62FCC58451161CD03DE4CA11323014FB762CD03A3BE635AB662D701E397CD031ECD0324A638CD4E8906613116612007A1A22606016126CC02CFA100260413612006A10326171261B663AE120361064A2A069F2003CD6B0DB763CD02D881001AFF001B84001FFF001EFF0000FF0003FF0082010001FFFFA2FF0038FF0037FFFF1DCD0353AD50AD702000BE6327145AD601E3B762046102AD5FAD2F06612B166120DF1561CD58D8A624B71D171EA637CD5845CE01E0AD19CE01DFCD5951CD59100661061661AD3EAD0D81BE62AD022053CD5951CC5930BE642210AE1DC65E29CD570DBE65CD5951CC5900C65E29CD570DBE65CD593ECC5900A624B71D161E1461A629CC58A8A624B71D131EA62EB71D181EA623CC587ECD577AA61DCD58A8A648CC584CB6634AAE0842AB3FCC584581A6C0B7963F613F623F643F654FC701DFC701E0C701E1C701E2B7635F4FD701E35CA31225F881B663A1092211B662CB01E1B066C701E1AD2EC701DF200FB662CB01E2B066C701E2AD1DC701E03F64C601E2CB01E1A16323063C64A06420F6B76581B662B76681A1632302A06481¬
+16971¬
+0¬
+Golf¬
+golf22¬
+The Timex Golf WristApp is a golfer's electronic scorecard. Enter the number of strokes per hole and let the watch calculate the total for the round and the front and back nine.
+
+You can recall your totals or hole scores at any time.
+
+TIP: Download to your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!¬
+WATCHAPP.HLP¬
+111¬
+none¬
+Timex Data Link 150s Watch¬
+CC02A2CC03A2819D9D819D9D819D9DD6037F81CC02C8000C130E0A171D1D1000130F1D1800181D1D1D051100181D1D241C0C181B0E2424181E1D2431241217242424011C1D242424242402170D2424242424031B0D2424242424041D112424242424051D112424242424061D112424242424071D112424242424081D112424242424091D112424242401001D112424242401011D112424242401021D112424242401031D112424242401041D112424242401051D112424242401061D112424242401071D112424242401081D11242401010101010101010101010101010101010101010101CD0279AD50AD702000BE6327145AD601E3B762046102AD5FAD2F06612B166120DF1561CD57D9A622B71D171EA637CD5746CE01E0AD19CE01DFCD5852CD58110661061661AD3EAD0D81BE62AD022053CD5852CC5831BE642210AE1DC65E32CD5A33BE65CD5852CC5801C65E32CD5A33BE65CD583FCC5801A622B71D161E1461A629CC57A9A622B71D131EA62CB71D181EA623CC577FCD5AA0A61DCD57A9A648CC574DB6634AAE0842AB3FCC5746A6C0B7963F613F623F643F654FC701DFC701E0C701E1C701E2B7635F4FD701E35CA31225F881B691A11B2616C604A1260711611761CC028A4FC704A1A637CD4E7881A11F2602206EA11E2608CD4E69CD02A62062A11A2605CD5ACB2059A182264E0461201061CD5AA0A606CD5783A622B71D121EA622B71D121EA617CD57A9A62FCC57461161CD03DE4CA11323014FB762CD03A3BE635AB662D701E397CD0244CD024AA638CD4E7806613116612007A1A22606016126CC01F5A100260413612006A10326171261B663AE120361064A2A069F2003CD6B16B763CD01FE81001AFF001B84001FFF001EFF0000FF0003FF0082010001FFFFA2FF0038FF0037FFFF1D81B663A1092211B662CB01E1B066C701E1AD2EC701DF200FB662CB01E2B066C701E2AD1DC701E03F64C601E2CB01E1A16323063C64A06420F6B76581B662B76681A1632302A06481¬
+22936¬
+0¬
diff --git a/from_timex/melody17.zap b/from_timex/melody17.zap
new file mode 100644
index 0000000..09d9c4a
--- /dev/null
+++ b/from_timex/melody17.zap
@@ -0,0 +1,25 @@
+TDL0724962¬ Applet file header
+Melody Tester¬ Applet friendly name
+MELODY18¬ Applet version #
+The Melody tester is used for testing Watch Tones on the watch. It sure beats waiting around for the appointment beep to go off.
+
+TIP: Download your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!¬
+WATCHAPP.HLP¬ Applet help filename
+106¬
+none¬ Applet's parent's app name (if it exists - 'none' if it doesn't)
+Timex Data Link 150 Watch¬
+CC02B3819D9D819D9D819D9D819D9DD601D681CC020A00CC02BA291D110E0A171D050019150D1D180E05180E17241C181E170D24240B1E1D1D1817240B0E0E193F1B0E1D1E1B17241D18241D12160E3F11181E1B1522240C1112160E3F0C18170F121B160A1D1218173F0A19191812171D160E171D240B0E0E193F0A150A1B16240B0E0E193F191B18101B0A16240D18201715180A0D3F0E211D1B0A3F0C181616240E1B1B181B3F0C181616240D18170E3F7B6A505D354186979DA8868583C4C1C28788898A001B84001AFF001FFF001EFF0084FF00A4FF00808301838301820100A2FF0001FF0038FFFF3984001D00A0FF00A3FF001F82011DB69B26021561128FB691A1A22731A11A272DA11F2729A11B272AA11E2749A1A4274FA1392753A1012753056103CD4F3A1561B691A1842758A1822758CC55451061CC02F1C604A126141061CD577AA621CD587EA627CD58A8A648CC584C4FC704A1A638CD4E8981BE62D601CCB79B146181016106A639CD4E8981CC55490461090968DEA6C2B79B20D81561CD4F3A20D10161E781A606CD5882A624B71D121EA61BCD58A8A62DCC58451E963F623F6181B691A11F2714056105CD4F3A1561B691A183270413612002126103610BBE6227035A200EAE09200ABE62A30927035C20015FBF62CC02F101610A1161CD577AA621CD587EBE62D601C2B7633F64BE63D60110BE64D704D23C643C63A13F26EECD5522CC5545¬
+64579¬
+0¬ No data
+Melody Tester¬ Applet friendly name
+MELODY28¬ Applet version #
+The Melody tester is used for testing Watch Tones on the watch. It sure beats waiting around for the appointment beep to go off.
+
+TIP: Download your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!¬
+WATCHAPP.HLP¬ Applet help filename
+106¬
+none¬ Applet's parent's app name (if it exists - 'none' if it doesn't)
+Timex Data Link 150s Watch¬
+CC02EA819D9D819D9D819D9D819D9DD601D681CC024100CC020A291D110E0A171D050019150D1D180E05180E17241C181E170D24240B1E1D1D1817240B0E0E193F1B0E1D1E1B17241D18241D12160E3F11181E1B1522240C1112160E3F0C18170F121B160A1D1218173F0A19191812171D160E171D240B0E0E193F0A150A1B16240B0E0E193F191B18101B0A16240D18201715180A0D3F0E211D1B0A3F0C181616240E1B1B181B3F0C181616240D18170E3F7B6A505D354186979DA8868583C4C1C28788898A001B84001AFF001FFF001EFF0084FF00A4FF00808301838301820100A2FF0001FF0038FFFF3984001D00A0FF00A3FF001F82011DB691A11F2714056105CD4F291561B691A183270413612002126103610BBE6227035A200EAE09200ABE62A30927035C20015FBF62CC02F1B69B26021561128FB691A1A22731A11A272DA11F2729A11B272AA11E2749A1A4274FA1392753A1012753056103CD4F291561B691A1842758A1822758CC55341061CC02F1C604A126141061CD5AA0A621CD577FA627CD57A9A648CC574D4FC704A1A638CD4E7881BE62D601CCB79B146181016106A639CD4E7881CC55380461090968DEA6C2B79B20D81561CD4F2920D10161E781A606CD5783A622B71D121EA61BCD57A9A62DCC57461E963F623F618101610A1161CD5AA0A621CD577FBE62D601C2B7633F64BE63D60110BE64D704D23C643C63A13F26EECD5511CC5534¬
+6781¬
+0¬ No data \ No newline at end of file
diff --git a/from_timex/note13.zap b/from_timex/note13.zap
new file mode 100644
index 0000000..b96a6d1
--- /dev/null
+++ b/from_timex/note13.zap
@@ -0,0 +1,31 @@
+TDL0321962¬
+Note¬
+NOTE13¬
+The Timex Note WristApp is used for copying up to 255 characters of text (30-40 words) to the watch. It is useful for storing directions, etc. that need to be readily accessable.
+
+Press Input/Configure to modify the note for download.
+
+TIP: Download your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!¬
+watchapp.hlp¬
+100¬
+note.exe¬
+Timex Data Link 150 Watch¬
+CC01BBCC01CECC01E2819D9D819D9DD6014381CC016500CC029B1A1D1D1D1D1D1D1D1500180E1D1D1D1D1D1D1D1D1500180E1D001B84001AFF001FFF0080FF0183FF0102FF0001FFFF38FFFF1D00A0FF00A3FF001D128FB691A11B2714A11A2725A11F2723A1022733AD62096102146181C604A126061061AD442075A638CD4E894FC704A1811061CD022605610713908115611961A604B7661290810161023F640461ED14611390CC0226A6FF4C97DE02B9A33F26F7B7673F61A6C0B7960961051961146181046108B667B7641361176181CE04C4A30D2717CE04C4A30827031390813A662609AD2D3C660261023C6681CD577AA61BCD587EA61BAB06CD58A8A648CC584CCD577AA61BAB0CCD587EA61BAB12CC58A801610F1161ADE808610804612B3F64036126046123B667A108231D06610EB667B16426043F6420103C64200CBE642606B667B76420023A64B664B7633F6203610AB664BA622604A604B766BE62D65E32B765BE63DE02B9A33F260CB667A1082313A6FFB763B665CD56D53C633C62BE62A30826D781B691A1832704176120021661056104186115611261A604B7661290CC02261D11121C24121C241D110E240D0E0F0A1E151D240D0A1D0A240F181B241D110E240D0E0F0A1E151D240A1919241D110A1D241C1E1919181B1D1C241D110E240D0E0F0A1E151D24201B121C1D0A1919240F181B2422181E30241D110E240D0E0F0A1E151D241E1C0E1B323F¬
+62974¬
+1¬
+This is the default data for the default app that supports the default WristApp for you, the default user.¬
+Note¬
+NOTE23¬
+The Timex Note WristApp is used for copying up to 255 characters of text (30-40 words) to the watch. It is useful for storing directions, etc. that need to be readily accessable.
+
+Press Input/Configure to modify the note for download.
+
+TIP: Download your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!¬
+watchapp.hlp¬
+100¬
+note.exe¬
+Timex Data Link 150s Watch¬
+CC01BBCC01CECC01E2819D9D819D9DD6014381CC016500CC029B1A1D1D1D1D1D1D1D1500180E1D1D1D1D1D1D1D1D1500180E1D001B84001AFF001FFF0080FF0183FF0102FF0001FFFF38FFFF1D00A0FF00A3FF001D128FB691A11B2714A11A2725A11F2723A1022733AD62096102146181C604A126061061AD442075A638CD4E784FC704A1811061CD022605610713908115611961A604B7661290810161023F640461ED14611390CC0226A6FF4C97DE02B9A33F26F7B7673F61A6C0B7960961051961146181046108B667B7641361176181CE04C4A30D2717CE04C4A30827031390813A662609AD2D3C660261023C6681CD5AA0A61BCD577FA61BAB06CD57A9A648CC574DCD5AA0A61BAB0CCD577FA61BAB12CC57A901610F1161ADE808610804612B3F64036126046123B667A108231D06610EB667B16426043F6420103C64200CBE642606B667B76420023A64B664B7633F6203610AB664BA622604A604B766BE62D65E3BB765BE63DE02B9A33F260CB667A1082313A6FFB763B665CD59E73C633C62BE62A30826D781B691A1832704176120021661056104186115611261A604B7661290CC02261D11121C24121C241D110E240D0E0F0A1E151D240D0A1D0A240F181B241D110E240D0E0F0A1E151D240A1919241D110A1D241C1E1919181B1D1C241D110E240D0E0F0A1E151D24201B121C1D0A1919240F181B2422181E30241D110E240D0E0F0A1E151D241E1C0E1B323F¬
+25581¬
+1¬
+This is the default data for the default app that supports the default WristApp for you, the default user.¬
diff --git a/from_timex/pulse01.zap b/from_timex/pulse01.zap
new file mode 100644
index 0000000..6655674
--- /dev/null
+++ b/from_timex/pulse01.zap
@@ -0,0 +1,29 @@
+TDL0704962¬
+Pulse¬
+pulse11¬
+The Timex Pulse WristApp gives you a quick estimate of your pulse rate. Feel for your pulse. When the watch beeps, start counting beats. When you count ten, press a button, and the watch calculates your pulse.
+
+It's a great workout companion.
+
+TIP: Download to your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!¬
+WATCHAPP.HLP¬
+113¬
+none¬
+Timex Data Link 150 Watch¬
+CC0383CC037ECC038A819D9D819D9DD602FF81CC016400CC03C61D161913050E1D0B0E0A18051D24240B19162424243D370B0E101217243C333D371C1D18191C1D0A170D240B2201010101010101010101010101128FB691A11B2616C604A126051561CC034A11614FC704A1A637CD4E8981A10126050761ED2027A11E26041461201FA11A2605CD577A2016A182260601610181200CA100261F046102201407610CCD58D2146117611961CC032A016102200AA638CD4E8981A103260D04610220E007610220DB00610181AE044FE762D7015ED70156D7015A5A26F2CD58D8CD4E80139011611661036103CC02FCB667AE6442C7015FCF0160C601632723C6015FA1FF250E4FC7015FC60160AB01C701602005AB01C7015FC601634AC7016320DBA660C70157A6EAC701583F62C6015748C70157C6015849C70158C6015949C70159C6015A49C7015AC6015B49C7015BC6015C49C7015CC6015D49C7015DC6015E49C7015E3863396439653966C6015BC0015FC6015CC20160C6015DC20161C6015EC201622B39C6015BC0015FC7015BC6015CC20160C7015CC6015DC20161C7015DC6015EC20162C7015EA601BB63B7634FB964B7644FB965B7654FB966B7663C62A620B1622303CC023DB66426154FB764B663A1642514A064B763B664AB01B76420EEA637B763A602B764CC0357001AFF001B01001EFF0000FF0003FF0001FF0082FF0037FFFF3886011D001FFF0138FF0101FF0039FF001DA621CD58A8AE0ACD5951CD58F0016104A6372002A62FCC5845CD577AA63F20F6CD577AA61BCD58A8A648CC584CCD58D81661BE64230DCD5951CD5910BE63CD593E2005BE63CD5951CD5920A61BCD587EA62720C21761116181A6C0B7963F61810A61091A61C60163AB0D20071B61C60163AB0CC70163A16425104FC70163B667A1FF24043C6720021261810A61029881998125041B6120021A615C81B691A1382609106118611461CC0343A11F2617CD4E7A1B6113614FC70163B7671290CD01B2A639CD4E8981¬
+62744¬
+0¬
+Pulse¬
+pulse21¬
+The Timex Pulse WristApp gives you a quick estimate of your pulse rate. Feel for your pulse. When the watch beeps, start counting beats. When you count ten, press a button, and the watch calculates your pulse.
+
+It's a great workout companion.
+
+TIP: Download to your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!¬
+WATCHAPP.HLP¬
+113¬
+none¬
+Timex Data Link 150s Watch¬
+CC037ECC03B0CC03B5819D9D819D9DD6038581CC018F00CC01641D161913050E1D0B0E0A18051D24240B19162424243D370B0E101217243C333D371C1D18191C1D0A170D240B2201010101010101010101010101B691A1382609106118611461CC0343A11F2617CD4E691B6113614FC70163B7671290CD01DDA639CD4E7881128FB691A11B2616C604A126051561CC034A11614FC704A1A637CD4E7881A10126050761ED2027A11E26041461201FA11A2605CD5AA02016A182260601610181200CA100261F046102201407610CCD57D3146117611961CC032A016102200AA638CD4E7881A103260D04610220E007610220DB00610181AE044FE762D7015ED70156D7015A5A26F2CD57D9CD4E6F139011611661036103CC0327B667AE6442C7015FCF0160C601632723C6015FA1FF250E4FC7015FC60160AB01C701602005AB01C7015FC601634AC7016320DBA660C70157A6EAC701583F62C6015748C70157C6015849C70158C6015949C70159C6015A49C7015AC6015B49C7015BC6015C49C7015CC6015D49C7015DC6015E49C7015E3863396439653966C6015BC0015FC6015CC20160C6015DC20161C6015EC201622B39C6015BC0015FC7015BC6015CC20160C7015CC6015DC20161C7015DC6015EC20162C7015EA601BB63B7634FB964B7644FB965B7654FB966B7663C62A620B1622303CC0268B66426154FB764B663A1642514A064B763B664AB01B76420EEA637B763A602B764CC0357A621CD57A9AE0ACD5852CD57F1016104A6372002A62FCC5746CD5AA0A63F20F6CD5AA0A61BCD57A9A648CC574DCD57D91661BE64230DCD5852CD5811BE63CD583F2005BE63CD5852CD5821A61BCD577FA62720C2A6C0B7963F6181001AFF001B01001EFF0000FF0003FF0001FF0082FF0037FFFF3886011D001FFF0138FF0101FF0039FF001D17611161810A61091A61C60163AB0D20071B61C60163AB0CC70163A16425104FC70163B667A1FF24043C672002126181¬
+13083¬
+0¬
diff --git a/from_timex/quick13.zap b/from_timex/quick13.zap
new file mode 100644
index 0000000..5a6681c
--- /dev/null
+++ b/from_timex/quick13.zap
@@ -0,0 +1,31 @@
+TDL1109952¬ Applet file header
+Preset Timer¬ Applet friendly name
+QUICK13¬ Applet version #
+The Preset Countdown Timer
+1) Allows for quick selection of the following preset times: 5, 10, 15 20, 30, 45, or 60 minutes.
+2) Counts down from the selected preset time to zero.
+3) Beeps when zero is reached.
+
+TIP: Download your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!¬
+watchapp.hlp¬ Applet help filename
+103¬
+none¬ Applet's parent's app name (if it exists - 'none' if it doesn't)
+Timex Data Link 150 Watch¬
+CC026BCC027CCC0283819D9D819D9DD6014F81CC01DB00CC018517CC034D253C333D371C1D18193C371B0E1C0E1D241A1E120C141C0E1D050A0F141E2D0000001AFF001B84001FFF0001FFFF06FF0037840238FFFF1D001C08011EFF010503013AFFFE1D020284021A84021FFF0206FF0239FF001DB691A11C271DA11E270A066111C604C3A10427093F663F64A63ACD4E89811761CC4F3A1661A687B79BCD5787AD0DC6014EB766C60067B764CC02EDCD579FA6A2CC58823F65C60067B764C6014EB7663F631161139081B691A11B2708A106272214612048C604A1270A4FC704A1A638CD4E8981CD577A1461A6A2CD58ACA648CC584CC604C3A100270EA103271A029005A637CD4E892015039004ADB5200E016102ADA0AD3A20050290F0AD970561041561AD88CD02ED02901F006115C6014EB166260EC60067B16426071D61A6D0CC584C1C61A627CC58451D61A61FCC58451290B626B762814FB761C700674CC7014EA6C0B796CC01C8036103CD03C48102900181B62697B1622504B06220043062BB62BF62BB63A1632203B76381A064B7631961B665271D18613A652629B664BA66262310611390C604C1A1072705A60BCD4F4D81B66427063A64A63B20063A66A63BB764B765CE04C4A30826BF0461BC096103CC02F1CC02EDAD3EAD16BE6502610BB666BA642605CD59512003CD593ECC5930BE64B666260FBE642610A624B71D151ECD595C200ECD593E2003CD5951A624B71D141ECC5920BE6602610FBE66260BA636B71D171ECD595C2009CD5951A636B71D161ECC5910B691A11A272AA1022734A11F2757A10627531A96CD01C8B6642606A6FFB763200F3F63BE63D60147B16427043C6320F3CD01C0A62FCD5845B691A11A27240D610A1D61B663A1FF270D20023C63BE63D60147B764260AA601B766A6FFB76320023F66CC02EDA639CD4E89AD0BC604C3A1002603CD0264811B96B666C7014EB664C700671361CC01C8B6632706AE64A6092004AE66A607CC55BF¬ Applet Code
+27199¬ CRC
+0¬ No data
+Preset Timer¬ Applet friendly name
+QUICK23¬ Applet version #
+The Preset Countdown Timer
+1) Allows for quick selection of the following preset times: 5, 10, 15 20, 30, 45, or 60 minutes.
+2) Counts down from the selected preset time to zero.
+3) Beeps when zero is reached.
+
+TIP: Download your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!¬
+watchapp.hlp¬ Applet help filename
+103¬
+none¬ Applet's parent's app name (if it exists - 'none' if it doesn't)
+Timex Data Link 150s Watch¬
+CC02FFCC0310CC014F819D9D819D9DD603B081CC026F00CC021917CC0317253C333D371C1D18193C371B0E1C0E1D241A1E120C141C0E1D050A0F141E2D000002900181B62697B1622504B06220043062BB62BF62BB63A1632203B76381A064B7631961B665271D18613A652629B664BA66262310611390C604C1A1072705A60BCD4F3C81B66427063A64A63B20063A66A63BB764B765CE04C4A30826BF0461BC096103CC01BDCC01B9AD3EAD16BE6502610BB666BA642605CD58522003CD583FCC5831BE64B666260FBE642610A622B71D151ECD585D200ECD583F2003CD5852A622B71D141ECC5821BE6602610FBE66260BA634B71D171ECD585D2009CD5852A634B71D161ECC5811B691A11C271DA11E270A066111C604C3A10427093F663F64A63ACD4E78811761CC4F291661A687B79BCD5AADAD0DC6014EB766C60067B764CC01B9CD5ACBA6A2CC57833F65C60067B764C6014EB7663F631161139081B691A11B2708A106272214612048C604A1270A4FC704A1A638CD4E7881CD5AA01461A6A2CD57ADA648CC574DC604C3A100270EA103271A029005A637CD4E782015039004ADB5200E016102ADA0AD3A20050290F0AD970561041561AD88CD01B902901F006115C6014EB166260EC60067B16426071D61A6D0CC574D1C61A627CC57461D61A61FCC57461290B626B762814FB761C700674CC7014EA6C0B796CC025C036103CD038E81B691A11A272AA1022734A11F2757A10627531A96CD025CB6642606A6FFB763200F3F63BE63D60147B16427043C6320F3CD0254A62FCD5746B691A11A27240D610A1D61B663A1FF270D20023C63BE63D60147B764260AA601B766A6FFB76320023F66CC01B9A639CD4E78AD0BC604C3A1002603CD02F8811B96B666C7014EB664C700671361CC025CB6632706AE64A6092004AE66A607CC55AE001AFF001B84001FFF0001FFFF06FF0037840238FFFF1D001C08011EFF010503013AFFFE1D020284021A84021FFF0206FF0239FF001D¬
+16566¬
+0¬ No data \ No newline at end of file
diff --git a/from_timex/timer13.zap b/from_timex/timer13.zap
new file mode 100644
index 0000000..fd81d53
--- /dev/null
+++ b/from_timex/timer13.zap
@@ -0,0 +1,31 @@
+TDL1109952¬
+Adjustable Timer¬
+TIMER13¬
+The Adjustable Countdown Timer
+1) Allows setting of a time to be counted from 1 minute to 100 hours, in 1 minute increments.
+2) Counts down from the selected time to zero.
+3) Beeps when zero is reached.
+
+TIP: Download your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!¬
+watchapp.hlp¬
+102¬
+none¬
+Timex Data Link 150 Watch¬
+CC0253CC0264CC026B819D9D819D9DD6014081CC01C900CC017317CC0338253C333D371C1D18193C371B0E1C0E1D2400001AFF001B84001FFF0001FFFF06FF0037FF0238FFFF1D001C08011EFF010503013AFFFE1D0286FF02A6FF021AFF0239FF001DB691A11C271DA11E270A066111C604C3A10427093F663F64A63ACD4E89811761CC4F3A1661A687B79BCD5787AD0DC6013FB766C60067B764CC02D5CD579FA6A2CC58823F65C60067B764C6013FB7663F631161139081B691A11B2708A106272214612048C604A1270A4FC704A1A638CD4E8981CD577A1461A6A2CD58ACA648CC584CC604C3A100270EA103271A029005A637CD4E892015039004ADB5200E016102ADA0AD3420050290F0AD970561041561AD88CD02D502901B006113C6013FB166260CC60067B1642605A6D0CC584CA627CC5845A61FCC58451290B626B762814FB761C700674CC7013FA6C0B796CC01B6036103CD03BC8102900181B62697B1622504B06220043062BB62BF62BB63A1632203B76381A064B7631961B665271D18613A652629B664BA66262310611390C604C1A1072705A60BCD4F4D81B66427063A64A63B20063A66A63BB764B765CE04C4A30826BF0461BC096103CC02D9CC02D5AD41AD16BE6502610BB666BA642605CD59512003CD593ECC5930BE64026113B666260FBE642610A624B71D151ECD595C200ECD593E2003CD5951A624B71D141ECC5920BE6602610FBE66260BA636B71D171ECD595C2009CD5951A636B71D161ECC5910128FB691A186272CA1A627211261A11A26070B61044FC7013F1A961B61CD01B63F63CD01AEA650CD584CCD02D5129FAD70149081C604C3A1002720A1032718A102273CB66327043A6320023C63CD02D5139FAD4D149081119F2002109F4FC704F4B663270BA63BC704F5AE64A6072009A663C704F5AE66A605CD57C7189081A639CD4E89B666BA642606A601B7661A611B96B666C7013FB664C700671361CC01B6B6632706AE64A6092004AE66A607CC55BF¬
+48395¬
+0¬
+Adjustable Timer¬
+TIMER23¬
+The Adjustable Countdown Timer
+1) Allows setting of a time to be counted from 1 minute to 100 hours, in 1 minute increments.
+2) Counts down from the selected time to zero.
+3) Beeps when zero is reached.
+
+TIP: Download your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!¬
+watchapp.hlp¬
+102¬
+none¬
+Timex Data Link 150s Watch¬
+CC02EDCC02FECC0140819D9D819D9DD603B781CC026300CC020D17CC0305253C333D371C1D18193C371B0E1C0E1D240002900181B62697B1622504B06220043062BB62BF62BB63A1632203B76381A064B7631961B665271D18613A652629B664BA66262310611390C604C1A1072705A60BCD4F3C81B66427063A64A63B20063A66A63BB764B765CE04C4A30826BF0461BC096103CC01AECC01AAAD41AD16BE6502610BB666BA642605CD58522003CD583FCC5831BE64026113B666260FBE642610A622B71D151ECD585D200ECD583F2003CD5852A622B71D141ECC5821BE6602610FBE66260BA634B71D171ECD585D2009CD5852A634B71D161ECC5811B691A11C271DA11E270A066111C604C3A10427093F663F64A63ACD4E78811761CC4F291661A687B79BCD5AADAD0DC6013FB766C60067B764CC01AACD5ACBA6A2CC57833F65C60067B764C6013FB7663F631161139081B691A11B2708A106272214612048C604A1270A4FC704A1A638CD4E7881CD5AA01461A6A2CD57ADA648CC574DC604C3A100270EA103271A029005A637CD4E782015039004ADB5200E016102ADA0AD3420050290F0AD970561041561AD88CD01AA02901B006113C6013FB166260CC60067B1642605A6D0CC574DA627CC5746A61FCC57461290B626B762814FB761C700674CC7013FA6C0B796CC0250036103CD038981128FB691A186272CA1A627211261A11A26070B61044FC7013F1A961B61CD02503F63CD0248A650CD574DCD01AA129FAD70149081C604C3A1002720A1032718A102273CB66327043A6320023C63CD01AA139FAD4D149081119F2002109F4FC704F4B663270BA63BC704F5AE64A6072009A663C704F5AE66A605CD56C8189081A639CD4E78B666BA642606A601B7661A611B96B666C7013FB664C700671361CC0250B6632706AE64A6092004AE66A607CC55AE001AFF001B84001FFF0001FFFF06FF0037FF0238FFFF1D001C08011EFF010503013AFFFE1D0286FF02A6FF021AFF0239FF001D¬
+37401¬
+0¬
diff --git a/from_timex/wksiso11.zap b/from_timex/wksiso11.zap
new file mode 100644
index 0000000..d736fe4
--- /dev/null
+++ b/from_timex/wksiso11.zap
@@ -0,0 +1,33 @@
+TDL0326962¬
+Week of the Year (International)¬
+WKSISO11¬
+1) Displays what week of the year it is.
+2) Displays what day of the year it is.
+3) Displays how many days are left in the year.
+
+The International version uses Monday as the first day of the week.
+
+TIP: Download your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!¬
+watchapp.hlp¬
+104¬
+none¬
+Timex Data Link 150 Watch¬
+CC01CFCC01DD819D9D819D9D819D9DD6014881CC015C001D0D0A180E1D200E0E1424242424240D0A2224242424150E0F1D00000000000000001AFF001B84001FFF0006FF0037FFFF38FFFF1D128FCD01DEB691A11B2710A106272DCD579F1561CC03520461F881C604A12612CD58D2CD579F1461A617CD58A8A648CC584CA638CD4E894FC704A181C604C3A10227D41561A100270EA1032715A1012605A637CD4E8981C601414CA102230F4F200CC601414AA1002B022002A602C70141209F1E961C9619961B96A600C7014181819BAEB005A902AEB9E602C70145E603C70146E604C701479A813F633F64AE01BF62C3014522232716CD68E8B662C704F9C60147C704FACD68F9CD68F22003C60146AD073C62BE6220D881BB64B76424023C63813F633F64CD68E8C60145C704F9C60147C704FACD68F9CD68F2C00146B764CE01455CBF62A30C221CCD68E8B662C704F9C60147C704FACD68F9CD68F2ADB93C62BE6220E081CD01F7C60145B765C60146B766C60147B767AE659BCD68D59AC70142A601B765B766C60147B767AE659BCD68D59A97D603C7C70143D603CEB762A3022706A3052710201DC60147A5032616A635C70143200FC601474AA5032607A635C70143B762CE0142B664DB03C0B76424023C63B664A1082404B663271BCE0143B662CD6B0D4D2602A601B762B664A007B76424DF3A6320DB3F63B662B764813F653F663F67B6632606B664A164250E3C65B664A064B76424EC3A6320E8B664A10A250A3C66B664A00AB76420F0B664B767B665260AAE24BF65B6662602BF6681CD58D8C60141A101270EA102271BA61DCD5845CD02762008A625CD5845CD01F7A605C70144AD292011A629CD5845CD0231A600C70144AD182000CE0147CD67CCCE0145CD67D0CE0146CD67D4CD5AAB81CD03113F62B662CB014497D65E32BE62EE65CD56D53C62B662A10325E881060504030201003434343535343401010101353434¬
+35393¬
+0¬
+Week of the Year (International)¬
+WKSISO21¬
+1) Displays what week of the year it is.
+2) Displays what day of the year it is.
+3) Displays how many days are left in the year.
+
+The International version uses Monday as the first day of the week.
+
+TIP: Download your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!¬
+watchapp.hlp¬
+104¬
+none¬
+Timex Data Link 150s Watch¬
+CC01BBCC01C9819D9D819D9D819D9DD6035381CC0148001D0D0A180E1D200E0E1424242424240D0A2224242424150E0F1D00000000000000128FCD01CAB691A11B2710A106272DCD5ACB1561CC03670461F881C604A12612CD57D3CD5ACB1461A617CD57A9A648CC574DA638CD4E784FC704A181C604C3A10227D41561A100270EA1032715A1012605A637CD4E7881C601414CA102230F4F200CC601414AA1002B022002A602C70141209F1E961C9619961B96A600C7014181819BAEB005A902AEB9E602C70145E603C70146E604C701479A813F633F64AE01BF62C3014522232716CD68F1B662C704F9C60147C704FACD6902CD68FB2003C60146AD073C62BE6220D881BB64B76424023C63813F633F64CD68F1C60145C704F9C60147C704FACD6902CD68FBC00146B764CE01455CBF62A30C221CCD68F1B662C704F9C60147C704FACD6902CD68FBADB93C62BE6220E081CD01E3C60145B765C60146B766C60147B767AE659BCD68DE9AC70142A601B765B766C60147B767AE659BCD68DE9A97D60345C70143D6034CB762A3022706A3052710201DC60147A5032616A635C70143200FC601474AA5032607A635C70143B762CE0142B664DB033EB76424023C63B664A1082404B663271BCE0143B662CD6B164D2602A601B762B664A007B76424DF3A6320DB3F63B662B764813F653F663F67B6632606B664A164250E3C65B664A064B76424EC3A6320E8B664A10A250A3C66B664A00AB76420F0B664B767B665260AAE24BF65B6662602BF6681060504030201003434343535343401010101353434001AFF001B84001FFF0006FF0037FFFF38FFFF1DCD57D9C60141A101270EA102271BA61DCD5746CD02622008A625CD5746CD01E3A605C70144AD292011A629CD5746CD021DA600C70144AD182000CE0147CD67D5CE0145CD67D9CE0146CD67DDCD59AC81CD02FD3F62B662CB014497D65E3BBE62EE65CD59E73C62B662A10325E881¬
+38373¬
+0¬ \ No newline at end of file
diff --git a/from_timex/wksusa11.zap b/from_timex/wksusa11.zap
new file mode 100644
index 0000000..63c620e
--- /dev/null
+++ b/from_timex/wksusa11.zap
@@ -0,0 +1,33 @@
+TDL0306962¬
+Week of the Year (U.S.)¬
+WKSUSA11¬
+1) Displays what week of the year it is.
+2) Displays what day of the year it is.
+3) Displays how many days are left in the year.
+
+The U.S. version uses Sunday as the first day of the week.
+
+TIP: Download your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!¬
+watchapp.hlp¬
+104¬
+none¬
+Timex Data Link 150 Watch¬
+CC01CFCC01DD819D9D819D9D819D9DD6014881CC015C001D0D0A180E1D200E0E1424242424240D0A2224242424150E0F1D00000000000000001AFF001B84001FFF0006FF0037FFFF38FFFF1D128FCD01DEB691A11B2710A106272DCD579F1561CC03520461F881C604A12612CD58D2CD579F1461A617CD58A8A648CC584CA638CD4E894FC704A181C604C3A10227D41561A100270EA1032715A1012605A637CD4E8981C601414CA102230F4F200CC601414AA1002B022002A602C70141209F1E961C9619961B96A600C7014181819BAEB005A902AEB9E602C70145E603C70146E604C701479A813F633F64AE01BF62C3014522232716CD68E8B662C704F9C60147C704FACD68F9CD68F22003C60146AD073C62BE6220D881BB64B76424023C63813F633F64CD68E8C60145C704F9C60147C704FACD68F9CD68F2C00146B764CE01455CBF62A30C221CCD68E8B662C704F9C60147C704FACD68F9CD68F2ADB93C62BE6220E081CD01F7C60145B765C60146B766C60147B767AE659BCD68D59AC70142A601B765B766C60147B767AE659BCD68D59A97D603C7C70143D603CEB762A3012706A3042710201DC60147A5032616A635C70143200FC601474AA5032607A635C70143B762CE0142B664DB03C0B76424023C63B664A1082404B663271BCE0143B662CD6B0D4D2602A601B762B664A007B76424DF3A6320DB3F63B662B764813F653F663F67B6632606B664A164250E3C65B664A064B76424EC3A6320E8B664A10A250A3C66B664A00AB76420F0B664B767B665260AAE24BF65B6662602BF6681CD58D8C60141A101270EA102271BA61DCD5845CD02762008A625CD5845CD01F7A605C70144AD292011A629CD5845CD0231A600C70144AD182000CE0147CD67CCCE0145CD67D0CE0146CD67D4CD5AAB81CD03113F62B662CB014497D65E32BE62EE65CD56D53C62B662A10325E881050403020100063434353534343401010135343401¬
+60802¬
+0¬
+Week of the Year (U.S.)¬
+WKSUSA21¬
+1) Displays what week of the year it is.
+2) Displays what day of the year it is.
+3) Displays how many days are left in the year.
+
+The U.S. version uses Sunday as the first day of the week.
+
+TIP: Download your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!¬
+watchapp.hlp¬
+104¬
+none¬
+Timex Data Link 150s Watch¬
+CC01BBCC01C9819D9D819D9D819D9DD6035381CC0148001D0D0A180E1D200E0E1424242424240D0A2224242424150E0F1D00000000000000128FCD01CAB691A11B2710A106272DCD5ACB1561CC03670461F881C604A12612CD57D3CD5ACB1461A617CD57A9A648CC574DA638CD4E784FC704A181C604C3A10227D41561A100270EA1032715A1012605A637CD4E7881C601414CA102230F4F200CC601414AA1002B022002A602C70141209F1E961C9619961B96A600C7014181819BAEB005A902AEB9E602C70145E603C70146E604C701479A813F633F64AE01BF62C3014522232716CD68F1B662C704F9C60147C704FACD6902CD68FB2003C60146AD073C62BE6220D881BB64B76424023C63813F633F64CD68F1C60145C704F9C60147C704FACD6902CD68FBC00146B764CE01455CBF62A30C221CCD68F1B662C704F9C60147C704FACD6902CD68FBADB93C62BE6220E081CD01E3C60145B765C60146B766C60147B767AE659BCD68DE9AC70142A601B765B766C60147B767AE659BCD68DE9A97D60345C70143D6034CB762A3012706A3042710201DC60147A5032616A635C70143200FC601474AA5032607A635C70143B762CE0142B664DB033EB76424023C63B664A1082404B663271BCE0143B662CD6B164D2602A601B762B664A007B76424DF3A6320DB3F63B662B764813F653F663F67B6632606B664A164250E3C65B664A064B76424EC3A6320E8B664A10A250A3C66B664A00AB76420F0B664B767B665260AAE24BF65B6662602BF6681050403020100063434353534343401010135343401001AFF001B84001FFF0006FF0037FFFF38FFFF1DCD57D9C60141A101270EA102271BA61DCD5746CD02622008A625CD5746CD01E3A605C70144AD292011A629CD5746CD021DA600C70144AD182000CE0147CD67D5CE0145CD67D9CE0146CD67DDCD59AC81CD02FD3F62B662CB014497D65E3BBE62EE65CD59E73C62B662A10325E881¬
+46308¬
+0¬ \ No newline at end of file
diff --git a/from_timex/world01.zap b/from_timex/world01.zap
new file mode 100644
index 0000000..693a98f
--- /dev/null
+++ b/from_timex/world01.zap
@@ -0,0 +1,31 @@
+TDL0815962¬
+World Time¬
+World13¬
+The Timex World Time WristApp displays the time in each of the 24 time zones around the world.
+
+Choose the Input/Configure button to customize your list of entries, and to make daylight savings time settings.
+
+TIP: Download to your watch faster: Download this WristApp only when sending new time settings to the watch.¬
+watchapp.hlp¬
+110¬
+worldtm.exe¬
+Timex Data Link 150 Watch¬
+CC0265CC027DCC03A9819D9D819D9DD6025181CC01D6001A0017130D1D1D1812140E1D0000000000000000180017220CFB0C0C1CFC1B1218FD310002FE310001FF15181700190A1B010C0A1202161820030D210B04141112050D0A0C060B141407111410081D2218091C220D0A17181E0B2015100C310101F5111715F60A170CF7150A21F80D0E17F90C1112FA242424FBCD579FCD6838CD6830C60138CD5849AE63CD5A86CE0137CD67CCCE0135CD67D0CE0136CD67D4CD5AABCE0133CD67D8CE0134CC6823128FB691A11B270CA10627301096CD0280CC01A1C604A12619A60EC704C41096CD579FA617CD587EA61DCD58A8A648CC584CA638CD4E894FC704A181C604C3A1002718A1032722A102270CA10126071196A637CD4E8981A60020183C61C6013B4AB16124103F61200C3A612B022006C6013B4AB761CD0280CC01A4001AFF001B84001FFF0006FF0037FFFF38FFFF1DA6C0B796AEB005A902AEB9CF013CA618B762A600B7612003119681AD07AD36AD4ACC030BCD68E8C6013CAB0097F6B766C701395CF6C70134C7013A5CF6C701355CF6C701365CF6C701379FAB0497F6C70138CC68F2B661AE044297D6013DB763D6013EB764D6013FB765813F67B662AE0442AB0397B666D0013DAD17C70133B661AE0442AB0397C60133DB013DAD04C70133812B0CA1182402200AA0183C672004AB183A6781B6672B452742C60138AE06CD6B0DC70138C601364CC70136AD6EC101362429A601C70136C601354CC70135A10C2319A601C70135C60137AE63CD6B0DC70137A1642605A600C7013781C601384AC701382B022005A606C70138C601364AC70136A100230181C601354AC701352706AD18C7013681A60CC70135C601374A2B022002A663C7013720E6CD68E8C60135C704F9C60137C704FACD68F9CD68F281C604C4A108270181CD68E8C6013CAB0097F6B7665CF6C70134CD68F2CD6838CD6830C60134C1013A27DDCE0134CD6823B666C1013927D0CD0280CC01A4¬
+48403¬
+1¬
+Sample Data¬
+World Time¬
+World23¬
+The Timex World Time WristApp displays the time in each of the 24 time zones around the world.
+
+Choose the Input/Configure button to customize your list of entries, and to make daylight savings time settings.
+
+TIP: Download to your watch faster: Download this WristApp only when sending new time settings to the watch.¬
+watchapp.hlp¬
+110¬
+worldtm.exe¬
+Timex Data Link 150s Watch¬
+CC013DCC0155CC03A9819D9D819D9DD6039581CC031A001A0017130D1D1D1812140E1D00000000000000001800A6C0B796AEB005A902AEB9CF013CA618B762A600B7612003119681AD07AD36AD4ACC01E3CD68F1C6013CAB0097F6B766C701395CF6C70134C7013A5CF6C701355CF6C701365CF6C701379FAB0497F6C70138CC68FBB661AE044297D60281B763D60282B764D60283B765813F67B662AE0442AB0397B666D00281AD17C70133B661AE0442AB0397C60133DB0281AD04C70133812B0CA1182402200AA0183C672004AB183A6781B6672B452742C60138AE06CD6B16C70138C601364CC70136AD6EC101362429A601C70136C601354CC70135A10C2319A601C70135C60137AE63CD6B16C70137A1642605A600C7013781C601384AC701382B022005A606C70138C601364AC70136A100230181C601354AC701352706AD18C7013681A60CC70135C601374A2B022002A663C7013720E6CD68F1C60135C704F9C60137C704FACD6902CD68FB8117220CFB0C0C1CFC1B1218FD310002FE310001FF15181700190A1B010C0A1202161820030D210B04141112050D0A0C060B141407111410081D2218091C220D0A17181E0B2015100C310101F5111715F60A170CF7150A21F80D0E17F90C1112FA242424FBCD5ACBCD6841CD6839C60138CD574AAE63CD5987CE0137CD67D5CE0135CD67D9CE0136CD67DDCD59ACCE0133CD67E1CE0134CC682C128FB691A11B270CA10627301096CD0158CC02E5C604A12619A60EC704C41096CD5ACBA617CD577FA61DCD57A9A648CC574DA638CD4E784FC704A181C604C3A1002718A1032722A102270CA10126071196A637CD4E7881A60020183C61C6013B4AB16124103F61200C3A612B022006C6013B4AB761CD0158CC02E8001AFF001B84001FFF0006FF0037FFFF38FFFF1DC604C4A108270181CD68F1C6013CAB0097F6B7665CF6C70134CD68FBCD6841CD6839C60134C1013A27DDCE0134CD682CB666C1013927D0CD0158CC02E8¬
+41335¬
+1¬
+Sample Data¬
diff --git a/from_toebes/3ball/3ball.asm b/from_toebes/3ball/3ball.asm
new file mode 120000
index 0000000..c89f401
--- /dev/null
+++ b/from_toebes/3ball/3ball.asm
@@ -0,0 +1 @@
+3ball.zsm \ No newline at end of file
diff --git a/from_toebes/3ball/3ball.known_good b/from_toebes/3ball/3ball.known_good
new file mode 120000
index 0000000..81bd3de
--- /dev/null
+++ b/from_toebes/3ball/3ball.known_good
@@ -0,0 +1 @@
+3ball.zap.app \ No newline at end of file
diff --git a/from_toebes/3ball/3ball.zap b/from_toebes/3ball/3ball.zap
new file mode 100644
index 0000000..4dc2511
--- /dev/null
+++ b/from_toebes/3ball/3ball.zap
@@ -0,0 +1,29 @@
+TDL0831972¬
+3BALL¬
+3BALL¬
+An executive decision maker that will give a yes/no/maybe answer. Pressing Next will generate another answer and beep (since it will be the same answer sometimes).
+
+(c) 1997 Wayne Buttles (timex@fdisk.com). Compiled using tools and knowledge published by John A. Toebes, VIII and Michael Polymenakos (mpoly@panix.com).
+ Some enhancements by John Toebes...
+watchapp.hlp¬
+100¬
+none¬
+Timex Data Link 150 Watch¬
+CC01B2139081CC0188139081819D9DD6014D81CC015E00031D0B0A1313140A1B0B0E1D1B0E051D1D15001D1D1D1F001F1D1D1D2C2D2C2B2A2B22261D22001B85001AFF008085001FFF0001FFFF1D128F1390B691A1802737A11B2733A11A2706AD33A403B761BE61D60149CD587EA617CD58A8A648CC584CC604C1A1082684AE05B662CD6B0DB76297D60143CC587E3F62129020D9B660AE5542AB19B76049494981A6C0B796B627B76081¬
+22325¬
+0¬
+3BALL¬
+3BALL¬
+An executive decision maker that will give a yes/no/maybe answer. Pressing Next will generate another answer and beep (since it will be the same answer sometimes).
+
+(c) 1997 Wayne Buttles (timex@fdisk.com). Compiled using tools and knowledge published by John A. Toebes, VIII and Michael Polymenakos (mpoly@panix.com).
+ Some enhancements by John Toebes...
+watchapp.hlp¬
+100¬
+none¬
+Timex Data Link 150s Watch¬
+CC01B2139081CC0188139081819D9DD6014D81CC015E00031D0B0A1313140A1B0B0E1D1B0E051D1D15001D1D1D1F001F1D1D1D2C2D2C2B2A2B22261D22001B85001AFF008085001FFF0001FFFF1D128F1390B691A1802737A11B2733A11A2706AD33A403B761BE61D60149CD577FA617CD57A9A648CC574DC604C1A1082684AE05B662CD6B16B76297D60143CC577F3F62129020D9B660AE5542AB19B76049494981A6C0B796B627B76081¬
+52185¬
+0¬ \ No newline at end of file
diff --git a/3ball/3ball.asm b/from_toebes/3ball/3ball.zsm
index 73a3be4..e98b2d8 100644
--- a/3ball/3ball.asm
+++ b/from_toebes/3ball/3ball.zsm
@@ -1,148 +1,148 @@
-;Name: 3BALL
-;Version: 3BALL
-;Description: An executive decision maker that will give a yes/no/maybe answer. Pressing Next will generate another answer and beep (since it will be the same answer sometimes).
-;
-;(c) 1997 Wayne Buttles (timex@fdisk.com). Compiled using tools and knowledge published by John A. Toebes, VIII and Michael Polymenakos (mpoly@panix.com).
-; Some enhancements by John Toebes...
-;
-;HelpFile: watchapp.hlp
-;HelpTopic: 100
-;
-; <A NAME="3ball_1">(1) Program specific constants</A>
-;
- INCLUDE "wristapp.i"
-;
-; Program specific constants
-;
-CURRENT_TIC EQU $27 ; Current system clock tic (Timer)
-LAST_ANS EQU $61
-RAND_SEED EQU $60
-MARQ_POS EQU $62
-START EQU *
-;
-; <A NAME="3ball_2">(2) System entry point vectors</A>
-;
-L0110: jmp MAIN ; The main entry point - <A HREF="wristappformat.html#WRIST_MAIN">WRIST_MAIN</A>
-L0113: bclr 1,BTNFLAGS ; Called when we are suspended for any reason - <A HREF="wristappformat.html#WRIST_SUSPEND">WRIST_SUSPEND</A>
- rts
-L0116: jmp FLASH ; Called to handle any timers or time events - <A HREF="wristappformat.html#WRIST_DOTIC">WRIST_DOTIC</A>
-L0119: bclr 1,BTNFLAGS ; Called when the COMM app starts and we have timers pending - <A HREF="wristappformat.html#WRIST_INCOMM">WRIST_INCOMM</A>
- rts
-L011c: rts ; Called when the COMM app loads new data - <A HREF="wristappformat.html#WRIST_NEWDATA">WRIST_NEWDATA</A>
- nop
- nop
-
-L011f: lda STATETAB,X ; The state table get routine - <A HREF="wristappformat.html#WRIST_GETSTATE">WRIST_GETSTATE</A>
- rts
-
-L0123: jmp HANDLE_STATE0
- db STATETAB-STATETAB
-;
-; <A NAME="3ball_3">(3) Program strings</A>
-;
-S6_MSG timex6 "3 BALL"
-S6_MAYBE timex6 "MAYBE"
-S6_YES timex6 " YES"
-S6_NO timex6 " NO"
-S6_MARQ timex6 " +O+ "
-
-MARQ_SEL
- DB S6_MARQ+2-START
- DB S6_MARQ+3-START
- DB S6_MARQ+2-START
- DB S6_MARQ+1-START
- DB S6_MARQ-START
- DB S6_MARQ+1-START
-
-MSG_SEL DB S6_YES-START
- DB S6_NO-START
- DB S6_MAYBE-START
- DB S6_YES-START
-;
-; <A NAME="3ball_4">(4) State Table</A>
-;
-STATETAB:
- db 0
- db EVT_ENTER,TIM2_16TIC,0 ; Initial state
- db EVT_RESUME,TIM_ONCE,0 ; Resume from a nested app
- db EVT_DNNEXT,TIM2_16TIC,0 ; Next button
- db EVT_TIMER2,TIM_ONCE,0 ; Timer
- db EVT_MODE,TIM_ONCE,$FF ; Mode button
- db EVT_END
-;
-; <A NAME="3ball_5">(5) State Table 0 Handler</A>
-; This is called to process the state events.
-; We see ENTER, RESUME, TIMER2 and NEXT events
-;
-HANDLE_STATE0:
- bset 1,APP_FLAGS ; Indicate that we can be suspended
- bclr 1,BTNFLAGS
- lda BTNSTATE
- cmp #EVT_DNNEXT ; Did they press the next button?
- beq DOITAGAIN
- cmp #EVT_ENTER ; Or did we start out
- beq DOITAGAIN
- cmp #EVT_RESUME
- beq REFRESH
-;
-; <A NAME="3ball_6">(6) Select a random answer</A>
-;
-SHOWIT
- bsr RAND
- and #3 ; go to a 1 in 4 chance
- sta LAST_ANS
-;
-; <A NAME="3ball_7">(7) Display the currently selected random number</A>
-;
-REFRESH
- ldx LAST_ANS ; Get the last answer we had, and use it as an index
- lda MSG_SEL,X ; And get the message to display
- jsr PUT6TOP ; Put that on the top
-BANNER
- lda #S6_MSG-START
- jsr PUT6MID
- lda #SYS8_MODE ; And show the mode on the bottom
- jmp PUTMSGBOT
-;
-; <A NAME="3ball_8">(8) This flashes the text on the screen</A>
-;
-FLASH
- lda CURRENT_APP ; See which app is currently running
- cmp #APP_WRIST ; Is it us?
- bne L0113 ; No, so just turn off the tic timer since we don't need it
- ldx #5
- lda MARQ_POS
- jsr INCA_WRAPX
- sta MARQ_POS
- tax
- lda MARQ_SEL,X
- jmp PUT6TOP
-;
-; <A NAME="3ball_9">(9) They want us to do it again</A>
-;
-DOITAGAIN ; Tell them we are going to do it again
- clr MARQ_POS
- bset 1,BTNFLAGS
- bra BANNER
-;
-; <A NAME="3ball_10">(10) Here is a simple random number generator</A>
-;
-RAND
- lda RAND_SEED
- ldx #85
- mul
- add #25
- sta RAND_SEED
- rola
- rola
- rola
- rts
-;
-; <A NAME="3ball_11">(11) This is the main initialization routine which is called when we first get the app into memory</A>
-;
-MAIN:
- lda #$c0 ; We want button beeps and to indicate that we have been loaded
- sta WRISTAPP_FLAGS
- lda CURRENT_TIC
- sta RAND_SEED
- rts
+;Name: 3BALL
+;Version: 3BALL
+;Description: An executive decision maker that will give a yes/no/maybe answer. Pressing Next will generate another answer and beep (since it will be the same answer sometimes).
+;
+;(c) 1997 Wayne Buttles (timex@fdisk.com). Compiled using tools and knowledge published by John A. Toebes, VIII and Michael Polymenakos (mpoly@panix.com).
+; Some enhancements by John Toebes...
+;
+;HelpFile: watchapp.hlp
+;HelpTopic: 100
+;
+; (1) Program specific constants
+;
+ INCLUDE "WRISTAPP.I"
+;
+; Program specific constants
+;
+CURRENT_TIC EQU $27 ; Current system clock tic (Timer)
+LAST_ANS EQU $61
+RAND_SEED EQU $60
+MARQ_POS EQU $62
+START EQU *
+;
+; (2) System entry point vectors
+;
+L0110: jmp MAIN ; The main entry point - WRIST_MAIN
+L0113: bclr 1,BTNFLAGS ; Called when we are suspended for any reason - WRIST_SUSPEND
+ rts
+L0116: jmp FLASH ; Called to handle any timers or time events - WRIST_DOTIC
+L0119: bclr 1,BTNFLAGS ; Called when the COMM app starts and we have timers pending - WRIST_INCOMM
+ rts
+L011c: rts ; Called when the COMM app loads new data - WRIST_NEWDATA
+ nop
+ nop
+
+L011f: lda STATETAB,X ; The state table get routine - WRIST_GETSTATE
+ rts
+
+L0123: jmp HANDLE_STATE0
+ db STATETAB-STATETAB
+;
+; (3) Program strings
+;
+S6_MSG timex6 "3 BALL"
+S6_MAYBE timex6 "MAYBE"
+S6_YES timex6 " YES"
+S6_NO timex6 " NO"
+S6_MARQ timex6 " +O+ "
+
+MARQ_SEL
+ DB S6_MARQ+2-START
+ DB S6_MARQ+3-START
+ DB S6_MARQ+2-START
+ DB S6_MARQ+1-START
+ DB S6_MARQ-START
+ DB S6_MARQ+1-START
+
+MSG_SEL DB S6_YES-START
+ DB S6_NO-START
+ DB S6_MAYBE-START
+ DB S6_YES-START
+;
+; (4) State Table
+;
+STATETAB:
+ db 0
+ db EVT_ENTER,TIM2_16TIC,0 ; Initial state
+ db EVT_RESUME,TIM_ONCE,0 ; Resume from a nested app
+ db EVT_DNNEXT,TIM2_16TIC,0 ; Next button
+ db EVT_TIMER2,TIM_ONCE,0 ; Timer
+ db EVT_MODE,TIM_ONCE,$FF ; Mode button
+ db EVT_END
+;
+; (5) State Table 0 Handler
+; This is called to process the state events.
+; We see ENTER, RESUME, TIMER2 and NEXT events
+;
+HANDLE_STATE0:
+ bset 1,APP_FLAGS ; Indicate that we can be suspended
+ bclr 1,BTNFLAGS
+ lda BTNSTATE
+ cmp #EVT_DNNEXT ; Did they press the next button?
+ beq DOITAGAIN
+ cmp #EVT_ENTER ; Or did we start out
+ beq DOITAGAIN
+ cmp #EVT_RESUME
+ beq REFRESH
+;
+; (6) Select a random answer
+;
+SHOWIT
+ bsr RAND
+ and #3 ; go to a 1 in 4 chance
+ sta LAST_ANS
+;
+; (7) Display the currently selected random number
+;
+REFRESH
+ ldx LAST_ANS ; Get the last answer we had, and use it as an index
+ lda MSG_SEL,X ; And get the message to display
+ jsr PUT6TOP ; Put that on the top
+BANNER
+ lda #S6_MSG-START
+ jsr PUT6MID
+ lda #SYS8_MODE ; And show the mode on the bottom
+ jmp PUTMSGBOT
+;
+; (8) This flashes the text on the screen
+;
+FLASH
+ lda CURRENT_APP ; See which app is currently running
+ cmp #APP_WRIST ; Is it us?
+ bne L0113 ; No, so just turn off the tic timer since we don't need it
+ ldx #5
+ lda MARQ_POS
+ jsr INCA_WRAPX
+ sta MARQ_POS
+ tax
+ lda MARQ_SEL,X
+ jmp PUT6TOP
+;
+; (9) They want us to do it again
+;
+DOITAGAIN ; Tell them we are going to do it again
+ clr MARQ_POS
+ bset 1,BTNFLAGS
+ bra BANNER
+;
+; (10) Here is a simple random number generator
+;
+RAND
+ lda RAND_SEED
+ ldx #85
+ mul
+ add #25
+ sta RAND_SEED
+ rola
+ rola
+ rola
+ rts
+;
+; (11) This is the main initialization routine which is called when we first get the app into memory
+;
+MAIN:
+ lda #$c0 ; We want button beeps and to indicate that we have been loaded
+ sta WRISTAPP_FLAGS
+ lda CURRENT_TIC
+ sta RAND_SEED
+ rts
diff --git a/from_toebes/Makefile b/from_toebes/Makefile
new file mode 100644
index 0000000..93ce6f1
--- /dev/null
+++ b/from_toebes/Makefile
@@ -0,0 +1,46 @@
+TUTORIALS=hello number update flash passwd dayfind testsnd endoff hexdump promdump spend0 sound1 3ball shipbell pick6
+ZAPS=${wildcard */*.zap}
+#tipcalc
+#datahid2
+
+STAMPS=${foreach appdir,${TUTORIALS},${appdir}/${appdir}.stamp}
+APPS=${STAMPS:%.stamp=%.app}
+PS=${APPS:%.app=%.p}
+LSTS=${APPS:%.app=%.lst}
+HEX=${APPS:%.app=%.app.hex} ${APPS:%.app=%.known_good.hex}
+ZAPAPPS=${ZAPS:%.zap=%.zap.app}
+
+
+CROSS=../../asl/
+
+ZAP2APP=../tools/zap2app
+
+AFLAGS=-i ../include/dl150 -cpu datalink
+AS=${CROSS}asl ${AFLAGS}
+
+P2BIN=${CROSS}p2bin
+
+default:${STAMPS} ${APPS} ${ZAPAPPS}
+
+%.stamp:%.app.hex %.known_good.hex
+ diff -uN ${@:%.stamp=%.app.hex} ${@:%.stamp=%.known_good.hex} && touch $@
+
+
+${HEX}:${ZAPAPPS}
+
+%.hex:%
+ yes '' | dd bs=272 count=1 | cat - $< | hexdump -C > $@ || /bin/rm -f $@
+
+%.zap.app:%.zap
+ ${ZAP2APP} $< $@
+
+.PRECIOUS:${APPS}
+
+%.app:%.p
+ ${P2BIN} $< $@ -r 0x110-\$$
+
+%.p:%.asm
+ ${AS} -L ${@:%.p=%.lst} -o $@ $<
+
+clean:
+ /bin/rm -f ${APPS} ${PS} ${LSTS} ${HEX} ${STAMPS} ${ZAPAPPS}
diff --git a/from_toebes/datahid2/Data Hider App Beta.txt b/from_toebes/datahid2/Data Hider App Beta.txt
new file mode 100644
index 0000000..66a5bc5
--- /dev/null
+++ b/from_toebes/datahid2/Data Hider App Beta.txt
@@ -0,0 +1,43 @@
+From: John Toebes
+Sent: Saturday, April 12, 1997 2:23 PM
+To: 'datalink-developers@listproc.wsu.edu'
+Subject: Data Hider App Beta
+
+Hi all,
+ Here's another useful app which I am nearly finished with, but wanted
+people to have a chance to comment on it. What it does is allow you to
+protect the entries in your watch so that they can't be seen unless
+someone enters a password. The way it works is pretty simple:
+ Switch to the app. If the data is currently hidden, it says:
+ DATA
+ HIDDEN
+ J. TOEBES
+ Otherwise if you can actually see the phone numbers and list entries it
+says:
+ DATA
+ HIDER
+ J. TOEBES
+
+To hide the data on your watch, press the next button. Once you exit
+the app, you can't see any of the phone or list entries if they have
+been hidden. To get them back, just go back to the Data Hider app and
+press the SET button to enter the password. What password? Oh, the
+default one is 1234. Once you have entered the password, the note
+symbol will once again appear and allow you to unlock the entries. If
+the note symbol is visible, you can change the password to anything else
+by just pressing the SET button.
+
+Note that if you forget the password, there is no way to retrieve it (downloading another app will destroy where the password is stored!) or your entries.
+
+Possible enhancements:
+ 1) Add an automatic timeout to lock the watch after 1 minute
+ 2) Allow you to set the password before you download it to the watch
+ 3) Consider hiding the appointments and anniversaries. This has an
+unfortunate side effect that they won't go off (or at least I haven't
+figured out a way to trick the app into skipping them but still have
+them go off).
+
+
+---- John A. Toebes, VIII ---- toebes@southpeakcom
+Vice President Research and Development
+SouthPeak Interactive
diff --git a/from_toebes/datahid2/datahid2.zap b/from_toebes/datahid2/datahid2.zap
new file mode 100644
index 0000000..19a623c
--- /dev/null
+++ b/from_toebes/datahid2/datahid2.zap
@@ -0,0 +1,33 @@
+TDL0724962¬ Applet file header
+Data Hider¬ Applet friendly name
+DATAHID2¬ Applet version #
+Data Hider - by John A. Toebes, VIII
+
+To enter/set the password, press the set button.
+If the password has been entered, pressing the NEXT button will toggle between hidden and non-hidden mode.
+HINT: When the password is valid, the NOTE symbol will appear.
+
+TIP: Download your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!¬
+WATCHAPP.HLP¬ Applet help filename
+106¬
+none¬ Applet's parent's app name (if it exists - 'none' if it doesn't)
+Timex Data Link 150 Watch¬
+CC01F5819D9D819D9D819D9DCC01F5D6015D81CC017F00CC01FE141D0D0A180A1D11010D0D0E1511010D0E171D0E15180E171D0C110A15100E190A1C1C20181B0D13321D180E0B0E1C00000C22001AFF001BFF0001FFFF02FF0100FF0038FFFF1D011AFF0186FF01A6FF0139FF001DB691A11B2735A10026453F613F620060171060C60109C70159C6010AC7015A4FC70109C7010A20270560241160C60159C70109C6015AC7010A20140160021560C604A1270A4FC704A1A638CD4E8981CD579FA61BCD587EA60EB71D016003056004181E2002191EA627016002A621CD58A8A641CC58451E963F613F623F6081128FB691A1862704129F2048C604C3A1022629046017B661C1015B261AB662C1015C2613146001600EAD60200AB661C7015BB662C7015CA639CC4E89C604C3A100274CA1032744A101270181B660A802B760139FCD579FCD595CCD5930BE61CD593ECD5910BE62CD593ECD5920A62D05600CC6015BB761C6015CB762A633CD587EA639CD5845AD25149081119F2002109F4FC704F4A663C704F5036006AE62A6072004AE61A605CD57C7189081036006AE62A6092004AE61A607CC55BF¬
+35029¬
+0¬ No data
+Data Hider¬ Applet friendly name
+DATAHID2¬ Applet version #
+Data Hider - by John A. Toebes, VIII
+
+To enter/set the password, press the set button.
+If the password has been entered, pressing the NEXT button will toggle between hidden and non-hidden mode.
+HINT: When the password is valid, the NOTE symbol will appear.
+
+TIP: Download your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!¬
+WATCHAPP.HLP¬ Applet help filename
+106¬
+none¬ Applet's parent's app name (if it exists - 'none' if it doesn't)
+Timex Data Link 150s Watch¬
+CC01F5819D9D819D9D819D9DCC01F5D6015D81CC017F00CC01FE141D0D0A180A1D11010D0D0E1511010D0E171D0E15180E171D0C110A15100E190A1C1C20181B0D13321D180E0B0E1C00000C22001AFF001BFF0001FFFF02FF0100FF0038FFFF1D011AFF0186FF01A6FF0139FF001DB691A11B2735A10026453F613F620060171060C60109C70159C6010AC7015A4FC70109C7010A20270560241160C60159C70109C6015AC7010A20140160021560C604A1270A4FC704A1A638CD4E7881CD5ACBA61BCD577FA60EB71D016003056004181E2002191EA627016002A621CD57A9A641CC57461E963F613F623F6081128FB691A1862704129F2048C604C3A1022629046017B661C1015B261AB662C1015C2613146001600EAD60200AB661C7015BB662C7015CA639CC4E78C604C3A100274CA1032744A101270181B660A802B760139FCD5ACBCD585DCD5831BE61CD583FCD5811BE62CD583FCD5821A62D05600CC6015BB761C6015CB762A633CD577FA639CD5746AD25149081119F2002109F4FC704F4A663C704F5036006AE62A6072004AE61A605CD56C8189081036006AE62A6092004AE61A607CC55AE¬
+13022¬
+0¬ No data \ No newline at end of file
diff --git a/dayfind/dayfind.asm b/from_toebes/dayfind/dayfind.asm
index 9eed466..0cc1fcd 100644
--- a/dayfind/dayfind.asm
+++ b/from_toebes/dayfind/dayfind.asm
@@ -1,375 +1,384 @@
-;Name: Day Finder
-;Version: DAYFIND
-;Description: This will allow you to determine the date for a given day of the week and vice-versa.
-;by John A. Toebes, VIII
-;
-;Press the prev/next buttons to advance by a single day. Press SET to access the ability to advance/backup by
-;weeks, months, days, and years. The MODE button advances through those different states
-;
-;TIP: Download your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!
-;HelpFile: watchapp.hlp
-;HelpTopic: 106
- INCLUDE "wristapp.i"
-;
-; (1) Program specific constants
-;
-FLAGBYTE EQU $61
-B_CLEAR EQU 0 ; Bit 0 indicates that we need to clear the display first
-B_SCANUP EQU 1 ; Bit 1 indicates that we are scanning up
-B_SCANNING EQU 2 ; Bit 2 indicates that we are in a fake scanning mode
-DIGSEL EQU $62 ; Indicates which digit we are working on
- ; 0 = DAY OF WEEK
- ; 1 = Month
- ; 2 = Day
- ; 3 = Year
-YEAR_DIG1 EQU $63 ; This is the first digit of the year to blink (the tens digit)
-YEAR_DIG2 EQU $64 ; This is the second digit of the year to blink (the ones digit)
-COUNTER EQU $65 ; A convenient counter for us to advance a week at a time
-;
-;
-; (2) System entry point vectors
-;
-START EQU *
-L0110: jmp MAIN ; The main entry point - WRIST_MAIN
-L0113: rts ; Called when we are suspended for any reason - WRIST_SUSPEND
- nop
- nop
-L0116: rts ; Called to handle any timers or time events - WRIST_DOTIC
- nop
- nop
-L0119: rts ; Called when the COMM app starts and we have timers pending - WRIST_INCOMM
- nop
- nop
-L011c: rts ; Called when the COMM app loads new data - WRIST_NEWDATA
- nop
- nop
-
-L011f: lda STATETAB0,X ; The state table get routine - WRIST_GETSTATE
- rts
-
-L0123: jmp HANDLE_STATE0
- db STATETAB0-STATETAB0
-L0127: jmp HANDLE_STATE1
- db STATETAB1-STATETAB0
-;
-; (3) Program strings
-S6_DAY timex6 "DAY "
-S6_FIND timex6 " FIND"
-S8_TOEBES timex "J.TOEBES"
-S8_DAYFIND timex "DAY FIND"
-S8_WEEK db C_LEFTARR
- timex " WEEK "
- db C_RIGHTARR
-S8_MONTH db C_LEFTARR
- timex "MONTH "
- db C_RIGHTARR
-S8_DAY db C_LEFTARR
- timex " DAY "
- db C_RIGHTARR
-S8_YEAR db C_LEFTARR
- timex " YEAR "
- db C_RIGHTARR
-;
-; (4) State Table
-;
-STATETAB0:
- db 0
- db EVT_ENTER,TIM1_4TIC,0 ; Initial state
- db EVT_TIMER1,TIM_ONCE,0 ; The timer from the enter event
- db EVT_RESUME,TIM_ONCE,0 ; Resume from a nested app
- db EVT_MODE,TIM_ONCE,$FF ; Mode button
- db EVT_SET,TIM_ONCE,1 ; SET button pressed
- db EVT_DNNEXT,TIM2_8TIC,0 ; NEXT button pressed
- db EVT_DNPREV,TIM2_8TIC,0 ; PREV button pressed
- db EVT_UPANY4,TIM_ONCE,0 ; The
- db EVT_TIMER2,TIM2_TIC,0 ; The timer for the next/prev button pressed
- db EVT_END
-
-STATETAB1:
- db 1
- db EVT_RESUME,TIM_ONCE,1 ; Resume from a nested app
- db EVT_DNANY4,TIM_ONCE,1 ; NEXT, PREV, SET, MODE button pressed
- db EVT_UPANY4,TIM_ONCE,1 ; NEXT, PREV, SET, MODE button released
- db EVT_USER2,TIM_ONCE,0
- db EVT_USER3,TIM2_8TIC,1 ;
- db EVT_TIMER2,TIM2_TIC,1 ;
- db EVT_END
-;
-; (5) State Table 0 Handler
-; This is called to process the state events.
-; We see ENTER, TIMER2, and RESUME events
-;
-HANDLE_STATE0:
- bset 1,APP_FLAGS ; Indicate that we can be suspended
- lda BTNSTATE ; Get the event
- cmp #EVT_DNNEXT
- beq DO_NEXT0
- cmp #EVT_DNPREV
- beq DO_PREV0
- cmp #EVT_TIMER2
- beq DO_SCAN
- cmp #EVT_ENTER ; Is this our initial entry?
- bne REFRESH0
-;
-; This is the initial event for starting us up
-;
-DO_ENTER
-;
-; (6) This code gets the current date from the system
-
- jsr ACQUIRE ; Lock so that it doesn't change under us
- ldx #TZ1_MONTH ; Assume that we are using the first timezone
- jsr CHECK_TZ ; See which one we are really using
- bcc COPY_TZ1 ; If we were right, just skip on to do the work
- ldx #TZ2_MONTH ; Wrong guess, just load up the second time zone
-COPY_TZ1
- lda 0,x ; Copy out the month
- sta SCAN_MONTH
- lda 1,x ; Day
- sta SCAN_DAY
- lda 2,x ; and year
- sta SCAN_YEAR
- jsr RELEASE ; Unlock so the rest of the system is happy
-
- bclr B_CLEAR,FLAGBYTE ; Indicate that we need to clear the display
- clr DIGSEL ; Start us off on the week advance
- jsr CLEARSYM ; Clear the display
- lda #S6_DAY-START
- jsr PUT6TOP
- lda #S6_FIND-START
- jsr PUT6MID
- lda #S8_TOEBES-START
- jmp BANNER8
-
-DO_SCAN
- brclr B_SCANUP,FLAGBYTE,DO_PREV0 ; Were we scanning up or down?
-DO_NEXT0
- bset B_SCANUP,FLAGBYTE ; We are now scanning up
- jsr INCREMENT_SCAN_DATE ; Advance to the next date
- bra SHOW_DATE ; Comment this out and use the next one if you want
- ; jmp APPT_SHOW_SCAN ; to put the text 'SCAN' on the bottom when we are in scan mode
-
-DO_PREV0
- bclr B_SCANUP,FLAGBYTE ; We are now scanning down
- jsr DECREMENT_SCAN_DATE ; Back up to the previous date
- bra SHOW_DATE ; Show the date on the screen.
- ; jmp APPT_SHOW_SCAN ; Use this if you want 'SCAN' on the bottom of the display
-;
-; We come here for a RESUME or TIMER2 event. For this we want to reset the display
-;
-REFRESH0
- brset B_CLEAR,FLAGBYTE,NOCLEAR0 ; Do we need to clear the display first?
- bset B_CLEAR,FLAGBYTE ; Mark that the display has been cleared
- jsr CLEARALL ; and do the work of clearing
-NOCLEAR0
- lda #S8_DAYFIND-START ; Put up the name of the app on the display
- jsr BANNER8
-SHOW_DATE
- jsr APPT_SHOW_DATE ; Show the date on the screen
- ldx SCAN_YEAR ; as well as the year
- jmp PUTYEARMID
-;--------------------------------------------------------------------------------
-; (7) State Table 1 Handler
-; This is called to process the state events.
-; We see SET, RESUME, USER3, TIMER2, DNANY4, and UPANY4 events
-; We use the USER3 to trigger a delay which fires off a TIMER2 sequence of events.
-; This allows us to have the PREV/NEXT buttons repeat for advancing the WEEK and YEAR
-; since we can't use the UPDATE routines for them.
-;
-HANDLE_STATE1:
- bset 1,APP_FLAGS ; Indicate that we can be suspended
- lda BTNSTATE ; Get the event
- cmp #EVT_TIMER2 ; Was it a timer for a repeat operation?
- beq DO_UPD ; Yes, go handle it
- cmp #EVT_USER3 ; Was it the USER3 event fired from the PREV/NEXT buttons?
- bne TRY_UP ; No, try again
- rts ; Yes, just ignore it, it will cause a timer to go off later
-TRY_UP
- bclr B_SCANNING,FLAGBYTE ; We can't be scanning any more, so turn it off
- cmp #EVT_UPANY4 ; Was it any button being released?
- bne TRY_DN ; No, try again
- jmp REFRESH ; Yes, go refresh the screen (note that the branch is out of range)
-TRY_DN
- cmp #EVT_DNANY4 ; Is this our initial entry?
- beq GET_DN ; No, try again
- jmp FORCEFRESH ; Yes, go setup the screen (note that the branch is out of range)
-GET_DN
- lda BTN_PRESSED ; Let's see what the button they pressed was
- cmp #EVT_PREV ; How about the PREV button
- beq DO_PREV ; handle it
- cmp #EVT_NEXT ; Maybe the NEXT button?
- beq DO_NEXT ; Deal with it!
- cmp #EVT_MODE ; Perhaps the MODE button
- beq DO_MODE ; If so, handle it
- ; It must be the set button, so take us out of this state
- lda #EVT_USER2
- jmp POSTEVENT
-;
-; (8) Our real working code...
-; We come here when they press the next/prev buttons. if we are in a timer repeat
-; situation (triggered when they press prev/next for the WEEK/YEAR) then we skip right
-; to processing based on the button that was previously pressed
-;
-DO_NEXT
- bset 0,SYSFLAGS ; Mark our update direction as up
- bra DO_UPD
-DO_PREV
- bclr 0,SYSFLAGS ; Mark our update direction as down
-DO_UPD
- lda DIGSEL ; Which digit mode are we in?
- beq DO_UPD_DOW ; 0 - Handle the WEEK
- cmp #2
- blo DO_UPD_MONTH ; <2 = 1 - Handle the MONTH
- beq DO_UPD_DAY ; 2 - Handle the Day
-DO_UPD_YEAR ; >2 = 3 - Handle the YEAR
- brclr 0,SYSFLAGS,LASTYEAR ; Were we in the down direction?
- ldx #99 ; Going up, let the WRAPX routine handle it for us
- lda SCAN_YEAR
- jsr INCA_WRAPX
- bra SAVEYEAR
-LASTYEAR
- lda SCAN_YEAR ; Going down, get the year
- deca ; Decrement it
- bpl SAVEYEAR ; and see if we hit the lower end
- lda #99 ; Yes, 2000 wraps down to 1999
-SAVEYEAR
- sta SCAN_YEAR ; Save away the new year
- bra SETUP_LAG ; And fire off an event to allow for repeating
-
-DO_UPD_DOW ; 0 - Day of week
- lda #7 ; We want to iterate 7 times advancing by one day.
- sta COUNTER ; (this makes it much easier to handle all the fringe cases)
-WEEKLOOP
- brclr 0,SYSFLAGS,LASTWEEK ; Are we going backwards?
- jsr INCREMENT_SCAN_DATE ; Going forwards, advance by one day
- bra WEEKLOOPCHK ; And continue the loop
-LASTWEEK
- jsr DECREMENT_SCAN_DATE ; Going backwards, retreat by one day
-WEEKLOOPCHK
- dec COUNTER ; Count down
- tst COUNTER ; See if we hit the limit
- bne WEEKLOOP ; and go back for more
-; (9) Fake repeater
-; This code is used for the Day of week and year modes where we want to have a
-; repeating button, but the system routines won't handle it for us
-; It works by posting a USER3 event which has a timer of about 1/2 second.
-; After that timer expires, we get a timer2 event which then repeats every tic.
-; The only thing that we have to worry about here is to not go through this
-; every time so that it takes 1/2 second for every repeat.
-SETUP_LAG
- brset B_SCANNING,FLAGBYTE,INLAG ; If we were already scanning, skip out
- bset B_SCANNING,FLAGBYTE ; Indicate that we are scanning
- lda #EVT_USER3 ; and post the event to start it off
- jsr POSTEVENT
-INLAG
- jmp SHOW_DATE ; Put the date up on the display
-; (10) Update routine usage
-DO_UPD_MONTH ; 1 - Handle the month
- lda #MONTH_JAN ; The bottom end is January
- sta UPDATE_MIN
- lda #MONTH_DEC ; and the top end is December (INCLUSIVE)
- sta UPDATE_MAX
- lda #UPD_HMONTH ; We want the HALF-MONTH udpate function
- ldx #SCAN_MONTH ; To update the SCAN_MONTH variable
- bra SEL_UPD ; Go do it
-DO_UPD_DAY ; 2 - Handle the day
- lda #1 ; 1 is the first day of the month
- sta UPDATE_MIN
- jsr GET_SCAN_MONTHLEN ; Figure out how long the month is
- sta UPDATE_MAX ; and make that the limit
- lda #UPD_HDAY ; We want the HALF-DAY update function
- ldx #SCAN_DAY ; to update the SCAN_DAY variable
-SEL_UPD
- jsr START_UPDATEP ; And prepare the update routine
- bset 4,BTNFLAGS ; Mark that the update is now pending
- rts
-; (11) Making the mode button work
-; when they press the mode button, we want to cycle through the various choices
-; on the display.
-DO_MODE
- lda DIGSEL ; Figure out where we are in the cycle
- inca ; advance to the next one
- and #3 ; and wrap at 4 to zero
- sta DIGSEL
-REFRESH
- brset B_CLEAR,FLAGBYTE,NOCLEAR ; Do we need to clear the display first?
-FORCEFRESH
- jsr CLEARALL ; Yes, clear everything before we start
- bset B_CLEAR,FLAGBYTE ; And remember that we have already done that
-NOCLEAR
- clr BTNFLAGS ; Turn off any scrolling banners
- lda #ROW_TD23 ; Turn off the dash from the week blink
- sta DISP_ROW
- bclr COL_TD23,DISP_COL
- jsr SHOW_DATE ; Display the date
-; (12) Establishing a blink routine
-; This makes the appropriate section of the display blink based on what we are changing
- lda DIGSEL ; Get the digit we are on
- beq DO_BLINK_DOW ; 0 -> Update Day of week
- cmp #2
- blo DO_BLINK_MONTH ; <2 = 1 -> Update month
- beq DO_BLINK_DAY ; 2 - Update day of month
-
-DO_BLINK_YEAR ; 3: Year
-; (13) Calling BLINK_SECOND
-; For BLINK_SECONDS, the UPDATE_PARM points to the 2 character format for the year.
- ldx SCAN_YEAR ; Get our year
- jsr GETBCDHI ; And extract out the high digit of it
- sta YEAR_DIG1 ; Save that away
- ldx SCAN_YEAR ; Do it again
- jsr GETBCDLOW ; to get the low digit
- sta YEAR_DIG2 ; and save that away
- ldx #YEAR_DIG1 ; the parm points to the first digit
- lda #BLINK_SECONDS ; and we want a BLINK_SECONDS function
- bra SETUP_BLINK ; so do it already
-
-DO_BLINK_DOW ; 0: Day of week:
-; (14) Calling BLINK_SEGMENT
-; Unfortunately, there is no blink routine to blink the upper two letters on the display.
-; To get around this, I have chosen to blink a single segment on the display (the dash
-; after the day of the week). This routine was designed to blink the AM/PM or other
-; symbols, but it works quite fine for our purposed. You need to set UPDATE_POS to have
-; the row to be updated and UPDATE_VAL holds the mask for the COLUMS to be XORed.
-; In this way, you might have more than one segment blinking, but there are few segments
-; on the same row which would achieve a reasonable effect.
-; UPDATE_POS ROW_TD23
-; UPDATE_VAL (1<<COL_TD23)
- lda #ROW_TD23
-; We want to blink the DASH after the day of week sta UPDATE_POS
-; Store the ROW for it in UPDATE_POS lda #(1<<COL_TD23)
-; Get the mask for the column sta UPDATE_VAL
-; And store that in UPDATE_VAL lda #BLINK_SEGMENT
-; We want a BLINK_SEGMENT function bra SETUP_BLINK
-; and get to it.
-DO_BLINK_MONTH ; 1: Month
-; (15) Calling BLINK_HMONTH, BLINK_HDAY
-; These are the normal boring cases of calling the blink routine. They simply need the
-; address of the byte holding the value to blink and the function to blink them with.
-; UPDATE_PARM - Points to the month
- lda #BLINK_HMONTH ; We want a BLINK HALF-MONTH function
- ldx #SCAN_MONTH ; to blink our month
- bra SETUP_BLINK ; and do it
-
-DO_BLINK_DAY ; 2: Day
-; UPDATE_PARM - Points to the day
- lda #BLINK_HDAY ; We want a BLINK HALF-DAY function
- ldx #SCAN_DAY ; to blink our day
-
-SETUP_BLINK
- jsr START_BLINKP ; Request the blink function
- lda digsel ; Figure out which one we are blinking
- lsla ; *2
- lsla ; *4
- lsla ; *8
- add #S8_WEEK-START ; And use that to index the banner to put on the bottom
- jsr BANNER8
- bset 2,BTNFLAGS ; Mark a blink routine as pending
- rts
-;
-; (16) This is the main initialization routine which is called when we first get the app into memory
-;
-MAIN:
- lda #$c0 ; We want button beeps and to indicate that we have been loaded
- sta WRISTAPP_FLAGS
- clr FLAGBYTE ; start with a clean slate
- rts
+;Name: Day Finder
+;Version: DAYFIND
+;Description: This will allow you to determine the date for a given day of the week and vice-versa.
+;by John A. Toebes, VIII
+;
+;Press the prev/next buttons to advance by a single day. Press SET to access the ability to advance/backup by
+;weeks, months, days, and years. The MODE button advances through those different states
+;
+;TIP: Download your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!
+;HelpFile: watchapp.hlp
+;HelpTopic: 106
+ INCLUDE "WRISTAPP.I"
+;
+; (1) Program specific constants
+;
+FLAGBYTE EQU $61
+B_CLEAR EQU 0 ; Bit 0 indicates that we need to clear the display first
+B_SCANUP EQU 1 ; Bit 1 indicates that we are scanning up
+B_SCANNING EQU 2 ; Bit 2 indicates that we are in a fake scanning mode
+DIGSEL EQU $62 ; Indicates which digit we are working on
+ ; 0 = DAY OF WEEK
+ ; 1 = Month
+ ; 2 = Day
+ ; 3 = Year
+YEAR_DIG1 EQU $63 ; This is the first digit of the year to blink (the tens digit)
+YEAR_DIG2 EQU $64 ; This is the second digit of the year to blink (the ones digit)
+COUNTER EQU $65 ; A convenient counter for us to advance a week at a time
+;
+;
+; (2) System entry point vectors
+;
+START EQU *
+L0110: jmp MAIN ; The main entry point - WRIST_MAIN
+L0113: rts ; Called when we are suspended for any reason - WRIST_SUSPEND
+ nop
+ nop
+L0116: rts ; Called to handle any timers or time events - WRIST_DOTIC
+ nop
+ nop
+L0119: rts ; Called when the COMM app starts and we have timers pending - WRIST_INCOMM
+ nop
+ nop
+L011c: rts ; Called when the COMM app loads new data - WRIST_NEWDATA
+ nop
+ nop
+
+L011f: lda STATETAB0,X ; The state table get routine - WRIST_GETSTATE
+ rts
+
+L0123: jmp HANDLE_STATE0
+ db STATETAB0-STATETAB0
+L0127: jmp HANDLE_STATE1
+ db STATETAB1-STATETAB0
+;
+; (3) Program strings
+S6_DAY timex6 "DAY "
+S6_FIND timex6 " FIND"
+S8_TOEBES timex "J.TOEBES"
+S8_DAYFIND timex "DAY FIND"
+S8_WEEK db C_LEFTARR
+ timex " WEEK "
+ db C_RIGHTARR
+S8_MONTH db C_LEFTARR
+ timex "MONTH "
+ db C_RIGHTARR
+S8_DAY db C_LEFTARR
+ timex " DAY "
+ db C_RIGHTARR
+S8_YEAR db C_LEFTARR
+ timex " YEAR "
+ db C_RIGHTARR
+;
+; (4) State Table
+;
+STATETAB0:
+ db 0
+ db EVT_ENTER,TIM1_4TIC,0 ; Initial state
+ db EVT_TIMER1,TIM_ONCE,0 ; The timer from the enter event
+ db EVT_RESUME,TIM_ONCE,0 ; Resume from a nested app
+ db EVT_MODE,TIM_ONCE,$FF ; Mode button
+ db EVT_SET,TIM_ONCE,1 ; SET button pressed
+ db EVT_DNNEXT,TIM2_8TIC,0 ; NEXT button pressed
+ db EVT_DNPREV,TIM2_8TIC,0 ; PREV button pressed
+ db EVT_UPANY4,TIM_ONCE,0 ; The
+ db EVT_TIMER2,TIM2_TIC,0 ; The timer for the next/prev button pressed
+ db EVT_END
+
+STATETAB1:
+ db 1
+ db EVT_RESUME,TIM_ONCE,1 ; Resume from a nested app
+ db EVT_DNANY4,TIM_ONCE,1 ; NEXT, PREV, SET, MODE button pressed
+ db EVT_UPANY4,TIM_ONCE,1 ; NEXT, PREV, SET, MODE button released
+ db EVT_USER2,TIM_ONCE,0
+ db EVT_USER3,TIM2_8TIC,1 ;
+ db EVT_TIMER2,TIM2_TIC,1 ;
+ db EVT_END
+;
+; (5) State Table 0 Handler
+; This is called to process the state events.
+; We see ENTER, TIMER2, and RESUME events
+;
+HANDLE_STATE0:
+ bset 1,APP_FLAGS ; Indicate that we can be suspended
+ lda BTNSTATE ; Get the event
+ cmp #EVT_DNNEXT
+ beq DO_NEXT0
+ cmp #EVT_DNPREV
+ beq DO_PREV0
+ cmp #EVT_TIMER2
+ beq DO_SCAN
+ cmp #EVT_ENTER ; Is this our initial entry?
+ bne REFRESH0
+;
+; This is the initial event for starting us up
+;
+DO_ENTER
+;
+; (6) This code gets the current date from the system
+
+ jsr ACQUIRE ; Lock so that it doesn't change under us
+ ldx #TZ1_MONTH ; Assume that we are using the first timezone
+ jsr CHECK_TZ ; See which one we are really using
+ bcc COPY_TZ1 ; If we were right, just skip on to do the work
+ ldx #TZ2_MONTH ; Wrong guess, just load up the second time zone
+COPY_TZ1
+ lda 0,x ; Copy out the month
+ sta SCAN_MONTH
+ lda 1,x ; Day
+ sta SCAN_DAY
+ lda 2,x ; and year
+ sta SCAN_YEAR
+ jsr RELEASE ; Unlock so the rest of the system is happy
+
+ bclr B_CLEAR,FLAGBYTE ; Indicate that we need to clear the display
+ clr DIGSEL ; Start us off on the week advance
+ jsr CLEARSYM ; Clear the display
+ lda #S6_DAY-START
+ jsr PUT6TOP
+ lda #S6_FIND-START
+ jsr PUT6MID
+ lda #S8_TOEBES-START
+ jmp BANNER8
+
+DO_SCAN
+ brclr B_SCANUP,FLAGBYTE,DO_PREV0 ; Were we scanning up or down?
+DO_NEXT0
+ bset B_SCANUP,FLAGBYTE ; We are now scanning up
+ jsr INCREMENT_SCAN_DATE ; Advance to the next date
+ bra SHOW_DATE ; Comment this out and use the next one if you want
+ ; jmp APPT_SHOW_SCAN ; to put the text 'SCAN' on the bottom when we are in scan mode
+
+DO_PREV0
+ bclr B_SCANUP,FLAGBYTE ; We are now scanning down
+ jsr DECREMENT_SCAN_DATE ; Back up to the previous date
+ bra SHOW_DATE ; Show the date on the screen.
+ ; jmp APPT_SHOW_SCAN ; Use this if you want 'SCAN' on the bottom of the display
+;
+; We come here for a RESUME or TIMER2 event. For this we want to reset the display
+;
+REFRESH0
+ brset B_CLEAR,FLAGBYTE,NOCLEAR0 ; Do we need to clear the display first?
+ bset B_CLEAR,FLAGBYTE ; Mark that the display has been cleared
+ jsr CLEARALL ; and do the work of clearing
+NOCLEAR0
+ lda #S8_DAYFIND-START ; Put up the name of the app on the display
+ jsr BANNER8
+SHOW_DATE
+ jsr APPT_SHOW_DATE ; Show the date on the screen
+ ldx SCAN_YEAR ; as well as the year
+ jmp PUTYEARMID
+;--------------------------------------------------------------------------------
+; (7) State Table 1 Handler
+; This is called to process the state events.
+; We see SET, RESUME, USER3, TIMER2, DNANY4, and UPANY4 events
+; We use the USER3 to trigger a delay which fires off a TIMER2 sequence of events.
+; This allows us to have the PREV/NEXT buttons repeat for advancing the WEEK and YEAR
+; since we can't use the UPDATE routines for them.
+;
+HANDLE_STATE1:
+ bset 1,APP_FLAGS ; Indicate that we can be suspended
+ lda BTNSTATE ; Get the event
+ cmp #EVT_TIMER2 ; Was it a timer for a repeat operation?
+ beq DO_UPD ; Yes, go handle it
+ cmp #EVT_USER3 ; Was it the USER3 event fired from the PREV/NEXT buttons?
+ bne TRY_UP ; No, try again
+ rts ; Yes, just ignore it, it will cause a timer to go off later
+TRY_UP
+ bclr B_SCANNING,FLAGBYTE ; We can't be scanning any more, so turn it off
+ cmp #EVT_UPANY4 ; Was it any button being released?
+ bne TRY_DN ; No, try again
+ jmp REFRESH ; Yes, go refresh the screen (note that the branch is out of range)
+TRY_DN
+ cmp #EVT_DNANY4 ; Is this our initial entry?
+ beq GET_DN ; No, try again
+ jmp FORCEFRESH ; Yes, go setup the screen (note that the branch is out of range)
+GET_DN
+ lda BTN_PRESSED ; Let's see what the button they pressed was
+ cmp #EVT_PREV ; How about the PREV button
+ beq DO_PREV ; handle it
+ cmp #EVT_NEXT ; Maybe the NEXT button?
+ beq DO_NEXT ; Deal with it!
+ cmp #EVT_MODE ; Perhaps the MODE button
+ beq DO_MODE ; If so, handle it
+ ; It must be the set button, so take us out of this state
+ lda #EVT_USER2
+ jmp POSTEVENT
+;
+; (8) Our real working code...
+; We come here when they press the next/prev buttons. if we are in a timer repeat
+; situation (triggered when they press prev/next for the WEEK/YEAR) then we skip right
+; to processing based on the button that was previously pressed
+;
+DO_NEXT
+ bset 0,SYSFLAGS ; Mark our update direction as up
+ bra DO_UPD
+DO_PREV
+ bclr 0,SYSFLAGS ; Mark our update direction as down
+DO_UPD
+ lda DIGSEL ; Which digit mode are we in?
+ beq DO_UPD_DOW ; 0 - Handle the WEEK
+ cmp #2
+ blo DO_UPD_MONTH ; <2 = 1 - Handle the MONTH
+ beq DO_UPD_DAY ; 2 - Handle the Day
+DO_UPD_YEAR ; >2 = 3 - Handle the YEAR
+ brclr 0,SYSFLAGS,LASTYEAR ; Were we in the down direction?
+ ldx #99 ; Going up, let the WRAPX routine handle it for us
+ lda SCAN_YEAR
+ jsr INCA_WRAPX
+ bra SAVEYEAR
+LASTYEAR
+ lda SCAN_YEAR ; Going down, get the year
+ deca ; Decrement it
+ bpl SAVEYEAR ; and see if we hit the lower end
+ lda #99 ; Yes, 2000 wraps down to 1999
+SAVEYEAR
+ sta SCAN_YEAR ; Save away the new year
+ bra SETUP_LAG ; And fire off an event to allow for repeating
+
+DO_UPD_DOW ; 0 - Day of week
+ lda #7 ; We want to iterate 7 times advancing by one day.
+ sta COUNTER ; (this makes it much easier to handle all the fringe cases)
+WEEKLOOP
+ brclr 0,SYSFLAGS,LASTWEEK ; Are we going backwards?
+ jsr INCREMENT_SCAN_DATE ; Going forwards, advance by one day
+ bra WEEKLOOPCHK ; And continue the loop
+LASTWEEK
+ jsr DECREMENT_SCAN_DATE ; Going backwards, retreat by one day
+WEEKLOOPCHK
+ dec COUNTER ; Count down
+ tst COUNTER ; See if we hit the limit
+ bne WEEKLOOP ; and go back for more
+; (9) Fake repeater
+; This code is used for the Day of week and year modes where we want to have a
+; repeating button, but the system routines won't handle it for us
+; It works by posting a USER3 event which has a timer of about 1/2 second.
+; After that timer expires, we get a timer2 event which then repeats every tic.
+; The only thing that we have to worry about here is to not go through this
+; every time so that it takes 1/2 second for every repeat.
+SETUP_LAG
+ brset B_SCANNING,FLAGBYTE,INLAG ; If we were already scanning, skip out
+ bset B_SCANNING,FLAGBYTE ; Indicate that we are scanning
+ lda #EVT_USER3 ; and post the event to start it off
+ jsr POSTEVENT
+INLAG
+ jmp SHOW_DATE ; Put the date up on the display
+; (10) Update routine usage
+DO_UPD_MONTH ; 1 - Handle the month
+ lda #MONTH_JAN ; The bottom end is January
+ sta UPDATE_MIN
+ lda #MONTH_DEC ; and the top end is December (INCLUSIVE)
+ sta UPDATE_MAX
+ lda #UPD_HMONTH ; We want the HALF-MONTH udpate function
+ ldx #SCAN_MONTH ; To update the SCAN_MONTH variable
+ bra SEL_UPD ; Go do it
+DO_UPD_DAY ; 2 - Handle the day
+ lda #1 ; 1 is the first day of the month
+ sta UPDATE_MIN
+ jsr GET_SCAN_MONTHLEN ; Figure out how long the month is
+ sta UPDATE_MAX ; and make that the limit
+ lda #UPD_HDAY ; We want the HALF-DAY update function
+ ldx #SCAN_DAY ; to update the SCAN_DAY variable
+SEL_UPD
+ jsr START_UPDATEP ; And prepare the update routine
+ bset 4,BTNFLAGS ; Mark that the update is now pending
+ rts
+; (11) Making the mode button work
+; when they press the mode button, we want to cycle through the various choices
+; on the display.
+DO_MODE
+ lda DIGSEL ; Figure out where we are in the cycle
+ inca ; advance to the next one
+ and #3 ; and wrap at 4 to zero
+ sta DIGSEL
+REFRESH
+ brset B_CLEAR,FLAGBYTE,NOCLEAR ; Do we need to clear the display first?
+FORCEFRESH
+ jsr CLEARALL ; Yes, clear everything before we start
+ bset B_CLEAR,FLAGBYTE ; And remember that we have already done that
+NOCLEAR
+ clr BTNFLAGS ; Turn off any scrolling banners
+ lda #ROW_TD23 ; Turn off the dash from the week blink
+ sta DISP_ROW
+ bclr COL_TD23,DISP_COL
+ jsr SHOW_DATE ; Display the date
+; (12) Establishing a blink routine
+; This makes the appropriate section of the display blink based on what we are changing
+ lda DIGSEL ; Get the digit we are on
+ beq DO_BLINK_DOW ; 0 -> Update Day of week
+ cmp #2
+ blo DO_BLINK_MONTH ; <2 = 1 -> Update month
+ beq DO_BLINK_DAY ; 2 - Update day of month
+
+DO_BLINK_YEAR ; 3: Year
+; (13) Calling BLINK_SECOND
+; For BLINK_SECONDS, the UPDATE_PARM points to the 2 character format for the year.
+ ldx SCAN_YEAR ; Get our year
+ jsr GETBCDHI ; And extract out the high digit of it
+ sta YEAR_DIG1 ; Save that away
+ ldx SCAN_YEAR ; Do it again
+ jsr GETBCDLOW ; to get the low digit
+ sta YEAR_DIG2 ; and save that away
+ ldx #YEAR_DIG1 ; the parm points to the first digit
+ lda #BLINK_SECONDS ; and we want a BLINK_SECONDS function
+ bra SETUP_BLINK ; so do it already
+
+DO_BLINK_DOW ; 0: Day of week:
+; (14) Calling BLINK_SEGMENT
+; Unfortunately, there is no blink routine to blink the upper two letters on the display.
+; To get around this, I have chosen to blink a single segment on the display (the dash
+; after the day of the week). This routine was designed to blink the AM/PM or other
+; symbols, but it works quite fine for our purposed. You need to set UPDATE_POS to have
+; the row to be updated and UPDATE_VAL holds the mask for the COLUMS to be XORed.
+; In this way, you might have more than one segment blinking, but there are few segments
+; on the same row which would achieve a reasonable effect.
+; UPDATE_POS ROW_TD23
+; UPDATE_VAL (1<<COL_TD23)
+ lda #ROW_TD23
+; We want to blink the DASH after the day of week sta UPDATE_POS
+; Store the ROW for it in UPDATE_POS lda #(1<<COL_TD23)
+; Get the mask for the column sta UPDATE_VAL
+; And store that in UPDATE_VAL lda #BLINK_SEGMENT
+; We want a BLINK_SEGMENT function bra SETUP_BLINK
+; and get to it.
+
+ ; JMM this is missing from the published listing
+ sta UPDATE_POS
+ lda #2
+ sta UPDATE_VAL
+ lda #10
+ bra SETUP_BLINK
+ ; JMM end missing section
+
+DO_BLINK_MONTH ; 1: Month
+; (15) Calling BLINK_HMONTH, BLINK_HDAY
+; These are the normal boring cases of calling the blink routine. They simply need the
+; address of the byte holding the value to blink and the function to blink them with.
+; UPDATE_PARM - Points to the month
+ lda #BLINK_HMONTH ; We want a BLINK HALF-MONTH function
+ ldx #SCAN_MONTH ; to blink our month
+ bra SETUP_BLINK ; and do it
+
+DO_BLINK_DAY ; 2: Day
+; UPDATE_PARM - Points to the day
+ lda #BLINK_HDAY ; We want a BLINK HALF-DAY function
+ ldx #SCAN_DAY ; to blink our day
+
+SETUP_BLINK
+ jsr START_BLINKP ; Request the blink function
+ lda digsel ; Figure out which one we are blinking
+ lsla ; *2
+ lsla ; *4
+ lsla ; *8
+ add #S8_WEEK-START ; And use that to index the banner to put on the bottom
+ jsr BANNER8
+ bset 2,BTNFLAGS ; Mark a blink routine as pending
+ rts
+;
+; (16) This is the main initialization routine which is called when we first get the app into memory
+;
+MAIN:
+ lda #$c0 ; We want button beeps and to indicate that we have been loaded
+ sta WRISTAPP_FLAGS
+ clr FLAGBYTE ; start with a clean slate
+ rts
diff --git a/from_toebes/dayfind/dayfind.known_good b/from_toebes/dayfind/dayfind.known_good
new file mode 120000
index 0000000..c4cb2d1
--- /dev/null
+++ b/from_toebes/dayfind/dayfind.known_good
@@ -0,0 +1 @@
+dayfind.zap.app \ No newline at end of file
diff --git a/from_toebes/dayfind/dayfind.zap b/from_toebes/dayfind/dayfind.zap
new file mode 100644
index 0000000..d783fc3
--- /dev/null
+++ b/from_toebes/dayfind/dayfind.zap
@@ -0,0 +1,31 @@
+TDL0724962¬ Applet file header
+Day Find¬ Applet friendly name
+dayfind1¬ Applet version #
+This will allow you to determine the date for a given day of the week and vice-versa.
+
+Press the prev/next buttons to advance by a single day. Press SET to access the ability to advance/backup by
+weeks, months, days, and years. The MODE button advances through those different states
+
+TIP: Download your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!¬
+WATCHAPP.HLP¬ Applet help filename
+106¬
+none¬ Applet's parent's app name (if it exists - 'none' if it doesn't)
+Timex Data Link 150 Watch¬
+CC02FE819D9D819D9D819D9D819D9DD6016581CC019600CC02001D0D0A1B1D1D1D0F01150D13321D180E0B0E1C0D0A22240F12170D3C24200E0E14243D3C1618171D11243D3C240D0A2224243D3C24220E0A1B243D001B03001EFF001AFF0001FFFF02FF01808300838300A6FF001F80001D011AFF0186FF01A6FF0139FF003A83011F80011D128FB691A180273FA1832742A11F2734A11B2641CD68E8AEB2CD690E2402AEBBF6B77AE601B77BE602B77CCD68F211613F62CD579FA61BCD587EA61FCD58A8A625CC58450361071261CD43B920141361CD43F4200D0061051061CD577AA62DCD5845CD7439BE7CCC59D9128FB691A11F272FA13A2601811561A1A62603CC02A6A1862703CC02A9C604C3A1032711A1002709A1012773A639CC4E89109F2002119FB662271DA102253B2749019F09AE63B67CCD6B0D2007B67C4A2A02A663B77C2015A607B765019F05CD43B92003CD43F43A653D6526EF0461071461A63ACD4E89CC01F8A601C704F4A60CC704F5A602AE7A200FA601C704F4CD43E0C704F5A604AE7BCD57C7189081B6624CA403B762006105CD577A10613F90A636B71D131ECD01F8B662271AA10225232727BE7CCD6B52B763BE7CCD6B5AB764AE63A6012017A636C704F3A602B7A6A60A200AA604AE7A2004A606AE7BCD55BFB662484848AB35CD5845149081A6C0B7963F6181¬
+22720¬
+0¬ No data
+Day Find¬ Applet friendly name
+dayfind2¬ Applet version #
+This will allow you to determine the date for a given day of the week and vice-versa.
+
+Press the prev/next buttons to advance by a single day. Press SET to access the ability to advance/backup by
+weeks, months, days, and years. The MODE button advances through those different states
+
+TIP: Download your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!¬
+WATCHAPP.HLP¬ Applet help filename
+106¬
+none¬ Applet's parent's app name (if it exists - 'none' if it doesn't)
+Timex Data Link 150s Watch¬
+CC02FE819D9D819D9D819D9D819D9DD6016581CC019600CC02001D0D0A1B1D1D1D0F01150D13321D180E0B0E1C0D0A22240F12170D3C24200E0E14243D3C1618171D11243D3C240D0A2224243D3C24220E0A1B243D001B03001EFF001AFF0001FFFF02FF01808300838300A6FF001F80001D011AFF0186FF01A6FF0139FF003A83011F80011D128FB691A180273FA1832742A11F2734A11B2641CD68F1AEB2CD69172402AEBBF6B77AE601B77BE602B77CCD68FB11613F62CD5ACBA61BCD577FA61FCD57A9A625CC57460361071261CD43A820141361CD43E3200D0061051061CD5AA0A62DCD5746CD7442BE7CCC58DA128FB691A11F272FA13A2601811561A1A62603CC02A6A1862703CC02A9C604C3A1032711A1002709A1012773A639CC4E78109F2002119FB662271DA102253B2749019F09AE63B67CCD6B162007B67C4A2A02A663B77C2015A607B765019F05CD43A82003CD43E33A653D6526EF0461071461A63ACD4E78CC01F8A601C704F4A60CC704F5A602AE7A200FA601C704F4CD43CFC704F5A604AE7BCD56C8189081B6624CA403B762006105CD5AA010613F90A634B71D131ECD01F8B662271AA10225232727BE7CCD6B5BB763BE7CCD6B63B764AE63A6012017A634C704F3A602B7A6A60A200AA604AE7A2004A606AE7BCD55AEB662484848AB35CD5746149081A6C0B7963F6181¬
+63729¬
+0¬ No data \ No newline at end of file
diff --git a/from_toebes/dayfind/dayfind.zsm b/from_toebes/dayfind/dayfind.zsm
new file mode 100644
index 0000000..8aaf43b
--- /dev/null
+++ b/from_toebes/dayfind/dayfind.zsm
@@ -0,0 +1,375 @@
+;Name: Day Finder
+;Version: DAYFIND
+;Description: This will allow you to determine the date for a given day of the week and vice-versa.
+;by John A. Toebes, VIII
+;
+;Press the prev/next buttons to advance by a single day. Press SET to access the ability to advance/backup by
+;weeks, months, days, and years. The MODE button advances through those different states
+;
+;TIP: Download your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!
+;HelpFile: watchapp.hlp
+;HelpTopic: 106
+ INCLUDE "WRISTAPP.I"
+;
+; (1) Program specific constants
+;
+FLAGBYTE EQU $61
+B_CLEAR EQU 0 ; Bit 0 indicates that we need to clear the display first
+B_SCANUP EQU 1 ; Bit 1 indicates that we are scanning up
+B_SCANNING EQU 2 ; Bit 2 indicates that we are in a fake scanning mode
+DIGSEL EQU $62 ; Indicates which digit we are working on
+ ; 0 = DAY OF WEEK
+ ; 1 = Month
+ ; 2 = Day
+ ; 3 = Year
+YEAR_DIG1 EQU $63 ; This is the first digit of the year to blink (the tens digit)
+YEAR_DIG2 EQU $64 ; This is the second digit of the year to blink (the ones digit)
+COUNTER EQU $65 ; A convenient counter for us to advance a week at a time
+;
+;
+; (2) System entry point vectors
+;
+START EQU *
+L0110: jmp MAIN ; The main entry point - WRIST_MAIN
+L0113: rts ; Called when we are suspended for any reason - WRIST_SUSPEND
+ nop
+ nop
+L0116: rts ; Called to handle any timers or time events - WRIST_DOTIC
+ nop
+ nop
+L0119: rts ; Called when the COMM app starts and we have timers pending - WRIST_INCOMM
+ nop
+ nop
+L011c: rts ; Called when the COMM app loads new data - WRIST_NEWDATA
+ nop
+ nop
+
+L011f: lda STATETAB0,X ; The state table get routine - WRIST_GETSTATE
+ rts
+
+L0123: jmp HANDLE_STATE0
+ db STATETAB0-STATETAB0
+L0127: jmp HANDLE_STATE1
+ db STATETAB1-STATETAB0
+;
+; (3) Program strings
+S6_DAY timex6 "DAY "
+S6_FIND timex6 " FIND"
+S8_TOEBES timex "J.TOEBES"
+S8_DAYFIND timex "DAY FIND"
+S8_WEEK db C_LEFTARR
+ timex " WEEK "
+ db C_RIGHTARR
+S8_MONTH db C_LEFTARR
+ timex "MONTH "
+ db C_RIGHTARR
+S8_DAY db C_LEFTARR
+ timex " DAY "
+ db C_RIGHTARR
+S8_YEAR db C_LEFTARR
+ timex " YEAR "
+ db C_RIGHTARR
+;
+; (4) State Table
+;
+STATETAB0:
+ db 0
+ db EVT_ENTER,TIM1_4TIC,0 ; Initial state
+ db EVT_TIMER1,TIM_ONCE,0 ; The timer from the enter event
+ db EVT_RESUME,TIM_ONCE,0 ; Resume from a nested app
+ db EVT_MODE,TIM_ONCE,$FF ; Mode button
+ db EVT_SET,TIM_ONCE,1 ; SET button pressed
+ db EVT_DNNEXT,TIM2_8TIC,0 ; NEXT button pressed
+ db EVT_DNPREV,TIM2_8TIC,0 ; PREV button pressed
+ db EVT_UPANY4,TIM_ONCE,0 ; The
+ db EVT_TIMER2,TIM2_TIC,0 ; The timer for the next/prev button pressed
+ db EVT_END
+
+STATETAB1:
+ db 1
+ db EVT_RESUME,TIM_ONCE,1 ; Resume from a nested app
+ db EVT_DNANY4,TIM_ONCE,1 ; NEXT, PREV, SET, MODE button pressed
+ db EVT_UPANY4,TIM_ONCE,1 ; NEXT, PREV, SET, MODE button released
+ db EVT_USER2,TIM_ONCE,0
+ db EVT_USER3,TIM2_8TIC,1 ;
+ db EVT_TIMER2,TIM2_TIC,1 ;
+ db EVT_END
+;
+; (5) State Table 0 Handler
+; This is called to process the state events.
+; We see ENTER, TIMER2, and RESUME events
+;
+HANDLE_STATE0:
+ bset 1,APP_FLAGS ; Indicate that we can be suspended
+ lda BTNSTATE ; Get the event
+ cmp #EVT_DNNEXT
+ beq DO_NEXT0
+ cmp #EVT_DNPREV
+ beq DO_PREV0
+ cmp #EVT_TIMER2
+ beq DO_SCAN
+ cmp #EVT_ENTER ; Is this our initial entry?
+ bne REFRESH0
+;
+; This is the initial event for starting us up
+;
+DO_ENTER
+;
+; (6) This code gets the current date from the system
+
+ jsr ACQUIRE ; Lock so that it doesn't change under us
+ ldx #TZ1_MONTH ; Assume that we are using the first timezone
+ jsr CHECK_TZ ; See which one we are really using
+ bcc COPY_TZ1 ; If we were right, just skip on to do the work
+ ldx #TZ2_MONTH ; Wrong guess, just load up the second time zone
+COPY_TZ1
+ lda 0,x ; Copy out the month
+ sta SCAN_MONTH
+ lda 1,x ; Day
+ sta SCAN_DAY
+ lda 2,x ; and year
+ sta SCAN_YEAR
+ jsr RELEASE ; Unlock so the rest of the system is happy
+
+ bclr B_CLEAR,FLAGBYTE ; Indicate that we need to clear the display
+ clr DIGSEL ; Start us off on the week advance
+ jsr CLEARSYM ; Clear the display
+ lda #S6_DAY-START
+ jsr PUT6TOP
+ lda #S6_FIND-START
+ jsr PUT6MID
+ lda #S8_TOEBES-START
+ jmp BANNER8
+
+DO_SCAN
+ brclr B_SCANUP,FLAGBYTE,DO_PREV0 ; Were we scanning up or down?
+DO_NEXT0
+ bset B_SCANUP,FLAGBYTE ; We are now scanning up
+ jsr INCREMENT_SCAN_DATE ; Advance to the next date
+ bra SHOW_DATE ; Comment this out and use the next one if you want
+ ; jmp APPT_SHOW_SCAN ; to put the text 'SCAN' on the bottom when we are in scan mode
+
+DO_PREV0
+ bclr B_SCANUP,FLAGBYTE ; We are now scanning down
+ jsr DECREMENT_SCAN_DATE ; Back up to the previous date
+ bra SHOW_DATE ; Show the date on the screen.
+ ; jmp APPT_SHOW_SCAN ; Use this if you want 'SCAN' on the bottom of the display
+;
+; We come here for a RESUME or TIMER2 event. For this we want to reset the display
+;
+REFRESH0
+ brset B_CLEAR,FLAGBYTE,NOCLEAR0 ; Do we need to clear the display first?
+ bset B_CLEAR,FLAGBYTE ; Mark that the display has been cleared
+ jsr CLEARALL ; and do the work of clearing
+NOCLEAR0
+ lda #S8_DAYFIND-START ; Put up the name of the app on the display
+ jsr BANNER8
+SHOW_DATE
+ jsr APPT_SHOW_DATE ; Show the date on the screen
+ ldx SCAN_YEAR ; as well as the year
+ jmp PUTYEARMID
+;--------------------------------------------------------------------------------
+; (7) State Table 1 Handler
+; This is called to process the state events.
+; We see SET, RESUME, USER3, TIMER2, DNANY4, and UPANY4 events
+; We use the USER3 to trigger a delay which fires off a TIMER2 sequence of events.
+; This allows us to have the PREV/NEXT buttons repeat for advancing the WEEK and YEAR
+; since we can't use the UPDATE routines for them.
+;
+HANDLE_STATE1:
+ bset 1,APP_FLAGS ; Indicate that we can be suspended
+ lda BTNSTATE ; Get the event
+ cmp #EVT_TIMER2 ; Was it a timer for a repeat operation?
+ beq DO_UPD ; Yes, go handle it
+ cmp #EVT_USER3 ; Was it the USER3 event fired from the PREV/NEXT buttons?
+ bne TRY_UP ; No, try again
+ rts ; Yes, just ignore it, it will cause a timer to go off later
+TRY_UP
+ bclr B_SCANNING,FLAGBYTE ; We can't be scanning any more, so turn it off
+ cmp #EVT_UPANY4 ; Was it any button being released?
+ bne TRY_DN ; No, try again
+ jmp REFRESH ; Yes, go refresh the screen (note that the branch is out of range)
+TRY_DN
+ cmp #EVT_DNANY4 ; Is this our initial entry?
+ beq GET_DN ; No, try again
+ jmp FORCEFRESH ; Yes, go setup the screen (note that the branch is out of range)
+GET_DN
+ lda BTN_PRESSED ; Let's see what the button they pressed was
+ cmp #EVT_PREV ; How about the PREV button
+ beq DO_PREV ; handle it
+ cmp #EVT_NEXT ; Maybe the NEXT button?
+ beq DO_NEXT ; Deal with it!
+ cmp #EVT_MODE ; Perhaps the MODE button
+ beq DO_MODE ; If so, handle it
+ ; It must be the set button, so take us out of this state
+ lda #EVT_USER2
+ jmp POSTEVENT
+;
+; (8) Our real working code...
+; We come here when they press the next/prev buttons. if we are in a timer repeat
+; situation (triggered when they press prev/next for the WEEK/YEAR) then we skip right
+; to processing based on the button that was previously pressed
+;
+DO_NEXT
+ bset 0,SYSFLAGS ; Mark our update direction as up
+ bra DO_UPD
+DO_PREV
+ bclr 0,SYSFLAGS ; Mark our update direction as down
+DO_UPD
+ lda DIGSEL ; Which digit mode are we in?
+ beq DO_UPD_DOW ; 0 - Handle the WEEK
+ cmp #2
+ blo DO_UPD_MONTH ; <2 = 1 - Handle the MONTH
+ beq DO_UPD_DAY ; 2 - Handle the Day
+DO_UPD_YEAR ; >2 = 3 - Handle the YEAR
+ brclr 0,SYSFLAGS,LASTYEAR ; Were we in the down direction?
+ ldx #99 ; Going up, let the WRAPX routine handle it for us
+ lda SCAN_YEAR
+ jsr INCA_WRAPX
+ bra SAVEYEAR
+LASTYEAR
+ lda SCAN_YEAR ; Going down, get the year
+ deca ; Decrement it
+ bpl SAVEYEAR ; and see if we hit the lower end
+ lda #99 ; Yes, 2000 wraps down to 1999
+SAVEYEAR
+ sta SCAN_YEAR ; Save away the new year
+ bra SETUP_LAG ; And fire off an event to allow for repeating
+
+DO_UPD_DOW ; 0 - Day of week
+ lda #7 ; We want to iterate 7 times advancing by one day.
+ sta COUNTER ; (this makes it much easier to handle all the fringe cases)
+WEEKLOOP
+ brclr 0,SYSFLAGS,LASTWEEK ; Are we going backwards?
+ jsr INCREMENT_SCAN_DATE ; Going forwards, advance by one day
+ bra WEEKLOOPCHK ; And continue the loop
+LASTWEEK
+ jsr DECREMENT_SCAN_DATE ; Going backwards, retreat by one day
+WEEKLOOPCHK
+ dec COUNTER ; Count down
+ tst COUNTER ; See if we hit the limit
+ bne WEEKLOOP ; and go back for more
+; (9) Fake repeater
+; This code is used for the Day of week and year modes where we want to have a
+; repeating button, but the system routines won't handle it for us
+; It works by posting a USER3 event which has a timer of about 1/2 second.
+; After that timer expires, we get a timer2 event which then repeats every tic.
+; The only thing that we have to worry about here is to not go through this
+; every time so that it takes 1/2 second for every repeat.
+SETUP_LAG
+ brset B_SCANNING,FLAGBYTE,INLAG ; If we were already scanning, skip out
+ bset B_SCANNING,FLAGBYTE ; Indicate that we are scanning
+ lda #EVT_USER3 ; and post the event to start it off
+ jsr POSTEVENT
+INLAG
+ jmp SHOW_DATE ; Put the date up on the display
+; (10) Update routine usage
+DO_UPD_MONTH ; 1 - Handle the month
+ lda #MONTH_JAN ; The bottom end is January
+ sta UPDATE_MIN
+ lda #MONTH_DEC ; and the top end is December (INCLUSIVE)
+ sta UPDATE_MAX
+ lda #UPD_HMONTH ; We want the HALF-MONTH udpate function
+ ldx #SCAN_MONTH ; To update the SCAN_MONTH variable
+ bra SEL_UPD ; Go do it
+DO_UPD_DAY ; 2 - Handle the day
+ lda #1 ; 1 is the first day of the month
+ sta UPDATE_MIN
+ jsr GET_SCAN_MONTHLEN ; Figure out how long the month is
+ sta UPDATE_MAX ; and make that the limit
+ lda #UPD_HDAY ; We want the HALF-DAY update function
+ ldx #SCAN_DAY ; to update the SCAN_DAY variable
+SEL_UPD
+ jsr START_UPDATEP ; And prepare the update routine
+ bset 4,BTNFLAGS ; Mark that the update is now pending
+ rts
+; (11) Making the mode button work
+; when they press the mode button, we want to cycle through the various choices
+; on the display.
+DO_MODE
+ lda DIGSEL ; Figure out where we are in the cycle
+ inca ; advance to the next one
+ and #3 ; and wrap at 4 to zero
+ sta DIGSEL
+REFRESH
+ brset B_CLEAR,FLAGBYTE,NOCLEAR ; Do we need to clear the display first?
+FORCEFRESH
+ jsr CLEARALL ; Yes, clear everything before we start
+ bset B_CLEAR,FLAGBYTE ; And remember that we have already done that
+NOCLEAR
+ clr BTNFLAGS ; Turn off any scrolling banners
+ lda #ROW_TD23 ; Turn off the dash from the week blink
+ sta DISP_ROW
+ bclr COL_TD23,DISP_COL
+ jsr SHOW_DATE ; Display the date
+; (12) Establishing a blink routine
+; This makes the appropriate section of the display blink based on what we are changing
+ lda DIGSEL ; Get the digit we are on
+ beq DO_BLINK_DOW ; 0 -> Update Day of week
+ cmp #2
+ blo DO_BLINK_MONTH ; <2 = 1 -> Update month
+ beq DO_BLINK_DAY ; 2 - Update day of month
+
+DO_BLINK_YEAR ; 3: Year
+; (13) Calling BLINK_SECOND
+; For BLINK_SECONDS, the UPDATE_PARM points to the 2 character format for the year.
+ ldx SCAN_YEAR ; Get our year
+ jsr GETBCDHI ; And extract out the high digit of it
+ sta YEAR_DIG1 ; Save that away
+ ldx SCAN_YEAR ; Do it again
+ jsr GETBCDLOW ; to get the low digit
+ sta YEAR_DIG2 ; and save that away
+ ldx #YEAR_DIG1 ; the parm points to the first digit
+ lda #BLINK_SECONDS ; and we want a BLINK_SECONDS function
+ bra SETUP_BLINK ; so do it already
+
+DO_BLINK_DOW ; 0: Day of week:
+; (14) Calling BLINK_SEGMENT
+; Unfortunately, there is no blink routine to blink the upper two letters on the display.
+; To get around this, I have chosen to blink a single segment on the display (the dash
+; after the day of the week). This routine was designed to blink the AM/PM or other
+; symbols, but it works quite fine for our purposed. You need to set UPDATE_POS to have
+; the row to be updated and UPDATE_VAL holds the mask for the COLUMS to be XORed.
+; In this way, you might have more than one segment blinking, but there are few segments
+; on the same row which would achieve a reasonable effect.
+; UPDATE_POS ROW_TD23
+; UPDATE_VAL (1<<COL_TD23)
+ lda #ROW_TD23
+; We want to blink the DASH after the day of week sta UPDATE_POS
+; Store the ROW for it in UPDATE_POS lda #(1<<COL_TD23)
+; Get the mask for the column sta UPDATE_VAL
+; And store that in UPDATE_VAL lda #BLINK_SEGMENT
+; We want a BLINK_SEGMENT function bra SETUP_BLINK
+; and get to it.
+DO_BLINK_MONTH ; 1: Month
+; (15) Calling BLINK_HMONTH, BLINK_HDAY
+; These are the normal boring cases of calling the blink routine. They simply need the
+; address of the byte holding the value to blink and the function to blink them with.
+; UPDATE_PARM - Points to the month
+ lda #BLINK_HMONTH ; We want a BLINK HALF-MONTH function
+ ldx #SCAN_MONTH ; to blink our month
+ bra SETUP_BLINK ; and do it
+
+DO_BLINK_DAY ; 2: Day
+; UPDATE_PARM - Points to the day
+ lda #BLINK_HDAY ; We want a BLINK HALF-DAY function
+ ldx #SCAN_DAY ; to blink our day
+
+SETUP_BLINK
+ jsr START_BLINKP ; Request the blink function
+ lda digsel ; Figure out which one we are blinking
+ lsla ; *2
+ lsla ; *4
+ lsla ; *8
+ add #S8_WEEK-START ; And use that to index the banner to put on the bottom
+ jsr BANNER8
+ bset 2,BTNFLAGS ; Mark a blink routine as pending
+ rts
+;
+; (16) This is the main initialization routine which is called when we first get the app into memory
+;
+MAIN:
+ lda #$c0 ; We want button beeps and to indicate that we have been loaded
+ sta WRISTAPP_FLAGS
+ clr FLAGBYTE ; start with a clean slate
+ rts
diff --git a/from_toebes/endoff/endoff.asm b/from_toebes/endoff/endoff.asm
new file mode 120000
index 0000000..89a74ed
--- /dev/null
+++ b/from_toebes/endoff/endoff.asm
@@ -0,0 +1 @@
+endoff.zsm \ No newline at end of file
diff --git a/from_toebes/endoff/endoff.known_good b/from_toebes/endoff/endoff.known_good
new file mode 120000
index 0000000..534c7c5
--- /dev/null
+++ b/from_toebes/endoff/endoff.known_good
@@ -0,0 +1 @@
+endoff.zap.app \ No newline at end of file
diff --git a/from_toebes/endoff/endoff.zap b/from_toebes/endoff/endoff.zap
new file mode 100644
index 0000000..31409f0
--- /dev/null
+++ b/from_toebes/endoff/endoff.zap
@@ -0,0 +1,25 @@
+TDL0724962¬ Applet file header
+Week End Off¬ Applet friendly name
+ENDOFF1¬ Applet version #
+This application turns off all alarms on the weekend.
+
+TIP: Download your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!¬
+WATCHAPP.HLP¬ Applet help filename
+106¬
+none¬ Applet's parent's app name (if it exists - 'none' if it doesn't)
+Timex Data Link 150 Watch¬
+CC0169819D9DCC016FCC0182CC016FD6013B81CC0146001D1A0E0E111D0E150D000F0F13321D180E0B0E1C001B84001AFF0001FFFF1D128FCD577AA617CD587EA61DCD58A8A61CB71D131EA620B71D121ECD016FA623CC58451E96A6C8B796CD68E8B6B8CD690E2402B6C1CD68F2A1052413AE04E669444444A401EA69A407E7695A2AF081AE04E669A401484848EA69A40EE7695A2AF081¬
+42704¬
+0¬ No data
+Week End Off¬ Applet friendly name
+ENDOFF2¬ Applet version #
+This application turns off all alarms on the weekend.
+
+TIP: Download your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!¬
+WATCHAPP.HLP¬ Applet help filename
+106¬
+none¬ Applet's parent's app name (if it exists - 'none' if it doesn't)
+Timex Data Link 150s Watch¬
+CC0169819D9DCC016FCC0182CC016FD6013B81CC0146001D1A0E0E111D0E150D000F0F13321D180E0B0E1C001B84001AFF0001FFFF1D128FCD5AA0A617CD577FA61DCD57A9A61AB71D131EA61EB71D121ECD016FA623CC57461E96A6C8B796CD68F1B6B8CD69172402B6C1CD68FBA1052413AE04E669444444A401EA69A407E7695A2AF081AE04E669A401484848EA69A40EE7695A2AF081¬
+9447¬
+0¬ No data \ No newline at end of file
diff --git a/from_toebes/endoff/endoff.zsm b/from_toebes/endoff/endoff.zsm
new file mode 100644
index 0000000..8caba23
--- /dev/null
+++ b/from_toebes/endoff/endoff.zsm
@@ -0,0 +1,145 @@
+;Name: Week End Off
+;Version: ENDOFF
+;Description: Week End Off - by John A. Toebes, VIII
+;This application turns off all alarms on the weekend.
+;
+;TIP: Download your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!
+;HelpFile: watchapp.hlp
+;HelpTopic: 106
+ INCLUDE "WRISTAPP.I"
+;
+; (1) Program specific constants
+;
+START EQU *
+;
+; (2) System entry point vectors
+;
+L0110: jmp MAIN ; The main entry point - WRIST_MAIN
+L0113: rts ; Called when we are suspended for any reason - WRIST_SUSPEND
+ nop
+ nop
+L0116: jmp CHECKSTATE ; Called to handle any timers or time events - WRIST_DOTIC
+L0119: jmp ENABLE_ALL ; Called when the COMM app starts and we have timers pending - WRIST_INCOMM
+L011c: jmp CHECKSTATE ; Called when the COMM app loads new data - WRIST_NEWDATA
+
+L011f: lda STATETAB,X ; The state table get routine - WRIST_GETSTATE
+ rts
+
+L0123: jmp HANDLE_STATE0
+ db STATETAB-STATETAB
+;
+; (3) Program strings
+;
+S6_WEEK: timex6 " WEEH "
+S6_ENDOFF: timex6 "ENDOFF"
+S8_TOEBES: timex "J.TOEBES"
+;
+; (4) State Table
+;
+STATETAB:
+ db 0
+ db EVT_ENTER,TIM_LONG,0 ; Initial state
+ db EVT_RESUME,TIM_ONCE,0 ; Resume from a nested app
+ db EVT_MODE,TIM_ONCE,$FF ; Mode button
+ db EVT_END
+;
+; (5) State Table 0 Handler
+; This is called to process the state events.
+; We see ENTER and RESUME events
+;
+HANDLE_STATE0:
+ bset 1,APP_FLAGS ; Allow us to be suspended
+ jsr CLEARALL ; Clear the display
+ lda #S6_WEEK-START ; Put ' WEEK ' on the top line
+ jsr PUT6TOP
+ lda #S6_ENDOFF-START ; Put 'ENDOFF' on the second line
+ jsr PUT6MID
+;
+; (6) Faking a letter K
+;
+;
+; We have We want it to look like:
+; | | |
+; | | | |
+; | | | |
+; |=====| |=====
+; | | | |
+; | | | |
+; | | | |
+; This means turning off T5B and turning on T5H
+ lda #ROW_T5B
+ sta DISP_ROW
+ bclr COL_T5B,DISP_COL
+ lda #ROW_T5H
+ sta DISP_ROW
+ bset COL_T5H,DISP_COL
+ jsr CHECKSTATE ; Just for fun, check the alarm state
+ lda #S8_TOEBES-START
+ jmp BANNER8
+;
+; (7) This is the main initialization routine which is called when we first get the app into memory
+;
+MAIN:
+ bset 7,WRISTAPP_FLAGS ; Tell them that we are a live application
+ lda #$C8 ; Bit3 = wristapp wants a call once a day when it changes (WRIST_DOTIC) (SET=CALL)
+ ; Bit6 = Uses system rules for button beep decisions (SET=SYSTEM RULES)
+ ; Bit7 = Wristapp has been loaded (SET=LOADED)
+ sta WRISTAPP_FLAGS
+ ; Fall into CHECKSTATE
+;
+; (8) Determining the day of the week
+;
+CHECKSTATE
+ jsr ACQUIRE ; Lock so that it doesn't change under us
+ lda TZ1_DOW ; Assume that we are using the first timezone
+ jsr CHECK_TZ ; See which one we are really using
+ bcc GOT_TZ1 ; If we were right, just skip on to do the work
+ lda TZ2_DOW ; Wrong guess, just load up the second time zone
+GOT_TZ1
+ jsr RELEASE ; Unlock so the rest of the system is happy
+ cmp #5 ; Time zone day of week is 0=Monday...6=Sunday
+ bhs DISABLE_ALL ; Saturday, Sunday - disable them all
+ ; Fall into ENABLE_ALL
+;---------------------------------------------------------------
+; Routine:
+; (9) ENABLE_ALL/DISABLE_ALL
+; Parameters:
+; NONE
+; Purpose:
+; These routines enable/disable all of the alarms. It hides the disabled status of
+; the alarm by storing it in bit 3 of the alarm flags.
+; Bit0 = Alarm is enabled (SET=ENABLED)
+; Bit1 = Alarm is masked (SET=MASKED)
+; Bit2 = Current alarm is in 12 hour mode and is in the afternoon (SET=AFTERNOON)
+; Bit3 = Alarm was enabled, but we are hiding it (SET=HIDDEN)
+; It is safe to call these routine multiple times.
+;---------------------------------------------------------------
+ENABLE_ALL
+ ldx #4 ; We have 5 alarms to go through
+ENABLE_NEXT
+ lda ALARM_STATUS,X ; Get the flags for this alarm
+ lsra ; Shift right 3 to get our hidden bit into place
+ lsra
+ lsra
+ and #1 ; Mask out everything except the hidden bit (now in the enabled position
+ ora ALARM_STATUS,X ; Or it back into the flags
+ and #7 ; and clear out our hidden bit
+ sta ALARM_STATUS,X ; then save it out again.
+ decx ; Count down the number of alarms
+ bpl ENABLE_NEXT ; And go back for the next one
+ rts
+
+DISABLE_ALL
+ ldx #4 ; We have 5 alarms to go through
+DISABLE_NEXT
+ lda ALARM_STATUS,X ; Get the flags for this alarm
+ and #1 ; And extract our enabled bit
+ lsla ; Shift left 3 to save as our hidden bit
+ lsla
+ lsla
+ ora ALARM_STATUS,X ; Or it back into the flags
+ and #$0e ; and clear out the enabled bit
+ sta ALARM_STATUS,X ; then save it out again.
+ decx ; Count down the number of alarms
+ bpl DISABLE_NEXT ; And go back for the next one
+ rts
diff --git a/from_toebes/flash/flash.asm b/from_toebes/flash/flash.asm
new file mode 120000
index 0000000..ac2ecb7
--- /dev/null
+++ b/from_toebes/flash/flash.asm
@@ -0,0 +1 @@
+flash.zsm \ No newline at end of file
diff --git a/from_toebes/flash/flash.known_good b/from_toebes/flash/flash.known_good
new file mode 120000
index 0000000..69e7579
--- /dev/null
+++ b/from_toebes/flash/flash.known_good
@@ -0,0 +1 @@
+flash.zap.app \ No newline at end of file
diff --git a/from_toebes/flash/flash.zap b/from_toebes/flash/flash.zap
new file mode 100644
index 0000000..22642f7
--- /dev/null
+++ b/from_toebes/flash/flash.zap
@@ -0,0 +1,25 @@
+TDL0724962¬ Applet file header
+Update/Flash Sample¬ Applet friendly name
+blink1¬ Applet version #
+This is a simple number blink/update program
+
+TIP: Download your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!¬
+WATCHAPP.HLP¬ Applet help filename
+106¬
+none¬ Applet's parent's app name (if it exists - 'none' if it doesn't)
+Timex Data Link 150 Watch¬
+CC01AB819D9D819D9D819D9D819D9DD6013381CC0147000F130A05111D050A1416130E001B83001FFF001AFF0001FFFF86FF00A6FF001D128FB691A186260FC604C3A1032724A100271CA1022737A11B26381361CD579FA617CD587EA61DCD58A8A648CC584C109F2002119F4FC704F4A663C704F5AE62A607CD57C718901361A650CC584C3F62026105CD577A12611F90AE62A609CD55BF149081A6C0B7963F613F6281¬
+52411¬
+0¬ No data
+Update/Flash Sample¬ Applet friendly name
+blink2¬ Applet version #
+This is a simple number blink/update program
+
+TIP: Download your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!¬
+WATCHAPP.HLP¬ Applet help filename
+106¬
+none¬ Applet's parent's app name (if it exists - 'none' if it doesn't)
+Timex Data Link 150s Watch¬
+CC01AB819D9D819D9D819D9D819D9DD6013381CC0147000F130A05111D050A1416130E001B83001FFF001AFF0001FFFF86FF00A6FF001D128FB691A186260FC604C3A1032724A100271CA1022737A11B26381361CD5ACBA617CD577FA61DCD57A9A648CC574D109F2002119F4FC704F4A663C704F5AE62A607CD56C818901361A650CC574D3F62026105CD5AA012611F90AE62A609CD55AE149081A6C0B7963F613F6281¬
+36065¬
+0¬ No data \ No newline at end of file
diff --git a/from_toebes/flash/flash.zsm b/from_toebes/flash/flash.zsm
new file mode 100644
index 0000000..33208b7
--- /dev/null
+++ b/from_toebes/flash/flash.zsm
@@ -0,0 +1,135 @@
+;Name: Flash
+;Version: FLASH
+;Description: by John A. Toebes, VIII
+;This is a simple number update/flash program
+;
+;TIP: Download your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!
+;HelpFile: watchapp.hlp
+;HelpTopic: 106
+ INCLUDE "WRISTAPP.I"
+;
+; (1) Program specific constants
+;
+FLAGBYTE EQU $61
+; Bit 1 indicates that we need to clear the display first
+;
+CURVAL EQU $62 ; The current value we are displaying
+;
+; (2) System entry point vectors
+;
+START EQU *
+L0110: jmp MAIN ; The main entry point - WRIST_MAIN
+L0113: rts ; Called when we are suspended for any reason - WRIST_SUSPEND
+ nop
+ nop
+L0116: rts ; Called to handle any timers or time events - WRIST_DOTIC
+ nop
+ nop
+L0119: rts ; Called when the COMM app starts and we have timers pending - WRIST_INCOMM
+ nop
+ nop
+L011c: rts ; Called when the COMM app loads new data - WRIST_NEWDATA
+ nop
+ nop
+
+L011f: lda STATETAB,X ; The state table get routine - WRIST_GETSTATE
+ rts
+
+L0123: jmp HANDLE_STATE0
+ db STATETAB-STATETAB
+;
+; (3) Program strings
+S6_FLASH: timex6 "FLASH "
+S6_SAMPLE: timex6 "SAMPLE"
+;
+; (4) State Table
+;
+STATETAB:
+ db 0
+ db EVT_ENTER,TIM_2_8TIC,0 ; Initial state
+ db EVT_TIMER2,TIM_ONCE,0 ; The timer from the enter event
+ db EVT_RESUME,TIM_ONCE,0 ; Resume from a nested app
+ db EVT_MODE,TIM_ONCE,$FF ; Mode button
+ db EVT_DNANY4,TIM_ONCE,0 ; NEXT, PREV, SET, MODE button pressed
+ db EVT_UPANY4,TIM_ONCE,0 ; NEXT, PREV, SET, MODE button released
+ db EVT_END
+;
+; (5) State Table 0 Handler
+; This is called to process the state events.
+; We see ENTER, TIMER2, RESUME, DNANY4 and UPANY4 events
+;
+HANDLE_STATE0:
+ bset 1,APP_FLAGS ; Indicate that we can be suspended
+ lda BTNSTATE ; Get the event
+ cmp #EVT_DNANY4 ; Did they press a button?
+ bne CHKENTER ; No, pass on to see what else there might be
+ lda BTN_PRESSED ; Let's see what the button they pressed was
+ cmp #EVT_PREV ; How about the PREV button
+ beq DO_PREV ; handle it
+ cmp #EVT_NEXT ; Maybe the NEXT button?
+ beq DO_NEXT ; Deal with it!
+ cmp #EVT_SET ; Perhaps the SET button
+ beq DO_SET ; If so, handle it
+ ; In reality, we can't reach here since we handled all three buttons
+ ; in the above code (the MODE button is handled before we get here and the
+ ; GLOW button doesn't send in an event for this). We can just fall through
+ ; and take whatever we get from it.
+CHKENTER
+ cmp #EVT_ENTER ; Is this our initial entry?
+ bne REFRESH
+;
+; This is the initial event for starting us
+;
+DO_ENTER
+ bclr 1,FLAGBYTE ; Indicate that we need to clear the display
+ jsr CLEARSYM ; Clear the display
+ lda #S6_FLASH-START
+ jsr PUT6TOP
+ lda #S6_SAMPLE-START
+ jsr PUT6MID
+ lda #SYS8_MODE
+ jmp PUTMSGBOT
+;
+; (6) Our real working code...
+
+DO_NEXT
+ bset 0,SYSFLAGS ; Mark our update direction as up
+ bra DO_UPD
+DO_PREV
+ bclr 0,SYSFLAGS ; Mark our update direction as down
+DO_UPD
+ clra
+ sta UPDATE_MIN ; Our low end is 0
+ lda #99
+ sta UPDATE_MAX ; and the high end is 99 (the max since this is a 2 digit value)
+ ldx #CURVAL ; Point to our value to be updated
+ lda #UPD_MID34 ; Request updating in the middle of the display
+ jsr START_UPDATEP ; And prepare the update routine
+ bset 4,BTNFLAGS ; Mark that the update is now pending
+ bclr 1,FLAGBYTE
+ lda #SYS8_SET_MODE
+ jmp PUTMSGBOT
+
+DO_SET
+ clr CURVAL ; When they hit the set button, we just clear to zero
+SHOWVAL
+ brset 1,FLAGBYTE,NOCLEAR ; Do we need to clear the display first?
+REFRESH
+ jsr CLEARALL ; Yes, clear everything before we start
+ bset 1,FLAGBYTE ; And remember that we have already done that
+NOCLEAR
+ bclr 7,BTNFLAGS ; Turn off any update routine that might be pending
+ ldx #CURVAL
+ lda #BLINK_MID34
+ jsr START_BLINKP
+ bset 2,BTNFLAGS ; Mark a blink routine as pending
+ rts
+;
+; (7) This is the main initialization routine which is called when we first get the app into memory
+;
+MAIN:
+ lda #$c0 ; We want button beeps and to indicate that we have been loaded
+ sta WRISTAPP_FLAGS
+ clr FLAGBYTE ; start with a clean slate
+ clr CURVAL
+ rts
diff --git a/from_toebes/hello/hello.asm b/from_toebes/hello/hello.asm
new file mode 120000
index 0000000..759fddf
--- /dev/null
+++ b/from_toebes/hello/hello.asm
@@ -0,0 +1 @@
+hello.zsm \ No newline at end of file
diff --git a/from_toebes/hello/hello.known_good b/from_toebes/hello/hello.known_good
new file mode 120000
index 0000000..c74403e
--- /dev/null
+++ b/from_toebes/hello/hello.known_good
@@ -0,0 +1 @@
+hello.zap.app \ No newline at end of file
diff --git a/from_toebes/hello/hello.zap b/from_toebes/hello/hello.zap
new file mode 100644
index 0000000..f1fbea3
--- /dev/null
+++ b/from_toebes/hello/hello.zap
@@ -0,0 +1,25 @@
+TDL0724962¬ Applet file header
+Hello World¬ Applet friendly name
+HELLO1¬ Applet version #
+This Hex dump routine is a simple thing to test out dumping hex bytes...
+
+TIP: Download your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!¬
+WATCHAPP.HLP¬ Applet help filename
+106¬
+none¬ Applet's parent's app name (if it exists - 'none' if it doesn't)
+Timex Data Link 150 Watch¬
+CC016A819D9D819D9D819D9D819D9DD6013381CC014100110E1313001D1A0017130D1D001BFF001AFF0080FF0001FFFF1D128FB691A180271A1161016103CC5776CD577AA617CD587EA61DCD58A8A648CC584C0061E3106120E1A6C0B7963F6181¬
+28942¬
+0¬ No data
+Hello World¬ Applet friendly name
+HELLO2¬ Applet version #
+This Hex dump routine is a simple thing to test out dumping hex bytes...
+
+TIP: Download your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!¬
+WATCHAPP.HLP¬ Applet help filename
+106¬
+none¬ Applet's parent's app name (if it exists - 'none' if it doesn't)
+Timex Data Link 150s Watch¬
+CC016A819D9D819D9D819D9D819D9DD6013381CC014100110E1313001D1A0017130D1D001BFF001AFF0080FF0001FFFF1D128FB691A180271A1161016103CC5A9CCD5AA0A617CD577FA61DCD57A9A648CC574D0061E3106120E1A6C0B7963F6181¬
+16378¬
+0¬ No data \ No newline at end of file
diff --git a/hello/hello.asm b/from_toebes/hello/hello.zsm
index 50042bd..93d4d40 100644
--- a/hello/hello.asm
+++ b/from_toebes/hello/hello.zsm
@@ -6,8 +6,7 @@
;TIP: Download your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!
;HelpFile: watchapp.hlp
;HelpTopic: 106
- INCLUDE "wristapp.i"
-
+ INCLUDE "WRISTAPP.I"
;
; (1) Program specific constants
;
diff --git a/from_toebes/hexdump/hexdump.asm b/from_toebes/hexdump/hexdump.asm
new file mode 120000
index 0000000..a0e08a7
--- /dev/null
+++ b/from_toebes/hexdump/hexdump.asm
@@ -0,0 +1 @@
+hexdump.zsm \ No newline at end of file
diff --git a/from_toebes/hexdump/hexdump.known_good b/from_toebes/hexdump/hexdump.known_good
new file mode 120000
index 0000000..7d565b2
--- /dev/null
+++ b/from_toebes/hexdump/hexdump.known_good
@@ -0,0 +1 @@
+hexdump.zap.app \ No newline at end of file
diff --git a/from_toebes/hexdump/hexdump.zap b/from_toebes/hexdump/hexdump.zap
new file mode 100644
index 0000000..f445e28
--- /dev/null
+++ b/from_toebes/hexdump/hexdump.zap
@@ -0,0 +1,33 @@
+TDL0706972¬
+Hex Dump¬
+HEXDUMP¬
+Hex Dumper - by John A. Toebes, VIII
+This Hex dump routine is a simple thing to test out dumping hex bytes...
+
+ Press the NEXT/PREV buttons to advance/backup by 6 bytes of memory at a time
+ Press the SET button to change the location in memory where you are dumping.
+
+TIP: Download your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!¬
+watchapp.hlp¬
+106¬
+none¬
+Timex Data Link 150 Watch¬
+CC029E819D9D819D9D819D9D819D9DD6014381CC017300CC01A01ACC0223221D0B1B180E1D0D1914160E170A0A0A0A24242424001B84001AFF001FFF0080830183830101FFFF02FF0237FFFF1D00A5FF001F80011D021AFF0286FF02A6FF0239FF001D128FB691A11B2658CD577AA61FCD587EA625CD58A8A648CC584CD7013BA40FD7013CD6013B44444444D7013B81B691A11F27081161A18326021061016112C60213A006C70213C60212A200C702122010A606CB0213C70213C60212A900C70212CD579F5FAD38CD58E0AE01AD31CD58F0AE02AD2ACD5900AE03AD23CD5910AE04AD1CCD5920AE05AD15CD5930C602125FAD88C60213AE02AD81A62BCC5845D64000B7A344444444B7A2B6A3A40FB7A381128FB691A1A6273AA186264CC604C3A1032713A100270BA1012720AD93A639CC4E89109F2002119F4FC704F4A60FC704F5AD3FA608CD57C7189081B6624CA403B762B66348484848BB64C70212B66548484848BB66C702131F90CD01D3AE045AD6013BE7635D26F7AD08A60BCD55BF149081B662C704F3AB639781A6C0B7963F6281¬
+27941¬
+0¬
+Hex Dump¬
+HEXDUMP¬
+Hex Dumper - by John A. Toebes, VIII
+This Hex dump routine is a simple thing to test out dumping hex bytes...
+
+ Press the NEXT/PREV buttons to advance/backup by 6 bytes of memory at a time
+ Press the SET button to change the location in memory where you are dumping.
+
+TIP: Download your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!¬
+watchapp.hlp¬
+106¬
+none¬
+Timex Data Link 150s Watch¬
+CC029E819D9D819D9D819D9D819D9DD6014381CC017300CC01A01ACC0223221D0B1B180E1D0D1914160E170A0A0A0A24242424001B84001AFF001FFF0080830183830101FFFF02FF0237FFFF1D00A5FF001F80011D021AFF0286FF02A6FF0239FF001D128FB691A11B2658CD5AA0A61FCD577FA625CD57A9A648CC574DD7013BA40FD7013CD6013B44444444D7013B81B691A11F27081161A18326021061016112C60213A006C70213C60212A200C702122010A606CB0213C70213C60212A900C70212CD5ACB5FAD38CD57E1AE01AD31CD57F1AE02AD2ACD5801AE03AD23CD5811AE04AD1CCD5821AE05AD15CD5831C602125FAD88C60213AE02AD81A62BCC5746D64000B7A344444444B7A2B6A3A40FB7A381128FB691A1A6273AA186264CC604C3A1032713A100270BA1012720AD93A639CC4E78109F2002119F4FC704F4A60FC704F5AD3FA608CD56C8189081B6624CA403B762B66348484848BB64C70212B66548484848BB66C702131F90CD01D3AE045AD6013BE7635D26F7AD08A60BCD55AE149081B662C704F3AB639781A6C0B7963F6281¬
+35880¬
+0¬ \ No newline at end of file
diff --git a/from_toebes/hexdump/hexdump.zsm b/from_toebes/hexdump/hexdump.zsm
new file mode 100644
index 0000000..cf243d3
--- /dev/null
+++ b/from_toebes/hexdump/hexdump.zsm
@@ -0,0 +1,322 @@
+;Name: Hex Dump
+;Version: HEXDUMP
+;Description: Hex Dumper - by John A. Toebes, VIII
+;This Hex dump routine is a simple thing to test out dumping hex bytes...
+;
+; Press the NEXT/PREV buttons to advance/backup by 6 bytes of memory at a time
+; Press the SET button to change the location in memory where you are dumping.
+;
+;TIP: Download your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!
+;HelpFile: watchapp.hlp
+;HelpTopic: 106
+ INCLUDE "WRISTAPP.I"
+;
+; (1) Program specific constants
+;
+FLAGBYTE EQU $61
+; Bit 0 indicates the direction of the last button
+; The other bits are not used
+CURRENT_DIGIT EQU $62
+DIGIT0 EQU $63
+DIGIT1 EQU $64
+DIGIT2 EQU $65
+DIGIT3 EQU $66
+;
+;
+; (2) System entry point vectors
+;
+START EQU *
+L0110: jmp MAIN ; The main entry point - WRIST_MAIN
+L0113: rts ; Called when we are suspended for any reason - WRIST_SUSPEND
+ nop
+ nop
+L0116: rts ; Called to handle any timers or time events - WRIST_DOTIC
+ nop
+ nop
+L0119: rts ; Called when the COMM app starts and we have timers pending - WRIST_INCOMM
+ nop
+ nop
+L011c: rts ; Called when the COMM app loads new data - WRIST_NEWDATA
+ nop
+ nop
+
+L011f: lda STATETAB0,X ; The state table get routine - WRIST_GETSTATE
+ rts
+
+L0123: jmp HANDLE_STATE0
+ db STATETAB0-STATETAB0
+L0127: jmp HANDLE_STATE1
+ db STATETAB1-STATETAB0
+L012b: jmp HANDLE_STATE2
+ db STATETAB2-STATETAB0
+;
+; (3) Program strings
+;
+S6_BYTE: timex6 " BYTE "
+S6_DUMPER: timex6 "DUMPER"
+S8_LOCATION timex "aaaa "
+;
+; (4) State Table
+;
+STATETAB0:
+ db 0
+ db EVT_ENTER,TIM2_12TIC,0 ; Initial state
+ db EVT_RESUME,TIM_ONCE,0 ; Resume from a nested app
+ db EVT_TIMER2,TIM_ONCE,0 ; This is the timer
+ db EVT_DNNEXT,TIM2_8TIC,1 ; Next button
+ db EVT_DNPREV,TIM2_8TIC,1 ; Prev button
+ db EVT_MODE,TIM_ONCE,$FF ; Mode button
+ db EVT_SET,TIM_ONCE,2 ; Set button
+ db EVT_USER0,TIM_ONCE,$FF ; Return to system
+ db EVT_END
+
+STATETAB1:
+ db 0
+ db EVT_UPANY,TIM_ONCE,0 ; Releasing the prev or next button
+ db EVT_TIMER2,TIM2_TIC,1 ; Repeat operation with a timer
+ db EVT_END ; End of table
+
+STATETAB2:
+ db 2
+ db EVT_RESUME,TIM_ONCE,2 ; Resume from a nested app
+ db EVT_DNANY4,TIM_ONCE,2 ; NEXT, PREV, SET, MODE button pressed
+ db EVT_UPANY4,TIM_ONCE,2 ; NEXT, PREV, SET, MODE button released
+ db EVT_USER2,TIM_ONCE,0 ; Return to state 0
+ db EVT_END ; End of table
+
+;
+; (5) State Table 0 Handler
+; This is called to process the state events.
+; We see ENTER, TIMER2, and RESUME events
+;
+HANDLE_STATE0:
+ bset 1,APP_FLAGS ; Indicate that we can be suspended
+ lda BTNSTATE ; Get the event
+ cmp #EVT_ENTER ; Is this the initial state?
+ bne SHOWDATA ; no, just clean up the screen
+;
+; (6) Put up the initial banner screen
+;
+ jsr CLEARALL ; Clear the display
+ lda #S6_BYTE-START ; Put ' BYTE ' on the top line
+ jsr PUT6TOP
+ lda #S6_DUMPER-START ; Put 'DUMPER' on the second line
+ jsr PUT6MID
+ lda #SYS8_MODE ; Put MODE on the bottom line
+ jmp PUTMSGBOT
+; (7) FMTHEX is a routine similar to FMTX, but it handles hex values instead
+;=======================================================================
+; Routine: FMTHEX
+; Purpose:
+; Format a byte into the buffer
+; Parameters:
+; A - Byte to be formatted
+; X - Offset into Message buffer to put the byte
+;=======================================================================
+FMTHEX:
+ sta S8_LOCATION,X ; Save the byte
+ and #$0f ; Extract the bottom nibble
+ sta S8_LOCATION+1,X ; Save the hex value of the nibble
+ lda S8_LOCATION,X ; Get the value once again
+ lsra ; Shift right by 4 to get the high order nibble
+ lsra
+ lsra
+ lsra
+
+ sta S8_LOCATION,X ; And put it back into the buffer
+ rts
+;
+; (8) This is called when we press the prev/next button or when the timer fires during that event
+;
+HANDLE_STATE1:
+ lda BTNSTATE
+ cmp #EVT_TIMER2 ; Is this a repeat/timer event?
+ beq REPEATBTN ; yes, do as they asked
+
+ bclr 0,FLAGBYTE ; Assume that they hit the prev button
+ cmp #EVT_DNPREV ; Did they hit the prev button
+ bne REPEATBTN ; Yes, we guessed right
+ bset 0,FLAGBYTE ; No, they hit next. Mark the direction.
+REPEATBTN:
+ brclr 0,FLAGBYTE,NEXTLOC ; If they hit the next button, go do that operation
+;
+; They pressed the prev button, let's go to the previous location
+;
+PREVLOC:
+ lda CURRENT_LOC+1
+ sub #6
+ sta CURRENT_LOC+1
+ lda CURRENT_LOC
+ sbc #0
+ sta CURRENT_LOC
+ bra SHOWDATA
+NEXTLOC:
+ lda #6
+ add CURRENT_LOC+1
+ sta CURRENT_LOC+1
+ lda CURRENT_LOC
+ adc #0
+ sta CURRENT_LOC
+;
+; (9) This is the main screen update routine.
+; It dumps the current memory bytes based on the current address. Note that since it updates the entire
+; display, it doesn't have to clear anything
+;
+SHOWDATA:
+ jsr CLEARSYM
+
+ clrx
+ bsr GETBYTE
+ jsr PUTTOP12
+
+ ldx #1
+ bsr GETBYTE
+ jsr PUTTOP34
+
+ ldx #2
+ bsr GETBYTE
+ jsr PUTTOP56
+
+ ldx #3
+ bsr GETBYTE
+ jsr PUTMID12
+
+ ldx #4
+ bsr GETBYTE
+ jsr PUTMID34
+
+ ldx #5
+ bsr GETBYTE
+ jsr PUTMID56
+
+ lda CURRENT_LOC ; Get the high order byte of the address
+ clrx
+ bsr FMTHEX ; Put that at the start of the buffer
+ lda CURRENT_LOC+1 ; Get the low order byte of the address
+ ldx #2
+ bsr FMTHEX ; Put that next in the buffer
+
+ lda #S8_LOCATION-START
+ jmp BANNER8
+; (10) GETBYTE gets a byte from memory and formats it as a hex value
+;=======================================================================
+; Routine: GETBYTE
+; Purpose:
+; Read a byte from memory and put it into DATDIGIT1/DATDIGIT2 as hex values
+; Parameters:
+; X - Offset from location to read byte
+; CURRENT_LOC - Base location to read from
+;=======================================================================
+GETBYTE
+CURRENT_LOC EQU *+1 ; Self modifying code... Point to what we want to modify
+ lda $4000,X ; Get the current byte
+ sta DATDIGIT2 ; And save it away
+ lsra ; Extract the high nibble
+ lsra
+ lsra
+ lsra
+
+ sta DATDIGIT1 ; And save it
+ lda DATDIGIT2 ; Get the byte again
+ and #$0f ; Extract the low nibble
+ sta DATDIGIT2 ; And save it
+ rts
+;
+; (11) State Table 2 Handler
+; This is called to process the state events.
+; We see SET, RESUME, DNANY4, and UPANY4 events
+;
+HANDLE_STATE2:
+ bset 1,APP_FLAGS ; Indicate that we can be suspended
+ lda BTNSTATE ; Get the event
+ cmp #EVT_UPANY4
+ beq REFRESH2
+ cmp #EVT_DNANY4 ; Is this our initial entry?
+ bne FORCEFRESH
+ lda BTN_PRESSED ; Let's see what the button they pressed was
+ cmp #EVT_PREV ; How about the PREV button
+ beq DO_PREV ; handle it
+ cmp #EVT_NEXT ; Maybe the NEXT button?
+ beq DO_NEXT ; Deal with it!
+ cmp #EVT_MODE ; Perhaps the MODE button
+ beq DO_MODE ; If so, handle it
+ ; It must be the set button, so take us out of this state
+ bsr SHOWDATA
+ lda #EVT_USER2
+ jmp POSTEVENT
+;
+; (12) This handles the update routine to change a digit...
+;
+DO_NEXT
+ bset 0,SYSFLAGS ; Mark our update direction as up
+ bra DO_UPD
+DO_PREV
+ bclr 0,SYSFLAGS ; Mark our update direction as down
+DO_UPD
+ clra
+ sta UPDATE_MIN ; Our low end is 0
+ lda #$F
+ sta UPDATE_MAX ; and the high end is 15 (the hes digits 0-F)
+ bsr GET_DISP_PARM
+ lda #UPD_DIGIT
+ jsr START_UPDATEP ; And prepare the update routine
+ bset 4,BTNFLAGS ; Mark that the update is now pending
+ rts
+;
+; (13) This is where we switch which digit we are changing...
+;
+DO_MODE
+ lda CURRENT_DIGIT
+ inca
+ and #3
+ sta CURRENT_DIGIT
+;
+; (14) Refresh the screen and start blinking the current digit...
+;
+REFRESH2
+ lda DIGIT0 ; Get the first digit
+ lsla ; *16
+ lsla
+ lsla
+ lsla
+ add DIGIT1 ; Plus the second digit
+ sta CURRENT_LOC ; To make the high byte of the address
+ lda DIGIT2 ; Get the third digit
+ lsla ; *16
+ lsla
+ lsla
+ lsla
+ add DIGIT3 ; Plus the fourth digit
+ sta CURRENT_LOC+1 ; To make the low byte of the address
+FORCEFRESH
+ bclr 7,BTNFLAGS ; Turn off any update routine that might be pending
+ jsr SHOWDATA ; Format the screen
+ ldx #4 ; We need to copy over 4 bytes from the buffer
+COPYIT
+ decx ; This will be one down.
+ lda S8_LOCATION,X ; Get the formatted byte
+ sta DIGIT0,X ; And store it for the update routine
+ tstx ; Did we copy enough bytes?
+ bne COPYIT ; No, go back for more
+ bsr GET_DISP_PARM ; Get the parm for the blink routine
+ lda #BLINK_DIGIT ; Request to blink a digit
+ jsr START_BLINKP ; And do it
+ bset 2,BTNFLAGS ; Mark a blink routine as pending
+ rts
+;
+; (15) This gets the parameters for an UPDATE/BLINK routine
+;
+GET_DISP_PARM
+ lda CURRENT_DIGIT ; Figure out what digit we are dumping
+ sta UPDATE_POS ; Store it for the BLINK/UPDATE routine
+ add #DIGIT0 ; Point to the byte to be updated
+ tax ; And put it into X as needed for the parameter
+ rts
+;
+; (16) This is the main initialization routine which is called when we first get the app into memory
+;
+MAIN:
+ lda #$c0 ; We want button beeps and to indicate that we have been loaded
+ sta WRISTAPP_FLAGS
+ clr CURRENT_DIGIT ; Start out on the first digit
+ rts
diff --git a/from_toebes/number/number.asm b/from_toebes/number/number.asm
new file mode 120000
index 0000000..7adff04
--- /dev/null
+++ b/from_toebes/number/number.asm
@@ -0,0 +1 @@
+number.zsm \ No newline at end of file
diff --git a/from_toebes/number/number.known_good b/from_toebes/number/number.known_good
new file mode 100644
index 0000000..10b989e
--- /dev/null
+++ b/from_toebes/number/number.known_good
Binary files differ
diff --git a/from_toebes/number/number.zsm b/from_toebes/number/number.zsm
new file mode 100644
index 0000000..a779467
--- /dev/null
+++ b/from_toebes/number/number.zsm
@@ -0,0 +1,117 @@
+;Name: Numbers
+;Version: NUMBER
+;Description: This is a simple number count program
+;by John A. Toebes, VIII
+;
+;TIP: Download your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!
+;HelpFile: watchapp.hlp
+;HelpTopic: 106
+ INCLUDE "WRISTAPP.I"
+;
+; (1) Program specific constants
+;
+FLAGBYTE EQU $61
+; Bit 0 indicates that we want to show the segments instead of the message
+;
+CURVAL EQU $62 ; The current value we are displaying
+START EQU *
+;
+; (2) System entry point vectors
+L0110: jmp MAIN ; The main entry point - WRIST_MAIN
+L0113: rts ; Called when we are suspended for any reason - WRIST_SUSPEND
+ nop
+ nop
+L0116: rts ; Called to handle any timers or time events - WRIST_DOTIC
+ nop
+ nop
+L0119: rts ; Called when the COMM app starts and we have timers pending - WRIST_INCOMM
+ nop
+ nop
+L011c: rts ; Called when the COMM app loads new data - WRIST_NEWDATA
+ nop
+ nop
+
+L011f: lda STATETAB,X ; The state table get routine - WRIST_GETSTATE
+ rts
+
+L0123: jmp HANDLE_STATE0
+ db STATETAB-STATETAB
+;
+; (3) Program strings
+S6_NUMBER: timex6 "NUMBER"
+S6_COUNT: timex6 "COUNT "
+;
+; (4) State Table
+STATETAB:
+ db 0
+ db EVT_ENTER,TIM2_8TIC,0 ; Initial state
+ db EVT_TIMER2,TIM_ONCE,0 ; The timer from the enter event
+ db EVT_RESUME,TIM_ONCE,0 ; Resume from a nested app
+ db EVT_DNNEXT,TIM_ONCE,0 ; Next button
+ db EVT_DNPREV,TIM_ONCE,0 ; Prev button
+ db EVT_DNSET,TIM_ONCE,0 ; Set button
+ db EVT_MODE,TIM_ONCE,$FF ; Mode button
+ db EVT_END
+;
+; (5) State Table 0 Handler
+; This is called to process the state events. We will see ENTER, RESUME, DNNEXT, DNPREV, DNSET, and TIMER2
+;
+HANDLE_STATE0:
+ bset 1,APP_FLAGS ; Indicate that we can be suspended
+ lda BTNSTATE ; Get the event
+ cmp #EVT_DNNEXT ; Did they press the next button?
+ beq DO_NEXT ; Yes, increment the counter
+ cmp #EVT_DNPREV ; How about the PREV button
+ beq DO_PREV ; handle it
+ cmp #EVT_DNSET ; Maybe the set button?
+ beq DO_SET ; Deal with it!
+ cmp #EVT_ENTER ; Is this our initial entry?
+ bne REFRESH
+;
+; This is the initial event for starting us
+;
+DO_ENTER
+ bclr 1,FLAGBYTE ; Indicate that we need to clear the display
+ jsr CLEARSYM ; Clear the display
+ lda #S6_NUMBER-START
+ jsr PUT6TOP
+ lda #S6_COUNT-START
+ jsr PUT6MID
+ lda #SYS8_MODE
+ jmp PUTMSGBOT
+;
+; (6) Our only real working code...
+DO_NEXT
+ inc CURVAL
+ lda CURVAL
+ cmp #100
+ bne SHOWVAL
+DO_SET
+ clr CURVAL
+SHOWVAL
+ brset 1,FLAGBYTE,NOCLEAR
+REFRESH
+ jsr CLEARALL
+ bset 1,FLAGBYTE
+NOCLEAR
+ ldx CURVAL
+ jsr FMTXLEAD0
+ jmp PUTMID34
+DO_PREV
+ lda CURVAL
+ beq WRAPUP
+ dec CURVAL
+ bra SHOWVAL
+WRAPUP
+ lda #99
+ sta CURVAL
+ bra SHOWVAL
+;
+; (7) This is the main initialization routine which is called when we first get the app into memory
+;
+MAIN:
+ lda #$c0 ; We want button beeps and to indicate that we have been loaded
+ sta WRISTAPP_FLAGS
+ clr FLAGBYTE ; start with a clean slate
+ clr CURVAL
+ rts
diff --git a/from_toebes/passwd/passwd.asm b/from_toebes/passwd/passwd.asm
new file mode 100644
index 0000000..26ea9bf
--- /dev/null
+++ b/from_toebes/passwd/passwd.asm
@@ -0,0 +1,237 @@
+;Name: Password
+;Version: PASSWD
+;Description: This is a simple number update/passwd program
+;by John A. Toebes, VIII
+;
+;TIP: Download your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!
+;HelpFile: watchapp.hlp
+;HelpTopic: 106
+ INCLUDE "WRISTAPP.I"
+;
+; (1) Program specific constants
+;
+FLAGBYTE EQU $61
+; Bit 0 indicates which digit we are working on (SET=SECOND DIGIT)
+; Bit 1 indicates that we need to clear the display first
+;
+DIGIT0 EQU $62 ; The first digit to enter
+DIGIT1 EQU $63 ; The second digit to enter
+;SYSTEMP0 EQU $A0
+;SYSTEMP1 EQU $A1
+;
+; (2) System entry point vectors
+;
+START EQU *
+L0110: jmp MAIN ; The main entry point - WRIST_MAIN
+L0113: rts ; Called when we are suspended for any reason - WRIST_SUSPEND
+ nop
+ nop
+L0116: rts ; Called to handle any timers or time events - WRIST_DOTIC
+ nop
+ nop
+L0119: rts ; Called when the COMM app starts and we have timers pending - WRIST_INCOMM
+ nop
+ nop
+L011c: rts ; Called when the COMM app loads new data - WRIST_NEWDATA
+ nop
+ nop
+
+L011f: lda STATETAB0,X ; The state table get routine - WRIST_GETSTATE
+ rts
+
+L0123: jmp HANDLE_STATE0
+ db STATETAB0-STATETAB0
+L0127: jmp HANDLE_STATE1
+ db STATETAB1-STATETAB0
+;
+; (3) Program strings
+S6_TOEBES: timex6 "TOEBES"
+S6_SAMPLE: timex6 "SAMPLE"
+S6_PRESS: timex6 "PRESS "
+S8_PASSWORD: timex "PASSWORD"
+SX_MESSAGE timex "BY JOHN A. TOEBES, VIII"
+ db SEPARATOR
+;
+; (4) State Table
+;
+STATETAB0:
+ db 0
+ db EVT_ENTER,TIM_2_8TIC,0 ; Initial state
+ db EVT_TIMER2,TIM_ONCE,0 ; The timer from the enter event
+ db EVT_RESUME,TIM_ONCE,0 ; Resume from a nested app
+ db EVT_MODE,TIM_ONCE,$FF ; Mode button
+ db EVT_SET,TIM_ONCE,1 ; SET button pressed
+ db EVT_END
+
+STATETAB1:
+ db 1
+ db EVT_RESUME,TIM_ONCE,1 ; Resume from a nested app
+ db EVT_DNANY4,TIM_ONCE,1 ; NEXT, PREV, SET, MODE button pressed
+ db EVT_UPANY4,TIM_ONCE,1 ; NEXT, PREV, SET, MODE button released
+ db EVT_USER2,TIM_ONCE,0
+ db EVT_END
+;
+; (5) State Table 0 Handler
+; This is called to process the state events.
+; We see ENTER, TIMER2, and RESUME events
+;
+HANDLE_STATE0:
+ bset 1,APP_FLAGS ; Indicate that we can be suspended
+ lda BTNSTATE ; Get the event
+ cmp #EVT_ENTER ; Is this our initial entry?
+ bne REFRESH0
+;
+; This is the initial event for starting us
+;
+DO_ENTER
+ bclr 1,FLAGBYTE ; Indicate that we need to clear the display
+ jsr CLEARSYM ; Clear the display
+ lda #S6_TOEBES-START
+ jsr PUT6TOP
+ lda #S6_SAMPLE-START
+ jsr PUT6MID
+ ; JMM the original had
+ ; lda #S8_PASSWORD
+ ; JMM this doesn't work on my hardware and I think it's a bug,
+ ; JMM instead
+ lda #S8_PASSWORD-START
+ ; JMM WFM
+ jmp BANNER8
+;
+; We come here for a RESUME or TIMER2 event. For this we want to reset the display
+;
+REFRESH0
+ brset 1,FLAGBYTE,NOCLEAR0 ; Do we need to clear the display first?
+ bset 1,FLAGBYTE
+ jsr CLEARSYM
+NOCLEAR0
+ lda #S6_PRESS-START
+ jsr PUT6TOP
+ lda #SYS6_SET
+ jsr PUTMSG2
+ lda #SX_MESSAGE-START
+ jmp SETUP_SCROLL
+;
+; (6) State Table 1 Handler
+; This is called to process the state events.
+; We see SET, RESUME, DNANY4, and UPANY4 events
+;
+HANDLE_STATE1:
+ bset 1,APP_FLAGS ; Indicate that we can be suspended
+ lda BTNSTATE ; Get the event
+ cmp #EVT_UPANY4
+ beq REFRESH
+ cmp #EVT_DNANY4 ; Is this our initial entry?
+ bne FORCEFRESH
+ lda BTN_PRESSED ; Let's see what the button they pressed was
+ cmp #EVT_PREV ; How about the PREV button
+ beq DO_PREV ; handle it
+ cmp #EVT_NEXT ; Maybe the NEXT button?
+ beq DO_NEXT ; Deal with it!
+ cmp #EVT_MODE ; Perhaps the MODE button
+ beq DO_MODE ; If so, handle it
+ ; It must be the set button, so take us out of this state
+ lda #EVT_USER2
+ jmp POSTEVENT
+;
+; (7) Our real working code...
+DO_NEXT
+ bset 0,SYSFLAGS ; Mark our update direction as up
+ bra DO_UPD
+DO_PREV
+ bclr 0,SYSFLAGS ; Mark our update direction as down
+DO_UPD
+ clra
+ sta UPDATE_MIN ; Our low end is 0
+ lda #99
+ sta UPDATE_MAX ; and the high end is 99 (the max since this is a 2 digit value)
+ brset 0,FLAGBYTE,UPD1
+ ldx DIGIT1
+ jsr FMTXLEAD0
+ jsr PUTMID34
+ ldx #DIGIT0 ; Point to our value to be updated
+ lda #UPD_MID12 ; Request updating in the middle of the display
+ bra UPD2
+UPD1
+ ldx DIGIT0
+ jsr FMTXLEAD0
+ jsr PUTMID12
+ ldx #DIGIT1
+ lda #UPD_MID34
+UPD2
+ jsr START_UPDATEP ; And prepare the update routine
+ bset 4,BTNFLAGS ; Mark that the update is now pending
+ bclr 1,FLAGBYTE
+ lda #SYS8_SET_MODE
+ jmp PUTMSGBOT
+
+DO_MODE
+ lda FLAGBYTE
+ eor #1
+ sta FLAGBYTE
+
+REFRESH
+ brset 1,FLAGBYTE,NOCLEAR ; Do we need to clear the display first?
+FORCEFRESH
+ jsr CLEARALL ; Yes, clear everything before we start
+ bset 1,FLAGBYTE ; And remember that we have already done that
+NOCLEAR
+ bclr 7,BTNFLAGS ; Turn off any update routine that might be pending
+ brset 0,FLAGBYTE,SET1
+ ldx DIGIT1
+ jsr FMTXLEAD0
+ jsr PUTMID34
+ ldx #DIGIT0
+ lda #BLINK_MID12
+ bra SET2
+SET1
+ ldx DIGIT0
+ jsr FMTXLEAD0
+ jsr PUTMID12
+ ldx #DIGIT1
+ lda #BLINK_MID34
+SET2
+ jsr START_BLINKP
+ bset 2,BTNFLAGS ; Mark a blink routine as pending
+ rts
+;
+; (8) This is the main initialization routine which is called when we first get the app into memory
+;
+MAIN:
+ lda #$c0 ; We want button beeps and to indicate that we have been loaded
+ sta WRISTAPP_FLAGS
+ clr FLAGBYTE ; start with a clean slate
+ clr DIGIT0
+ clr DIGIT1
+ rts
+;
+; (9) This subroutine is useful for getting a scrolling string on the screen
+;
+;----------------------------------------------------------------------
+; Routine:
+; SETUP_SCROLL
+; Parameters:
+; X - Offset from Start to the string
+; Returns:
+; MSGBUF - contains copied string
+; Purpose
+; This copies the current string into MSGBUF and calls the appropriate routines
+; to start it scrolling on the bottom line.
+;----------------------------------------------------------------------
+SETUP_SCROLL:
+ clr SYSTEMP0
+ sta SYSTEMP1
+DO_COPY:
+ ldx SYSTEMP1 ; Get the pointer to the source character
+ lda START,X ; Get the character that we are copying
+ ldx SYSTEMP0 ; Get the pointer to the output buffer
+ sta MSGBUF,X ; and store the character away
+ inc SYSTEMP0 ; Increment our count
+ inc SYSTEMP1 ; As well as the pointer to the character
+ cmp #SEPARATOR ; Did we get a terminator character
+ bne DO_COPY ; No, go back for more
+ ;
+ ; The string is now in a buffer terminated by a separator character
+ ;
+ jsr PUTSCROLLMSG ; Initialize the scrolling support
+ jmp SCROLLMSG ; And tell it to actually start scrolling
diff --git a/from_toebes/passwd/passwd.known_good b/from_toebes/passwd/passwd.known_good
new file mode 100644
index 0000000..b332361
--- /dev/null
+++ b/from_toebes/passwd/passwd.known_good
Binary files differ
diff --git a/from_toebes/passwd/passwd.zap b/from_toebes/passwd/passwd.zap
new file mode 100644
index 0000000..9150e9d
--- /dev/null
+++ b/from_toebes/passwd/passwd.zap
@@ -0,0 +1,25 @@
+TDL0724962¬ Applet file header
+Password Test¬ Applet friendly name
+Passwd1¬ Applet version #
+This simple program shows how you might enter a password (or other 4 digit number).
+
+TIP: Download your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!¬
+WATCHAPP.HLP¬ Applet help filename
+106¬
+none¬ Applet's parent's app name (if it exists - 'none' if it doesn't)
+Timex Data Link 150 Watch¬
+CC023A819D9D819D9D819D9D819D9DD6015D81CC017C00CC01AF1118000E0B0E05050A1416130E16170E05051D190A1C1C20181B0D0B222413181117240A32241D180E0B0E1C30241F1212123F001B83001FFF001AFF0001FFFF02FF011D011AFF0186FF01A6FF0139FF001D128FB691A11B26141361CD579FA61BCD587EA621CD58A8A63DCC58450261051261CD579FA627CD587EA600CD58ACA635CC0245128FB691A1A62756A1862655C604C3A1032711A1002709A101273DA639CC4E89109F2002119F4FC704F4A663C704F500610EBE63CD593ECD5920AE62A605200CBE62CD593ECD5910AE63A607CD57C718901361A650CC584CB661A801B761026105CD577A12611F9000610EBE63CD593ECD5920AE62A607200CBE62CD593ECD5910AE63A609CD55BF149081A6C0B7963F613F623F63813FA0B7A1BEA1D60110BEA0D704D23CA03CA1A13F26EECD5522CC5545¬
+17336¬
+0¬ No data
+Password Test¬ Applet friendly name
+Passwd2¬ Applet version #
+This simple program shows how you might enter a password (or other 4 digit number).
+
+TIP: Download your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!¬
+WATCHAPP.HLP¬ Applet help filename
+106¬
+none¬ Applet's parent's app name (if it exists - 'none' if it doesn't)
+Timex Data Link 150s Watch¬
+CC023A819D9D819D9D819D9D819D9DD6015D81CC017C00CC01AF1118000E0B0E05050A1416130E16170E05051D190A1C1C20181B0D0B222413181117240A32241D180E0B0E1C30241F1212123F001B83001FFF001AFF0001FFFF02FF011D011AFF0186FF01A6FF0139FF001D128FB691A11B26141361CD5ACBA61BCD577FA621CD57A9A63DCC57460261051261CD5ACBA627CD577FA600CD57ADA635CC0245128FB691A1A62756A1862655C604C3A1032711A1002709A101273DA639CC4E78109F2002119F4FC704F4A663C704F500610EBE63CD583FCD5821AE62A605200CBE62CD583FCD5811AE63A607CD56C818901361A650CC574DB661A801B761026105CD5AA012611F9000610EBE63CD583FCD5821AE62A607200CBE62CD583FCD5811AE63A609CD55AE149081A6C0B7963F613F623F63813FA0B7A1BEA1D60110BEA0D704D23CA03CA1A13F26EECD5511CC5534¬
+44579¬
+0¬ No data \ No newline at end of file
diff --git a/from_toebes/passwd/passwd.zsm b/from_toebes/passwd/passwd.zsm
new file mode 100644
index 0000000..dd26499
--- /dev/null
+++ b/from_toebes/passwd/passwd.zsm
@@ -0,0 +1,232 @@
+;Name: Password
+;Version: PASSWD
+;Description: This is a simple number update/passwd program
+;by John A. Toebes, VIII
+;
+;TIP: Download your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!
+;HelpFile: watchapp.hlp
+;HelpTopic: 106
+ INCLUDE "WRISTAPP.I"
+;
+; (1) Program specific constants
+;
+FLAGBYTE EQU $61
+; Bit 0 indicates which digit we are working on (SET=SECOND DIGIT)
+; Bit 1 indicates that we need to clear the display first
+;
+DIGIT0 EQU $62 ; The first digit to enter
+DIGIT1 EQU $63 ; The second digit to enter
+SYSTEMP0 EQU $A0
+SYSTEMP1 EQU $A1
+;
+; (2) System entry point vectors
+;
+START EQU *
+L0110: jmp MAIN ; The main entry point - WRIST_MAIN
+L0113: rts ; Called when we are suspended for any reason - WRIST_SUSPEND
+ nop
+ nop
+L0116: rts ; Called to handle any timers or time events - WRIST_DOTIC
+ nop
+ nop
+L0119: rts ; Called when the COMM app starts and we have timers pending - WRIST_INCOMM
+ nop
+ nop
+L011c: rts ; Called when the COMM app loads new data - WRIST_NEWDATA
+ nop
+ nop
+
+L011f: lda STATETAB0,X ; The state table get routine - WRIST_GETSTATE
+ rts
+
+L0123: jmp HANDLE_STATE0
+ db STATETAB0-STATETAB0
+L0127: jmp HANDLE_STATE1
+ db STATETAB1-STATETAB0
+;
+; (3) Program strings
+S6_TOEBES: timex6 "TOEBES"
+S6_SAMPLE: timex6 "SAMPLE"
+S6_PRESS: timex6 "PRESS "
+S8_PASSWORD: timex "PASSWORD"
+SX_MESSAGE timex "BY JOHN A. TOEBES, VIII"
+ db SEPARATOR
+;
+; (4) State Table
+;
+STATETAB0:
+ db 0
+ db EVT_ENTER,TIM_2_8TIC,0 ; Initial state
+ db EVT_TIMER2,TIM_ONCE,0 ; The timer from the enter event
+ db EVT_RESUME,TIM_ONCE,0 ; Resume from a nested app
+ db EVT_MODE,TIM_ONCE,$FF ; Mode button
+ db EVT_SET,TIM_ONCE,1 ; SET button pressed
+ db EVT_END
+
+STATETAB1:
+ db 1
+ db EVT_RESUME,TIM_ONCE,1 ; Resume from a nested app
+ db EVT_DNANY4,TIM_ONCE,1 ; NEXT, PREV, SET, MODE button pressed
+ db EVT_UPANY4,TIM_ONCE,1 ; NEXT, PREV, SET, MODE button released
+ db EVT_USER2,TIM_ONCE,0
+ db EVT_END
+;
+; (5) State Table 0 Handler
+; This is called to process the state events.
+; We see ENTER, TIMER2, and RESUME events
+;
+HANDLE_STATE0:
+ bset 1,APP_FLAGS ; Indicate that we can be suspended
+ lda BTNSTATE ; Get the event
+ cmp #EVT_ENTER ; Is this our initial entry?
+ bne REFRESH0
+;
+; This is the initial event for starting us
+;
+DO_ENTER
+ bclr 1,FLAGBYTE ; Indicate that we need to clear the display
+ jsr CLEARSYM ; Clear the display
+ lda #S6_TOEBES-START
+ jsr PUT6TOP
+ lda #S6_SAMPLE-START
+ jsr PUT6MID
+ lda #S8_PASSWORD
+ jmp BANNER8
+;
+; We come here for a RESUME or TIMER2 event. For this we want to reset the display
+;
+REFRESH0
+ brset 1,FLAGBYTE,NOCLEAR0 ; Do we need to clear the display first?
+ bset 1,FLAGBYTE
+ jsr CLEARSYM
+NOCLEAR0
+ lda #S6_PRESS-START
+ jsr PUT6TOP
+ lda #SYS6_SET
+ jsr PUTMSG2
+ lda #SX_MESSAGE-START
+ jmp SETUP_SCROLL
+;
+; (6) State Table 1 Handler
+; This is called to process the state events.
+; We see SET, RESUME, DNANY4, and UPANY4 events
+;
+HANDLE_STATE1:
+ bset 1,APP_FLAGS ; Indicate that we can be suspended
+ lda BTNSTATE ; Get the event
+ cmp #EVT_UPANY4
+ beq REFRESH
+ cmp #EVT_DNANY4 ; Is this our initial entry?
+ bne FORCEFRESH
+ lda BTN_PRESSED ; Let's see what the button they pressed was
+ cmp #EVT_PREV ; How about the PREV button
+ beq DO_PREV ; handle it
+ cmp #EVT_NEXT ; Maybe the NEXT button?
+ beq DO_NEXT ; Deal with it!
+ cmp #EVT_MODE ; Perhaps the MODE button
+ beq DO_MODE ; If so, handle it
+ ; It must be the set button, so take us out of this state
+ lda #EVT_USER2
+ jmp POSTEVENT
+;
+; (7) Our real working code...
+DO_NEXT
+ bset 0,SYSFLAGS ; Mark our update direction as up
+ bra DO_UPD
+DO_PREV
+ bclr 0,SYSFLAGS ; Mark our update direction as down
+DO_UPD
+ clra
+ sta UPDATE_MIN ; Our low end is 0
+ lda #99
+ sta UPDATE_MAX ; and the high end is 99 (the max since this is a 2 digit value)
+ brset 0,FLAGBYTE,UPD1
+ ldx DIGIT1
+ jsr FMTXLEAD0
+ jsr PUTMID34
+ ldx #DIGIT0 ; Point to our value to be updated
+ lda #UPD_MID12 ; Request updating in the middle of the display
+ bra UPD2
+UPD1
+ ldx DIGIT0
+ jsr FMTXLEAD0
+ jsr PUTMID12
+ ldx #DIGIT1
+ lda #UPD_MID34
+UPD2
+ jsr START_UPDATEP ; And prepare the update routine
+ bset 4,BTNFLAGS ; Mark that the update is now pending
+ bclr 1,FLAGBYTE
+ lda #SYS8_SET_MODE
+ jmp PUTMSGBOT
+
+DO_MODE
+ lda FLAGBYTE
+ eor #1
+ sta FLAGBYTE
+
+REFRESH
+ brset 1,FLAGBYTE,NOCLEAR ; Do we need to clear the display first?
+FORCEFRESH
+ jsr CLEARALL ; Yes, clear everything before we start
+ bset 1,FLAGBYTE ; And remember that we have already done that
+NOCLEAR
+ bclr 7,BTNFLAGS ; Turn off any update routine that might be pending
+ brset 0,FLAGBYTE,SET1
+ ldx DIGIT1
+ jsr FMTXLEAD0
+ jsr PUTMID34
+ ldx #DIGIT0
+ lda #BLINK_MID12
+ bra SET2
+SET1
+ ldx DIGIT0
+ jsr FMTXLEAD0
+ jsr PUTMID12
+ ldx #DIGIT1
+ lda #BLINK_MID34
+SET2
+ jsr START_BLINKP
+ bset 2,BTNFLAGS ; Mark a blink routine as pending
+ rts
+;
+; (8) This is the main initialization routine which is called when we first get the app into memory
+;
+MAIN:
+ lda #$c0 ; We want button beeps and to indicate that we have been loaded
+ sta WRISTAPP_FLAGS
+ clr FLAGBYTE ; start with a clean slate
+ clr DIGIT0
+ clr DIGIT1
+ rts
+;
+; (9) This subroutine is useful for getting a scrolling string on the screen
+;
+;----------------------------------------------------------------------
+; Routine:
+; SETUP_SCROLL
+; Parameters:
+; X - Offset from Start to the string
+; Returns:
+; MSGBUF - contains copied string
+; Purpose
+; This copies the current string into MSGBUF and calls the appropriate routines
+; to start it scrolling on the bottom line.
+;----------------------------------------------------------------------
+SETUP_SCROLL:
+ clr SYSTEMP0
+ sta SYSTEMP1
+DO_COPY:
+ ldx SYSTEMP1 ; Get the pointer to the source character
+ lda START,X ; Get the character that we are copying
+ ldx SYSTEMP0 ; Get the pointer to the output buffer
+ sta MSGBUF,X ; and store the character away
+ inc SYSTEMP0 ; Increment our count
+ inc SYSTEMP1 ; As well as the pointer to the character
+ cmp #SEPARATOR ; Did we get a terminator character
+ bne DO_COPY ; No, go back for more
+ ;
+ ; The string is now in a buffer terminated by a separator character
+ ;
+ jsr PUTSCROLLMSG ; Initialize the scrolling support
+ jmp SCROLLMSG ; And tell it to actually start scrolling
diff --git a/from_toebes/pick6/pick6.asm b/from_toebes/pick6/pick6.asm
new file mode 120000
index 0000000..7e60eb8
--- /dev/null
+++ b/from_toebes/pick6/pick6.asm
@@ -0,0 +1 @@
+pick6.zsm \ No newline at end of file
diff --git a/from_toebes/pick6/pick6.known_good b/from_toebes/pick6/pick6.known_good
new file mode 120000
index 0000000..670787d
--- /dev/null
+++ b/from_toebes/pick6/pick6.known_good
@@ -0,0 +1 @@
+pick6.zap.app \ No newline at end of file
diff --git a/from_toebes/pick6/pick6.zap b/from_toebes/pick6/pick6.zap
new file mode 100644
index 0000000..21ec223
--- /dev/null
+++ b/from_toebes/pick6/pick6.zap
@@ -0,0 +1,33 @@
+TDL1024972¬
+PICK6¬
+PICK6¬
+A sample lottery number picker to pick 6 numbers out of a pool of 49 numbers (no duplicates allowed).
+ To use it, just select it as the current app and it will pick a set of 6 numbers for you. To get another set,
+ just press the next button. This is for amusement only (but if you win anything because of it, I would welcome
+ anything that you send me).
+
+by John A. Toebes, VIII
+watchapp.hlp¬
+100¬
+none¬
+Timex Data Link 150 Watch¬
+CC0275139081CC0157139081819D9DD6013E81CC0180001D1D1D1F001F1D1D1D2419120C14310624191A19181718001B85001AFF008085001FFF0001FFFF1D00000000000000FFC604C1A10826B5AE05B665CD6B0DB76597D60138CD58A8BE65D60138CC587E3F651290CD577ACC0225128F1390B691A18027ECA11B27E8A11A274B4FAE06D7014E5A26FA3F65CD022DA43FB766A630B065B16625F1B666AD0A3C65B665A10626E520234CAE505C6DFE2603E7FE81E1FE25034C20F1B766E6FEB767B666E7FEB6675C4D26F081CE014FAD48CD58E0CE0150AD40CD58F0CE0151AD38CD5900CE0152AD30CD5910CE0153AD28CD5920CE0154AD20CD5930A636B71D141EA624B71D141EA636B71D101EA624B71D101EA620CC5845CC5951B663BE5042BB61B7619FB962B7624FB767A900B766B663BE46AD1DB664BE50AD17B664BE61BF63BE62BF64BE4642BB66B7619FB967B7628142BB62B7629FB966B7664FB967B76781A6C0B796B627B763B764B761A43FB76281¬
+42817¬
+0¬
+PICK6¬
+PICK6¬
+A sample lottery number picker to pick 6 numbers out of a pool of 49 numbers (no duplicates allowed).
+ To use it, just select it as the current app and it will pick a set of 6 numbers for you. To get another set,
+ just press the next button. This is for amusement only (but if you win anything because of it, I would welcome
+ anything that you send me).
+
+by John A. Toebes, VIII
+watchapp.hlp¬
+100¬
+none¬
+Timex Data Link 150s Watch¬
+CC0275139081CC0157139081819D9DD6013E81CC0180001D1D1D1F001F1D1D1D2419120C14310624191A19181718001B85001AFF008085001FFF0001FFFF1D00000000000000FFC604C1A10826B5AE05B665CD6B16B76597D60138CD57A9BE65D60138CC577F3F651290CD5AA0CC0225128F1390B691A18027ECA11B27E8A11A274B4FAE06D7014E5A26FA3F65CD022DA43FB766A630B065B16625F1B666AD0A3C65B665A10626E520234CAE505C6DFE2603E7FE81E1FE25034C20F1B766E6FEB767B666E7FEB6675C4D26F081CE014FAD48CD57E1CE0150AD40CD57F1CE0151AD38CD5801CE0152AD30CD5811CE0153AD28CD5821CE0154AD20CD5831A634B71D141EA622B71D141EA634B71D101EA622B71D101EA620CC5746CC5852B663BE5042BB61B7619FB962B7624FB767A900B766B663BE46AD1DB664BE50AD17B664BE61BF63BE62BF64BE4642BB66B7619FB967B7628142BB62B7629FB966B7664FB967B76781A6C0B796B627B763B764B761A43FB76281¬
+62244¬
+0¬ \ No newline at end of file
diff --git a/from_toebes/pick6/pick6.zsm b/from_toebes/pick6/pick6.zsm
new file mode 100644
index 0000000..515dd8c
--- /dev/null
+++ b/from_toebes/pick6/pick6.zsm
@@ -0,0 +1,335 @@
+;Name: PICK6
+;Version: PICK6
+;Description: A sample lottery number picker to pick 6 numbers out of a pool of 49 numbers (no duplicates allowed).
+; To use it, just select it as the current app and it will pick a set of 6 numbers for you. To get another set,
+; just press the next button. This is for amusement only (but if you win anything because of it, I would welcome
+; anything that you send me).
+;
+;by John A. Toebes, VIII
+;
+;HelpFile: watchapp.hlp
+;HelpTopic: 100
+;****************************************************************************************
+;* Copyright (C) 1997 John A. Toebes, VIII *
+;* All Rights Reserved *
+;* This program may not be distributed in any form without the permission of the author *
+;* jtoebes@geocities.com *
+;****************************************************************************************
+; (1) Program specific constants
+;
+ INCLUDE "WRISTAPP.I"
+;
+; Program specific constants
+;
+RAND_RANGE EQU 48 ; This is the number of items to select from (1 to RAND_RANGE+1)
+CURRENT_TIC EQU $27 ; Current system clock tic (Timer)
+RAND_WCL EQU $61
+RAND_WCH EQU $62
+RAND_WNL EQU $63
+RAND_WNH EQU $64
+THIS_PICK EQU $65 ; We can share this with MARQ_POS since we don't do both at the same time
+MARQ_POS EQU $65
+TEMPL EQU $66
+TEMPH EQU $67
+START EQU *
+BASE_TAB EQU $FE
+;
+; (2) System entry point vectors
+;
+L0110: jmp MAIN ; The main entry point - WRIST_MAIN
+L0113: bclr 1,BTNFLAGS ; Called when we are suspended for any reason - WRIST_SUSPEND
+ rts
+L0116: jmp FLASH ; Called to handle any timers or time events - WRIST_DOTIC
+L0119: bclr 1,BTNFLAGS ; Called when the COMM app starts and we have timers pending - WRIST_INCOMM
+ rts
+L011c: rts ; Called when the COMM app loads new data - WRIST_NEWDATA
+ nop
+ nop
+
+L011f: lda STATETAB,X ; The state table get routine - WRIST_GETSTATE
+ rts
+
+L0123: jmp HANDLE_STATE0
+ db STATETAB-STATETAB
+;
+; (3) Program strings
+;
+S6_MARQ timex6 " +O+ "
+S8_TITLE timex " PICK-6 "
+
+MARQ_SEL
+ DB S6_MARQ+2-START
+ DB S6_MARQ+3-START
+ DB S6_MARQ+2-START
+ DB S6_MARQ+1-START
+ DB S6_MARQ-START
+ DB S6_MARQ+1-START
+;
+; (4) State Table
+;
+STATETAB:
+ db 0
+ db EVT_ENTER,TIM2_16TIC,0 ; Initial state
+ db EVT_RESUME,TIM_ONCE,0 ; Resume from a nested app
+ db EVT_DNNEXT,TIM2_16TIC,0 ; Next button
+ db EVT_TIMER2,TIM_ONCE,0 ; Timer
+ db EVT_MODE,TIM_ONCE,$FF ; Mode button
+ db EVT_END
+
+PICK_VALS db 0,0,0,0,0,0,0,$FF
+;
+; (5) This flashes the text on the screen
+;
+FLASH
+ lda CURRENT_APP ; See which app is currently running
+ cmp #APP_WRIST ; Is it us?
+ bne L0113 ; No, so just turn off the tic timer since we don't need it
+ ldx #5
+ lda MARQ_POS
+ jsr INCA_WRAPX
+ sta MARQ_POS
+ tax
+ lda MARQ_SEL,X
+ jsr PUT6MID
+ ldx MARQ_POS
+ lda MARQ_SEL,X
+ jmp PUT6TOP
+;
+; (6) They want us to do it again
+;
+DOITAGAIN ; Tell them we are going to do it again
+ clr MARQ_POS
+ bset 1,BTNFLAGS
+ jsr CLEARALL
+ jmp BANNER
+;
+; (7) State Table 0 Handler
+; This is called to process the state events.
+; We see ENTER, RESUME, TIMER2 and NEXT events
+;
+HANDLE_STATE0:
+ bset 1,APP_FLAGS ; Indicate that we can be suspended
+ bclr 1,BTNFLAGS
+ lda BTNSTATE
+ cmp #EVT_DNNEXT ; Did they press the next button?
+ beq DOITAGAIN
+ cmp #EVT_ENTER ; Or did we start out
+ beq DOITAGAIN
+ cmp #EVT_RESUME
+ beq REFRESH
+;
+; (8) Select a random answer
+;
+SHOWIT
+ clra
+ ldx #6
+CLEARIT
+ sta PICK_VALS-1,X
+ decx
+ bne CLEARIT
+;
+; We want to pick 6 random numbers. The first needs to be in the range 1 ... RAND_RANGE
+; The second should be in the range 1 ... (RAND_RANGE-1)
+; The third should be in the range 1 ... (RAND_RANGE-2)
+; The fourth should be in the range 1 ... (RAND_RANGE-3)
+; The fifth should be in the range 1 ... (RAND_RANGE-4)
+; The sixth should be in the range 1 ... (RAND_RANGE-5)
+;
+ clr THIS_PICK
+ONE_MORE_PICK
+
+REPICK
+ jsr RAND16
+ and #63
+ sta TEMPL
+ lda #RAND_RANGE
+ sub THIS_PICK
+ cmp TEMPL
+ blo REPICK
+ lda TEMPL
+ bsr INSERT_NUM
+
+ inc THIS_PICK
+ lda THIS_PICK
+ cmp #6
+ bne ONE_MORE_PICK
+ bra REFRESH
+;
+; (9) Insert a number in the list
+;
+INSERT_NUM
+ inca
+ ldx #(PICK_VALS-1)-BASE_TAB ; Index so that we can use the short addressing mode
+TRY_NEXT
+ incx ; Advance to the next number
+ tst BASE_TAB,X ; Is it an empty slot?
+ bne NOT_END ; No, try some more
+ sta BASE_TAB,X ; Yes, just toss it in there
+ rts ; And return
+NOT_END
+ cmp BASE_TAB,X ; Non-empty slot, are we less than it?
+ blo PUT_HERE ; Yes, so we go here
+ inca ; No, Greater than or equal, we need to increment one and try again
+ bra TRY_NEXT
+PUT_HERE
+ sta TEMPL
+ lda BASE_TAB,X
+ sta TEMPH
+ lda TEMPL
+ sta BASE_TAB,X
+ lda TEMPH
+ incx
+ tsta
+ bne PUT_HERE
+ rts
+;
+; (10) Display the currently selected random numbers
+;
+REFRESH
+ ldx PICK_VALS
+ bsr GOFMTX
+ jsr PUTTOP12
+
+ ldx PICK_VALS+1
+ bsr GOFMTX
+ jsr PUTTOP34
+
+ ldx PICK_VALS+2
+ bsr GOFMTX
+ jsr PUTTOP56
+
+ ldx PICK_VALS+3
+ bsr GOFMTX
+ jsr PUTMID12
+
+ ldx PICK_VALS+4
+ bsr GOFMTX
+ jsr PUTMID34
+
+ ldx PICK_VALS+5
+ bsr GOFMTX
+ jsr PUTMID56
+
+ lda #ROW_MP23
+ sta DISP_ROW
+ bset COL_MP23,DISP_COL
+
+ lda #ROW_MP45
+ sta DISP_ROW
+ bset COL_MP45,DISP_COL
+
+ lda #ROW_TP23
+ sta DISP_ROW
+ bset COL_TP23,DISP_COL
+
+ lda #ROW_TP45
+ sta DISP_ROW
+ bset COL_TP45,DISP_COL
+BANNER
+ lda #S8_TITLE-START ; And show the mode on the bottom
+ jmp BANNER8
+
+GOFMTX JMP FMTX
+; (11) Here is an excellent random number generator
+; it comes courtesy of Alan Beale <biljir@pobox.com>
+; The following C code gives a good MWC (multiply-with-carry)
+; generator. This type is generally superior to linear
+; congruential generators. As a bonus, there is no particular advantage to using the high-order
+; rather than the low-order bits.
+; The algorithm was developed and analyzed by George
+; Marsaglia, a very well-known scholar of random number lore.
+;
+; The code assumes 16 bit shorts and 32 bit longs (hardly surprising).
+;
+;static unsigned short wn,wc; /* random number and carry */
+;
+;unsigned short rand() {
+; unsigned long temp;
+; temp = 18000*wn + wc;
+; wc = temp >> 16;
+; wn = temp & 0xffff;
+; return wn;
+;}
+;
+;To seed, set wn to anything you like, and wc to anything between 0 and 17999.
+;
+; Translating this into assembler is
+;nHnL*0x4650 + RAND_WCHcL
+;
+; unsigned long temp;
+; temp = 18000*wn + wc;
+; wc = temp >> 16;
+; wn = temp & 0xffff;
+; return wn;
+; temp = 0x4650 * n + c
+; temp = 0x4650 * nHnL + cHcL
+; temp = (0x4600 + 0x50) * (nH00 + nL) + cHcL
+; temp = 0x4600*nH00 + 0x4600*nL + 0x50*nH00 + 0x50*nL + cHcL
+; temp = 0x46*nH*0x10000 + 0x46*nL*0x100 + 0x50*nH*0x1000 + 0x50*nL + cHcL
+; We construct the 32bit result into tH tL cH cL and then swap the 16 bit values
+; once we have no more need of the original numbers in the calculation
+;
+RAND_MULT EQU 18000 ; This is for the random number generator
+RAND_MULTH EQU RAND_MULT/256
+RAND_MULTL EQU RAND_MULT&255
+
+RAND16
+ lda RAND_WNL ; A=nL
+ ldx RAND_MULTL ; X=0x50
+ mul ; X:A = 0x50*nL
+ add RAND_WCL ; A=Low(0x50nL)+cL
+ sta RAND_WCL ; cL=Low(0x50nL)+cL
+ txa ; A=High(0x50nL)
+ adc RAND_WCH ; A=High(0x50nL)+cH
+ sta RAND_WCH ; cH=High(0x50nL)+cH
+ clra ; A=0
+ sta TEMPH ; tH=0
+ adc #0 ; A=Carry(0x50nL)+cH
+ sta TEMPL ; tL=Carry(0x50nL)+cH
+
+ lda RAND_WNL ; A=nL
+ ldx RAND_MULTH ; X=0x46
+ bsr RAND_SUB ; tL:cH += 0x46*nL tH=carry(0x46*nL)
+
+ lda RAND_WNH ; A=nH
+ ldx RAND_MULTL ; X=0x50
+ bsr RAND_SUB ; tL:cH += 0x50*nH tH=carry(0x50*nH)
+
+ lda RAND_WNH ; A=nH
+ ldx RAND_WCL ; X=cL
+ stx RAND_WNL ; nL=cL
+ ldx RAND_WCH ; X=cH
+ stx RAND_WNH ; hH=cH
+ ldx RAND_MULTH ; X=0x46
+ mul ; X:A=0x46*nH
+ add TEMPL ; A=Low(0x46*nH)+tL
+ sta RAND_WCL ; nL=Low(0x46*nH)+tL
+ txa ; A=High(0x46*nH)
+ adc TEMPH ; A=High(0x46*nH)+tH
+ sta RAND_WCH ; nH=High(0x46*nH)+tH
+ rts
+
+RAND_SUB
+ mul ; Compute the values
+ add RAND_WCH ; A=LOW(result)+cH
+ sta RAND_WCH ; cH=Low(result)+cH
+ txa ; X=High(result)
+ adc TEMPL ; X=High(result)+tL+Carry(low(result)+cH)
+ sta TEMPL ; tL=High(result)+tL+Carry(low(result)+cH)
+ clra ; A=0
+ adc TEMPH ; A=carry(High(result)+tL+Carry(low(result)+cH))+tH
+ sta TEMPH ; tH=carry(High(result)+tL+Carry(low(result)+cH))+tH
+ rts
+;
+; (12) This is the main initialization routine which is called when we first get the app into memory
+;
+MAIN:
+ lda #$c0 ; We want button beeps and to indicate that we have been loaded
+ sta WRISTAPP_FLAGS
+ lda CURRENT_TIC
+ sta RAND_WNL
+ sta RAND_WNH
+ sta RAND_WCL
+ and #$3f
+ sta RAND_WCH
+ rts
diff --git a/from_toebes/promdump/promdump.asm b/from_toebes/promdump/promdump.asm
new file mode 100644
index 0000000..91d66c2
--- /dev/null
+++ b/from_toebes/promdump/promdump.asm
@@ -0,0 +1,336 @@
+;Name: Prom Dump
+;Version: promdump
+;Description: Prom Dumper - by John A. Toebes, VIII
+;This Prom Dump routine shows you what is in the EEProm
+;
+; Press the NEXT/PREV buttons to advance/backup by 6 bytes of memory at a time
+; Press the SET button to change the location in memory where you are dumping.
+;
+;TIP: Download your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!
+;HelpFile: watchapp.hlp
+;HelpTopic: 106
+ INCLUDE "WRISTAPP.I"
+;
+; (1) Program specific constants
+;
+FLAGBYTE EQU $61
+; Bit 0 indicates the direction of the last button
+; The other bits are not used
+CURRENT_DIGIT EQU $62
+DIGIT0 EQU $63
+DIGIT1 EQU $64
+DIGIT2 EQU $65
+DIGIT3 EQU $66
+;
+; These should have been in the Wristapp.i files, but I forgot them...
+;
+; INST_ADDRHI EQU $0437
+; INST_ADDRLO EQU $0438
+; HW_FLAGS EQU $9e
+;
+;
+; (2) System entry point vectors
+;
+START EQU *
+L0110: jmp MAIN ; The main entry point - WRIST_MAIN
+L0113: rts ; Called when we are suspended for any reason - WRIST_SUSPEND
+ nop
+ nop
+L0116: rts ; Called to handle any timers or time events - WRIST_DOTIC
+ nop
+ nop
+L0119: rts ; Called when the COMM app starts and we have timers pending - WRIST_INCOMM
+ nop
+ nop
+L011c: rts ; Called when the COMM app loads new data - WRIST_NEWDATA
+ nop
+ nop
+
+L011f: lda STATETAB0,X ; The state table get routine - WRIST_GETSTATE
+ rts
+
+L0123: jmp HANDLE_STATE0
+ db STATETAB0-STATETAB0
+L0127: jmp HANDLE_STATE1
+ db STATETAB1-STATETAB0
+L012b: jmp HANDLE_STATE2
+ db STATETAB2-STATETAB0
+;
+; (3) Program strings
+;
+S6_EEPROM: timex6 "EEPROM"
+S6_DUMPER: timex6 "DUMPER"
+S8_LOCATION timex "aaaa "
+;
+; (4) State Table
+;
+STATETAB0:
+ db 0
+ db EVT_ENTER,TIM2_12TIC,0 ; Initial state
+ db EVT_RESUME,TIM_ONCE,0 ; Resume from a nested app
+ db EVT_TIMER2,TIM_ONCE,0 ; This is the timer
+ db EVT_DNNEXT,TIM2_8TIC,1 ; Next button
+ db EVT_DNPREV,TIM2_8TIC,1 ; Prev button
+ db EVT_MODE,TIM_ONCE,$FF ; Mode button
+ db EVT_SET,TIM_ONCE,2 ; Set button
+ db EVT_USER0,TIM_ONCE,$FF ; Return to system
+ db EVT_END
+
+STATETAB1:
+ db 0
+ db EVT_UPANY,TIM_ONCE,0 ; Releasing the prev or next button
+ db EVT_TIMER2,TIM2_TIC,1 ; Repeat operation with a timer
+ db EVT_END ; End of table
+
+STATETAB2:
+ db 2
+ db EVT_RESUME,TIM_ONCE,2 ; Resume from a nested app
+ db EVT_DNANY4,TIM_ONCE,2 ; NEXT, PREV, SET, MODE button pressed
+ db EVT_UPANY4,TIM_ONCE,2 ; NEXT, PREV, SET, MODE button released
+ db EVT_USER2,TIM_ONCE,0 ; Return to state 0
+ db EVT_END ; End of table
+
+CURRENT_LOC
+ dw $0000 ; This is where we start in memory
+;
+; (5) State Table 0 Handler
+; This is called to process the state events.
+; We see ENTER, TIMER2, and RESUME events
+;
+HANDLE_STATE0:
+ bset 1,APP_FLAGS ; Indicate that we can be suspended
+ lda BTNSTATE ; Get the event
+ cmp #EVT_ENTER ; Is this the initial state?
+ bne SHOWDATA ; no, just clean up the screen
+;
+; (6) Put up the initial banner screen
+;
+ jsr CLEARALL ; Clear the display
+ lda #S6_EEPROM-START ; Put 'EEPROM' on the top line
+ jsr PUT6TOP
+ lda #S6_DUMPER-START ; Put 'DUMPER' on the second line
+ jsr PUT6MID
+ lda #SYS8_MODE ; Put MODE on the bottom line
+ jmp PUTMSGBOT
+; (7) FMTHEX is a routine similar to FMTX, but it handles hex values instead
+;=======================================================================
+; Routine: FMTHEX
+; Purpose:
+; Format a byte into the buffer
+; Parameters:
+; A - Byte to be formatted
+; X - Offset into Message buffer to put the byte
+;=======================================================================
+FMTHEX:
+ sta S8_LOCATION,X ; Save the byte
+ and #$0f ; Extract the bottom nibble
+ sta S8_LOCATION+1,X ; Save the hex value of the nibble
+ lda S8_LOCATION,X ; Get the value once again
+ lsra ; Shift right by 4 to get the high order nibble
+ lsra
+ lsra
+ lsra
+
+ sta S8_LOCATION,X ; And put it back into the buffer
+ rts
+;
+; (8) This is called when we press the prev/next button or when the timer fires during that event
+;
+HANDLE_STATE1:
+ lda BTNSTATE
+ cmp #EVT_TIMER2 ; Is this a repeat/timer event?
+ beq REPEATBTN ; yes, do as they asked
+
+ bclr 0,FLAGBYTE ; Assume that they hit the prev button
+ cmp #EVT_DNPREV ; Did they hit the prev button
+ bne REPEATBTN ; Yes, we guessed right
+ bset 0,FLAGBYTE ; No, they hit next. Mark the direction.
+REPEATBTN:
+ brclr 0,FLAGBYTE,NEXTLOC ; If they hit the next button, go do that operation
+;
+; They pressed the prev button, let's go to the previous location
+;
+PREVLOC:
+ lda CURRENT_LOC+1
+ sub #6
+ sta CURRENT_LOC+1
+ lda CURRENT_LOC
+ sbc #0
+ sta CURRENT_LOC
+ bra SHOWDATA
+NEXTLOC:
+ lda #6
+ add CURRENT_LOC+1
+ sta CURRENT_LOC+1
+ lda CURRENT_LOC
+ adc #0
+ sta CURRENT_LOC
+;
+; (9) This is the main screen update routine.
+; It dumps the current memory bytes based on the current address. Note that since it updates the entire
+; display, it doesn't have to clear anything
+;
+SHOWDATA:
+ jsr CLEARSYM
+
+ clrx
+ bsr GETBYTE
+ jsr PUTTOP12
+
+ ldx #1
+ bsr GETBYTE
+ jsr PUTTOP34
+
+ ldx #2
+ bsr GETBYTE
+ jsr PUTTOP56
+
+ ldx #3
+ bsr GETBYTE
+ jsr PUTMID12
+
+ ldx #4
+ bsr GETBYTE
+ jsr PUTMID34
+
+ ldx #5
+ bsr GETBYTE
+ jsr PUTMID56
+
+ lda CURRENT_LOC ; Get the high order byte of the address
+ clrx
+ bsr FMTHEX ; Put that at the start of the buffer
+ lda CURRENT_LOC+1 ; Get the low order byte of the address
+ ldx #2
+ bsr FMTHEX ; Put that next in the buffer
+
+ lda #S8_LOCATION-START
+ jmp BANNER8
+; (10) GETBYTE gets a byte from memory and formats it as a hex value
+;=======================================================================
+; Routine: GETBYTE
+; Purpose:
+; Read a byte from memory and put it into DATDIGIT1/DATDIGIT2 as hex values
+; Parameters:
+; X - Offset from location to read byte
+; CURRENT_LOC - Base location to read from
+;=======================================================================
+GETBYTE
+ txa
+ add CURRENT_LOC+1
+ sta INST_ADDRLO
+ lda CURRENT_LOC
+ adc #0
+ sta INST_ADDRHI
+ bset 6,HW_FLAGS ; Tell them that it is an EEPROM address
+ jsr GET_INST_BYTE ; Get the current byte
+ sta DATDIGIT2 ; And save it away
+ lsra ; Extract the high nibble
+ lsra
+ lsra
+ lsra
+
+ sta DATDIGIT1 ; And save it
+ lda DATDIGIT2 ; Get the byte again
+ and #$0f ; Extract the low nibble
+ sta DATDIGIT2 ; And save it
+ rts
+;
+; (11) State Table 2 Handler
+; This is called to process the state events.
+; We see SET, RESUME, DNANY4, and UPANY4 events
+;
+HANDLE_STATE2:
+ bset 1,APP_FLAGS ; Indicate that we can be suspended
+ lda BTNSTATE ; Get the event
+ cmp #EVT_UPANY4
+ beq REFRESH2
+ cmp #EVT_DNANY4 ; Is this our initial entry?
+ bne FORCEFRESH
+ lda BTN_PRESSED ; Let's see what the button they pressed was
+ cmp #EVT_PREV ; How about the PREV button
+ beq DO_PREV ; handle it
+ cmp #EVT_NEXT ; Maybe the NEXT button?
+ beq DO_NEXT ; Deal with it!
+ cmp #EVT_MODE ; Perhaps the MODE button
+ beq DO_MODE ; If so, handle it
+ ; It must be the set button, so take us out of this state
+ bsr SHOWDATA
+ lda #EVT_USER2
+ jmp POSTEVENT
+;
+; (12) This handles the update routine to change a digit...
+;
+DO_NEXT
+ bset 0,SYSFLAGS ; Mark our update direction as up
+ bra DO_UPD
+DO_PREV
+ bclr 0,SYSFLAGS ; Mark our update direction as down
+DO_UPD
+ clra
+ sta UPDATE_MIN ; Our low end is 0
+ lda #$F
+ sta UPDATE_MAX ; and the high end is 15 (the hes digits 0-F)
+ bsr GET_DISP_PARM
+ lda #UPD_DIGIT
+ jsr START_UPDATEP ; And prepare the update routine
+ bset 4,BTNFLAGS ; Mark that the update is now pending
+ rts
+;
+; (13) This is where we switch which digit we are changing...
+;
+DO_MODE
+ lda CURRENT_DIGIT
+ inca
+ and #3
+ sta CURRENT_DIGIT
+;
+; (14) Refresh the screen and start blinking the current digit...
+;
+REFRESH2
+ lda DIGIT0 ; Get the first digit
+ lsla ; *16
+ lsla
+ lsla
+ lsla
+ add DIGIT1 ; Plus the second digit
+ sta CURRENT_LOC ; To make the high byte of the address
+ lda DIGIT2 ; Get the third digit
+ lsla ; *16
+ lsla
+ lsla
+ lsla
+ add DIGIT3 ; Plus the fourth digit
+ sta CURRENT_LOC+1 ; To make the low byte of the address
+FORCEFRESH
+ bclr 7,BTNFLAGS ; Turn off any update routine that might be pending
+ jsr SHOWDATA ; Format the screen
+ ldx #4 ; We need to copy over 4 bytes from the buffer
+COPYIT
+ decx ; This will be one down.
+ lda S8_LOCATION,X ; Get the formatted byte
+ sta DIGIT0,X ; And store it for the update routine
+ tstx ; Did we copy enough bytes?
+ bne COPYIT ; No, go back for more
+ bsr GET_DISP_PARM ; Get the parm for the blink routine
+ lda #BLINK_DIGIT ; Request to blink a digit
+ jsr START_BLINKP ; And do it
+ bset 2,BTNFLAGS ; Mark a blink routine as pending
+ rts
+;
+; (15) This gets the parameters for an UPDATE/BLINK routine
+;
+GET_DISP_PARM
+ lda CURRENT_DIGIT ; Figure out what digit we are dumping
+ sta UPDATE_POS ; Store it for the BLINK/UPDATE routine
+ add #DIGIT0 ; Point to the byte to be updated
+ tax ; And put it into X as needed for the parameter
+ rts
+;
+; (16) This is the main initialization routine which is called when we first get the app into memory
+;
+MAIN:
+ lda #$c0 ; We want button beeps and to indicate that we have been loaded
+ sta WRISTAPP_FLAGS
+ clr CURRENT_DIGIT ; Start out on the first digit
+ rts
diff --git a/from_toebes/promdump/promdump.known_good b/from_toebes/promdump/promdump.known_good
new file mode 120000
index 0000000..850cce5
--- /dev/null
+++ b/from_toebes/promdump/promdump.known_good
@@ -0,0 +1 @@
+promdump.zap.app \ No newline at end of file
diff --git a/from_toebes/promdump/promdump.zap b/from_toebes/promdump/promdump.zap
new file mode 100644
index 0000000..d4548a2
--- /dev/null
+++ b/from_toebes/promdump/promdump.zap
@@ -0,0 +1,33 @@
+TDL0707972¬
+Prom Dump¬
+promdump¬
+Prom Dumper - by John A. Toebes, VIII
+This Prom Dump routine shows you what is in the EEProm
+
+ Press the NEXT/PREV buttons to advance/backup by 6 bytes of memory at a time
+ Press the SET button to change the location in memory where you are dumping.
+
+TIP: Download your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!¬
+watchapp.hlp¬
+106¬
+none¬
+Timex Data Link 150 Watch¬
+CC02B1819D9D819D9D819D9D819D9DD6014381CC017500CC01A21ACC0236220E0E161700140D1914160E170A0A0A0A24242424001B84001AFF001FFF0080830183830101FFFF02FF0237FFFF1D00A5FF001F80011D021AFF0286FF02A6FF0239FF001D0000128FB691A11B2658CD577AA61FCD587EA625CD58A8A648CC584CD7013BA40FD7013CD6013B44444444D7013B81B691A11F27081161A18326021061016112C60174A006C70174C60173A200C701732010A606CB0174C70174C60173A900C70173CD579F5FAD38CD58E0AE01AD31CD58F0AE02AD2ACD5900AE03AD23CD5910AE04AD1CCD5920AE05AD15CD5930C601735FAD88C60174AE02AD81A62BCC58459FCB0174C70438C60173A900C704371C9ECD50EBB7A344444444B7A2B6A3A40FB7A381128FB691A1A6273AA186264CC604C3A1032713A100270BA1012720AD82A639CC4E89109F2002119F4FC704F4A60FC704F5AD3FA608CD57C7189081B6624CA403B762B66348484848BB64C70173B66548484848BB66C701741F90CD01D5AE045AD6013BE7635D26F7AD08A60BCD55BF149081B662C704F3AB639781A6C0B7963F6281¬
+32695¬
+0¬
+Prom Dump¬
+promdump¬
+Prom Dumper - by John A. Toebes, VIII
+This Prom Dump routine shows you what is in the EEProm
+
+ Press the NEXT/PREV buttons to advance/backup by 6 bytes of memory at a time
+ Press the SET button to change the location in memory where you are dumping.
+
+TIP: Download your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!¬
+watchapp.hlp¬
+106¬
+none¬
+Timex Data Link 150s Watch¬
+CC02B1819D9D819D9D819D9D819D9DD6014381CC017500CC01A21ACC0236220E0E161700140D1914160E170A0A0A0A24242424001B84001AFF001FFF0080830183830101FFFF02FF0237FFFF1D00A5FF001F80011D021AFF0286FF02A6FF0239FF001D0000128FB691A11B2658CD5AA0A61FCD577FA625CD57A9A648CC574DD7013BA40FD7013CD6013B44444444D7013B81B691A11F27081161A18326021061016112C60174A006C70174C60173A200C701732010A606CB0174C70174C60173A900C70173CD5ACB5FAD38CD57E1AE01AD31CD57F1AE02AD2ACD5801AE03AD23CD5811AE04AD1CCD5821AE05AD15CD5831C601735FAD88C60174AE02AD81A62BCC57469FCB0174C70438C60173A900C704371C9ECD50DAB7A344444444B7A2B6A3A40FB7A381128FB691A1A6273AA186264CC604C3A1032713A100270BA1012720AD82A639CC4E78109F2002119F4FC704F4A60FC704F5AD3FA608CD56C8189081B6624CA403B762B66348484848BB64C70173B66548484848BB66C701741F90CD01D5AE045AD6013BE7635D26F7AD08A60BCD55AE149081B662C704F3AB639781A6C0B7963F6281¬
+41871¬
+0¬ \ No newline at end of file
diff --git a/from_toebes/promdump/promdump.zsm b/from_toebes/promdump/promdump.zsm
new file mode 100644
index 0000000..e050804
--- /dev/null
+++ b/from_toebes/promdump/promdump.zsm
@@ -0,0 +1,336 @@
+;Name: Prom Dump
+;Version: promdump
+;Description: Prom Dumper - by John A. Toebes, VIII
+;This Prom Dump routine shows you what is in the EEProm
+;
+; Press the NEXT/PREV buttons to advance/backup by 6 bytes of memory at a time
+; Press the SET button to change the location in memory where you are dumping.
+;
+;TIP: Download your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!
+;HelpFile: watchapp.hlp
+;HelpTopic: 106
+ INCLUDE "WRISTAPP.I"
+;
+; (1) Program specific constants
+;
+FLAGBYTE EQU $61
+; Bit 0 indicates the direction of the last button
+; The other bits are not used
+CURRENT_DIGIT EQU $62
+DIGIT0 EQU $63
+DIGIT1 EQU $64
+DIGIT2 EQU $65
+DIGIT3 EQU $66
+;
+; These should have been in the Wristapp.i files, but I forgot them...
+;
+INST_ADDRHI EQU $0437
+INST_ADDRLO EQU $0438
+HW_FLAGS EQU $9e
+;
+;
+; (2) System entry point vectors
+;
+START EQU *
+L0110: jmp MAIN ; The main entry point - WRIST_MAIN
+L0113: rts ; Called when we are suspended for any reason - WRIST_SUSPEND
+ nop
+ nop
+L0116: rts ; Called to handle any timers or time events - WRIST_DOTIC
+ nop
+ nop
+L0119: rts ; Called when the COMM app starts and we have timers pending - WRIST_INCOMM
+ nop
+ nop
+L011c: rts ; Called when the COMM app loads new data - WRIST_NEWDATA
+ nop
+ nop
+
+L011f: lda STATETAB0,X ; The state table get routine - WRIST_GETSTATE
+ rts
+
+L0123: jmp HANDLE_STATE0
+ db STATETAB0-STATETAB0
+L0127: jmp HANDLE_STATE1
+ db STATETAB1-STATETAB0
+L012b: jmp HANDLE_STATE2
+ db STATETAB2-STATETAB0
+;
+; (3) Program strings
+;
+S6_EEPROM: timex6 "EEPROM"
+S6_DUMPER: timex6 "DUMPER"
+S8_LOCATION timex "aaaa "
+;
+; (4) State Table
+;
+STATETAB0:
+ db 0
+ db EVT_ENTER,TIM2_12TIC,0 ; Initial state
+ db EVT_RESUME,TIM_ONCE,0 ; Resume from a nested app
+ db EVT_TIMER2,TIM_ONCE,0 ; This is the timer
+ db EVT_DNNEXT,TIM2_8TIC,1 ; Next button
+ db EVT_DNPREV,TIM2_8TIC,1 ; Prev button
+ db EVT_MODE,TIM_ONCE,$FF ; Mode button
+ db EVT_SET,TIM_ONCE,2 ; Set button
+ db EVT_USER0,TIM_ONCE,$FF ; Return to system
+ db EVT_END
+
+STATETAB1:
+ db 0
+ db EVT_UPANY,TIM_ONCE,0 ; Releasing the prev or next button
+ db EVT_TIMER2,TIM2_TIC,1 ; Repeat operation with a timer
+ db EVT_END ; End of table
+
+STATETAB2:
+ db 2
+ db EVT_RESUME,TIM_ONCE,2 ; Resume from a nested app
+ db EVT_DNANY4,TIM_ONCE,2 ; NEXT, PREV, SET, MODE button pressed
+ db EVT_UPANY4,TIM_ONCE,2 ; NEXT, PREV, SET, MODE button released
+ db EVT_USER2,TIM_ONCE,0 ; Return to state 0
+ db EVT_END ; End of table
+
+CURRENT_LOC
+ dw $0000 ; This is where we start in memory
+;
+; (5) State Table 0 Handler
+; This is called to process the state events.
+; We see ENTER, TIMER2, and RESUME events
+;
+HANDLE_STATE0:
+ bset 1,APP_FLAGS ; Indicate that we can be suspended
+ lda BTNSTATE ; Get the event
+ cmp #EVT_ENTER ; Is this the initial state?
+ bne SHOWDATA ; no, just clean up the screen
+;
+; (6) Put up the initial banner screen
+;
+ jsr CLEARALL ; Clear the display
+ lda #S6_EEPROM-START ; Put 'EEPROM' on the top line
+ jsr PUT6TOP
+ lda #S6_DUMPER-START ; Put 'DUMPER' on the second line
+ jsr PUT6MID
+ lda #SYS8_MODE ; Put MODE on the bottom line
+ jmp PUTMSGBOT
+; (7) FMTHEX is a routine similar to FMTX, but it handles hex values instead
+;=======================================================================
+; Routine: FMTHEX
+; Purpose:
+; Format a byte into the buffer
+; Parameters:
+; A - Byte to be formatted
+; X - Offset into Message buffer to put the byte
+;=======================================================================
+FMTHEX:
+ sta S8_LOCATION,X ; Save the byte
+ and #$0f ; Extract the bottom nibble
+ sta S8_LOCATION+1,X ; Save the hex value of the nibble
+ lda S8_LOCATION,X ; Get the value once again
+ lsra ; Shift right by 4 to get the high order nibble
+ lsra
+ lsra
+ lsra
+
+ sta S8_LOCATION,X ; And put it back into the buffer
+ rts
+;
+; (8) This is called when we press the prev/next button or when the timer fires during that event
+;
+HANDLE_STATE1:
+ lda BTNSTATE
+ cmp #EVT_TIMER2 ; Is this a repeat/timer event?
+ beq REPEATBTN ; yes, do as they asked
+
+ bclr 0,FLAGBYTE ; Assume that they hit the prev button
+ cmp #EVT_DNPREV ; Did they hit the prev button
+ bne REPEATBTN ; Yes, we guessed right
+ bset 0,FLAGBYTE ; No, they hit next. Mark the direction.
+REPEATBTN:
+ brclr 0,FLAGBYTE,NEXTLOC ; If they hit the next button, go do that operation
+;
+; They pressed the prev button, let's go to the previous location
+;
+PREVLOC:
+ lda CURRENT_LOC+1
+ sub #6
+ sta CURRENT_LOC+1
+ lda CURRENT_LOC
+ sbc #0
+ sta CURRENT_LOC
+ bra SHOWDATA
+NEXTLOC:
+ lda #6
+ add CURRENT_LOC+1
+ sta CURRENT_LOC+1
+ lda CURRENT_LOC
+ adc #0
+ sta CURRENT_LOC
+;
+; (9) This is the main screen update routine.
+; It dumps the current memory bytes based on the current address. Note that since it updates the entire
+; display, it doesn't have to clear anything
+;
+SHOWDATA:
+ jsr CLEARSYM
+
+ clrx
+ bsr GETBYTE
+ jsr PUTTOP12
+
+ ldx #1
+ bsr GETBYTE
+ jsr PUTTOP34
+
+ ldx #2
+ bsr GETBYTE
+ jsr PUTTOP56
+
+ ldx #3
+ bsr GETBYTE
+ jsr PUTMID12
+
+ ldx #4
+ bsr GETBYTE
+ jsr PUTMID34
+
+ ldx #5
+ bsr GETBYTE
+ jsr PUTMID56
+
+ lda CURRENT_LOC ; Get the high order byte of the address
+ clrx
+ bsr FMTHEX ; Put that at the start of the buffer
+ lda CURRENT_LOC+1 ; Get the low order byte of the address
+ ldx #2
+ bsr FMTHEX ; Put that next in the buffer
+
+ lda #S8_LOCATION-START
+ jmp BANNER8
+; (10) GETBYTE gets a byte from memory and formats it as a hex value
+;=======================================================================
+; Routine: GETBYTE
+; Purpose:
+; Read a byte from memory and put it into DATDIGIT1/DATDIGIT2 as hex values
+; Parameters:
+; X - Offset from location to read byte
+; CURRENT_LOC - Base location to read from
+;=======================================================================
+GETBYTE
+ txa
+ add CURRENT_LOC+1
+ sta INST_ADDRLO
+ lda CURRENT_LOC
+ adc #0
+ sta INST_ADDRHI
+ bset 6,HW_FLAGS ; Tell them that it is an EEPROM address
+ jsr GET_INST_BYTE ; Get the current byte
+ sta DATDIGIT2 ; And save it away
+ lsra ; Extract the high nibble
+ lsra
+ lsra
+ lsra
+
+ sta DATDIGIT1 ; And save it
+ lda DATDIGIT2 ; Get the byte again
+ and #$0f ; Extract the low nibble
+ sta DATDIGIT2 ; And save it
+ rts
+;
+; (11) State Table 2 Handler
+; This is called to process the state events.
+; We see SET, RESUME, DNANY4, and UPANY4 events
+;
+HANDLE_STATE2:
+ bset 1,APP_FLAGS ; Indicate that we can be suspended
+ lda BTNSTATE ; Get the event
+ cmp #EVT_UPANY4
+ beq REFRESH2
+ cmp #EVT_DNANY4 ; Is this our initial entry?
+ bne FORCEFRESH
+ lda BTN_PRESSED ; Let's see what the button they pressed was
+ cmp #EVT_PREV ; How about the PREV button
+ beq DO_PREV ; handle it
+ cmp #EVT_NEXT ; Maybe the NEXT button?
+ beq DO_NEXT ; Deal with it!
+ cmp #EVT_MODE ; Perhaps the MODE button
+ beq DO_MODE ; If so, handle it
+ ; It must be the set button, so take us out of this state
+ bsr SHOWDATA
+ lda #EVT_USER2
+ jmp POSTEVENT
+;
+; (12) This handles the update routine to change a digit...
+;
+DO_NEXT
+ bset 0,SYSFLAGS ; Mark our update direction as up
+ bra DO_UPD
+DO_PREV
+ bclr 0,SYSFLAGS ; Mark our update direction as down
+DO_UPD
+ clra
+ sta UPDATE_MIN ; Our low end is 0
+ lda #$F
+ sta UPDATE_MAX ; and the high end is 15 (the hes digits 0-F)
+ bsr GET_DISP_PARM
+ lda #UPD_DIGIT
+ jsr START_UPDATEP ; And prepare the update routine
+ bset 4,BTNFLAGS ; Mark that the update is now pending
+ rts
+;
+; (13) This is where we switch which digit we are changing...
+;
+DO_MODE
+ lda CURRENT_DIGIT
+ inca
+ and #3
+ sta CURRENT_DIGIT
+;
+; (14) Refresh the screen and start blinking the current digit...
+;
+REFRESH2
+ lda DIGIT0 ; Get the first digit
+ lsla ; *16
+ lsla
+ lsla
+ lsla
+ add DIGIT1 ; Plus the second digit
+ sta CURRENT_LOC ; To make the high byte of the address
+ lda DIGIT2 ; Get the third digit
+ lsla ; *16
+ lsla
+ lsla
+ lsla
+ add DIGIT3 ; Plus the fourth digit
+ sta CURRENT_LOC+1 ; To make the low byte of the address
+FORCEFRESH
+ bclr 7,BTNFLAGS ; Turn off any update routine that might be pending
+ jsr SHOWDATA ; Format the screen
+ ldx #4 ; We need to copy over 4 bytes from the buffer
+COPYIT
+ decx ; This will be one down.
+ lda S8_LOCATION,X ; Get the formatted byte
+ sta DIGIT0,X ; And store it for the update routine
+ tstx ; Did we copy enough bytes?
+ bne COPYIT ; No, go back for more
+ bsr GET_DISP_PARM ; Get the parm for the blink routine
+ lda #BLINK_DIGIT ; Request to blink a digit
+ jsr START_BLINKP ; And do it
+ bset 2,BTNFLAGS ; Mark a blink routine as pending
+ rts
+;
+; (15) This gets the parameters for an UPDATE/BLINK routine
+;
+GET_DISP_PARM
+ lda CURRENT_DIGIT ; Figure out what digit we are dumping
+ sta UPDATE_POS ; Store it for the BLINK/UPDATE routine
+ add #DIGIT0 ; Point to the byte to be updated
+ tax ; And put it into X as needed for the parameter
+ rts
+;
+; (16) This is the main initialization routine which is called when we first get the app into memory
+;
+MAIN:
+ lda #$c0 ; We want button beeps and to indicate that we have been loaded
+ sta WRISTAPP_FLAGS
+ clr CURRENT_DIGIT ; Start out on the first digit
+ rts
diff --git a/from_toebes/shipbell/shipbell.asm b/from_toebes/shipbell/shipbell.asm
new file mode 100644
index 0000000..6d9f11b
--- /dev/null
+++ b/from_toebes/shipbell/shipbell.asm
@@ -0,0 +1,176 @@
+;Name: Ships Bells
+;Version: SHIPBELL
+;Description: Ships bells - by John A. Toebes, VIII
+;This application turns makes the hour chime with nautical bells.
+;
+;TIP: Download your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!
+;HelpFile: watchapp.hlp
+;HelpTopic: 106
+ INCLUDE "WRISTAPP.I"
+;
+; (1) Program specific constants
+;
+START EQU *
+CHANGE_FLAGS EQU $92 ; System Flags
+SND_POS EQU $61
+SND_REMAIN EQU $62
+SND_NOTE EQU $63
+
+NOTE_PAUSE EQU (TONE_PAUSE/16)
+NOTE_BELL EQU (TONE_MID_C/16)
+;
+; (2) System entry point vectors
+;
+L0110: jmp MAIN ; The main entry point - WRIST_MAIN
+L0113: rts ; Called when we are suspended for any reason - WRIST_SUSPEND
+ nop
+ nop
+L0116: jmp CHECKSTATE ; Called to handle any timers or time events - WRIST_DOTIC
+L0119: jmp STOPIT ; Called when the COMM app starts and we have timers pending - WRIST_INCOMM
+L011c: rts
+ nop
+ nop ; Called when the COMM app loads new data - WRIST_NEWDATA
+
+L011f: lda STATETAB,X ; The state table get routine - WRIST_GETSTATE
+ rts
+
+L0123: jmp HANDLE_STATE0
+ db STATETAB-STATETAB
+;
+; (3) Program strings
+;
+S6_SHIPS: timex6 "SHIPS"
+S6_BELLS: timex6 " BELLS"
+S8_TOEBES: timex "J.TOEBES"
+;
+; Here is the pattern for the ships bells. We want to have a short bell followed by a very short silence
+; followed by a longer bell. We use 3 tics for the short bell, 1 tic for the silence and 6 tics for the longer
+; bell. The last bell is 7 ticks.
+; We then have to byte swap each of these because the BRSET instruction numbers from bottom to top.
+;
+; The string looks like:
+; 111 0 111111 000000 111 0 111111 000000 111 0 111111 000000 111 0 111111 000000
+; Taking this into clumps of 4 bytes, we get
+; 1110 1111 1100 0000 1110 1111 1100 0000 1110 1111 1100 0000 1110 1111 1100 0000 1111 1110
+;
+Pattern DB $F7 ;1110 1111 ; 8 start here
+ DB $03 ;1100 0000
+P67 DB $F7 ;1110 1111 ; 6, 7 start here
+ DB $03 ;1100 0000
+P45 DB $F7 ;1110 1111 ; 4, 5 start here
+ DB $03 ;1100 0000
+P23 DB $F7 ;1110 1111 ; 2, 3 start here
+ DB $03 ;1100 0000
+P1 DB $7F ;1111 1110 ; 1 starts here
+;
+; This table indexes where we start playing the tone from
+;
+STARTS
+ DB (Pattern-Pattern)*8 ; 0 (8 AM, 4PM, Midnight)
+ DB (P1-Pattern)*8 ; 1 (1 AM, 9AM, 5PM)
+ DB (P23-Pattern)*8 ; 2 (2 AM, 10AM, 6PM)
+ DB (P23-Pattern)*8 ; 3 (3 AM, 11AM, 7PM)
+ DB (P45-Pattern)*8 ; 4 (4 AM, NOON, 8PM)
+ DB (P45-Pattern)*8 ; 5 (5 AM, 1PM, 9PM)
+ DB (P67-Pattern)*8 ; 6 (6 AM, 2PM, 10PM)
+ DB (P67-Pattern)*8 ; 7 (7 AM, 3PM, 11PM)
+;
+; (4) State Table
+;
+STATETAB:
+ db 0
+ db EVT_ENTER,TIM_LONG,0 ; Initial state
+ db EVT_RESUME,TIM_ONCE,0 ; Resume from a nested app
+ db EVT_MODE,TIM_ONCE,$FF ; Mode button
+ db EVT_END
+;
+; (5) State Table 0 Handler
+; This is called to process the state events.
+; We see ENTER and RESUME events
+;
+HANDLE_STATE0:
+ bset 1,APP_FLAGS ; Allow us to be suspended
+ jsr CLEARALL ; Clear the display
+ lda #S6_SHIPS-START ; Put 'SHIPS ' on the top line
+ jsr PUT6TOP
+ lda #S6_BELLS-START ; Put ' BELLS' on the second line
+ jsr PUT6MID
+ bsr FORCESTATE ; Just for fun, check the alarm state
+ lda #S8_TOEBES-START
+ jmp BANNER8
+;
+; (6) This is the main initialization routine which is called when we first get the app into memory
+;
+MAIN:
+ lda #$C4 ; Bit2 = wristapp wants a call once an hour when it changes (WRIST_DOTIC) (SET=CALL)
+ ; Bit6 = Uses system rules for button beep decisions (SET=SYSTEM RULES)
+ ; Bit7 = Wristapp has been loaded (SET=LOADED)
+ sta WRISTAPP_FLAGS
+ bclr 2,MODE_FLAGS ; Turn off the hourly chimes
+ clr SND_REMAIN
+;
+; (7) Determining the current hour
+;
+CHECKSTATE
+ brclr 5,CHANGE_FLAGS,NO_HOUR ; Have we hit the hour mark?
+FORCESTATE
+ bclr 3,MAIN_FLAGS ; Make sure we don't play the system hourly chimes
+ jsr ACQUIRE ; Lock so that it doesn't change under us
+ lda TZ1_HOUR ; Assume that we are using the first timezone
+ jsr CHECK_TZ ; See which one we are really using
+ bcc GOT_TZ1 ; If we were right, just skip on to do the work
+ lda TZ2_HOUR ; Wrong guess, just load up the second time zone
+GOT_TZ1
+;
+; 12 1 2 3 4 5 6 7 8 9 10 11 12 1 2 3 4 5 6 7 8 9 10 11 12
+; 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 18
+; deca FF 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17
+; anda 07 00 01 02 03 04 05 06 07 00 01 02 03 04 05 06 07 00 01 02 03 04 05 06 07
+ and #7 ; Convert the hour to the number of bells
+ tax ; Save away as an index into the start position table
+ bne NOTEIGHT ; Is it midnight (or a multiple of 8)
+ lda #8 ; Yes, so that is 8 bells, not zero
+NOTEIGHT
+ lsla ; Multiple the number of bells by 8 to get the length
+ lsla
+ lsla
+ sta SND_REMAIN ; Save away the number of bells left to play
+ lda STARTS,X ; Point to the pattern of the first bell
+ sta SND_POS
+ bset 1,BTNFLAGS ; Turn on the tic timer
+ JMP RELEASE ; And release our lock on the time
+;
+; (8) Playing the next note piece
+;
+NO_HOUR
+ lda SND_REMAIN ; Do we have any more notes to play?
+ bne _DO_SOUND ; No, skip out
+STOPIT
+ lda #TONE_PAUSE ; End of the line, shut up the sound hardware
+ sta $28
+ clr SND_REMAIN ; Force us to quit looking at sound
+ bclr 1,BTNFLAGS ; and turn off the tic timer
+ rts
+
+_DO_SOUND
+ deca ; Yes, note that we used one up
+ sta SND_REMAIN
+ lda SND_POS ; See where we are in the sound
+ lsra ; Divide by 8 to get the byte pointer
+ lsra
+ lsra
+ tax ; and make it an index
+ lda Pattern,X ; Get the current pattern byte
+ sta SND_NOTE ; And save it where we can test it
+ lda SND_POS ; Get the pointer to where we are in the sound
+ inc SND_POS ; Advance to the next byte
+ and #7 ; and hack off the high bytes to leave the bit index
+ lsla ; Convert that to a BRSET instruction
+ sta TSTNOTE ; And self modify our code so we can play
+TSTNOTE brset 0,SND_NOTE,PLAYIT ; If the note is not set, skip out
+ lda #TONE_PAUSE ; Not playing, we want to have silence
+ brskip2
+PLAYIT lda #NOTE_BELL ; Playing, select the bell tone
+ sta $28 ; And make it play
+NO_SOUND
+ rts
diff --git a/from_toebes/shipbell/shipbell.known_good b/from_toebes/shipbell/shipbell.known_good
new file mode 120000
index 0000000..35fe6a8
--- /dev/null
+++ b/from_toebes/shipbell/shipbell.known_good
@@ -0,0 +1 @@
+shipbell.zap.app \ No newline at end of file
diff --git a/from_toebes/shipbell/shipbell.zap b/from_toebes/shipbell/shipbell.zap
new file mode 100644
index 0000000..3c03502
--- /dev/null
+++ b/from_toebes/shipbell/shipbell.zap
@@ -0,0 +1,27 @@
+TDL0831972¬
+Ships Bells¬
+SHIPBELL¬
+Ships bells - by John A. Toebes, VIII
+This application turns makes the hour chime with nautical bells.
+
+TIP: Download your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!¬
+watchapp.hlp¬
+106¬
+none¬
+Timex Data Link 150 Watch¬
+CC016C819D9DCC0174CC019F819D9DD6014B81CC01560005110116051D0B0E13130513321D180E0B0E1CF703F703F703F7037F0040303020201010001B84001AFF0001FFFF1D128FCD577AA617CD587EA61CCD58A8AD10A622CC5845A6C4B79615683F620B92241795CD68E8B6B0CD690E2402B6B9A407972602A608484848B762D60143B7611290CC68F2B6622609A6F0B7283F621390814AB762B66144444497D6013AB763B6613C61A40748C701C0006303A6F0C5A603B72881¬
+13690¬
+0¬
+Ships Bells¬
+SHIPBELL¬
+Ships bells - by John A. Toebes, VIII
+This application turns makes the hour chime with nautical bells.
+
+TIP: Download your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!¬
+watchapp.hlp¬
+106¬
+none¬
+Timex Data Link 150s Watch¬
+CC016C819D9DCC0174CC019F819D9DD6014B81CC01560005110116051D0B0E13130513321D180E0B0E1CF703F703F703F7037F0040303020201010001B84001AFF0001FFFF1D128FCD5AA0A617CD577FA61CCD57A9AD10A622CC5746A6C4B79615683F620B92241795CD68F1B6B0CD69172402B6B9A407972602A608484848B762D60143B7611290CC68FBB6622609A6F0B7283F621390814AB762B66144444497D6013AB763B6613C61A40748C701C0006303A6F0C5A603B72881¬
+41038¬
+0¬ \ No newline at end of file
diff --git a/from_toebes/shipbell/shipbell.zsm b/from_toebes/shipbell/shipbell.zsm
new file mode 100644
index 0000000..b81652a
--- /dev/null
+++ b/from_toebes/shipbell/shipbell.zsm
@@ -0,0 +1,176 @@
+;Name: Ships Bells
+;Version: SHIPBELL
+;Description: Ships bells - by John A. Toebes, VIII
+;This application turns makes the hour chime with nautical bells.
+;
+;TIP: Download your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!
+;HelpFile: watchapp.hlp
+;HelpTopic: 106
+ INCLUDE "WRISTAPP.I"
+;
+; (1) Program specific constants
+;
+START EQU *
+CHANGE_FLAGS EQU $92 ; System Flags
+SND_POS EQU $61
+SND_REMAIN EQU $62
+SND_NOTE EQU $63
+
+NOTE_PAUSE EQU (TONE_PAUSE/16)
+NOTE_BELL EQU (TONE_MID_C/16)
+;
+; (2) System entry point vectors
+;
+L0110: jmp MAIN ; The main entry point - WRIST_MAIN
+L0113: rts ; Called when we are suspended for any reason - WRIST_SUSPEND
+ nop
+ nop
+L0116: jmp CHECKSTATE ; Called to handle any timers or time events - WRIST_DOTIC
+L0119: jmp STOPIT ; Called when the COMM app starts and we have timers pending - WRIST_INCOMM
+L011c: rts
+ nop
+ nop ; Called when the COMM app loads new data - WRIST_NEWDATA
+
+L011f: lda STATETAB,X ; The state table get routine - WRIST_GETSTATE
+ rts
+
+L0123: jmp HANDLE_STATE0
+ db STATETAB-STATETAB
+;
+; (3) Program strings
+;
+S6_SHIPS: timex6 "SHIPS"
+S6_BELLS: timex6 " BELLS"
+S8_TOEBES: timex "J.TOEBES"
+;
+; Here is the pattern for the ships bells. We want to have a short bell followed by a very short silence
+; followed by a longer bell. We use 3 tics for the short bell, 1 tic for the silence and 6 tics for the longer
+; bell. The last bell is 7 ticks.
+; We then have to byte swap each of these because the BRSET instruction numbers from bottom to top.
+;
+; The string looks like:
+; 111 0 111111 000000 111 0 111111 000000 111 0 111111 000000 111 0 111111 000000
+; Taking this into clumps of 4 bytes, we get
+; 1110 1111 1100 0000 1110 1111 1100 0000 1110 1111 1100 0000 1110 1111 1100 0000 1111 1110
+;
+Pattern DB $F7 ;1110 1111 ; 8 start here
+ DB $03 ;1100 0000
+P67 DB $F7 ;1110 1111 ; 6, 7 start here
+ DB $03 ;1100 0000
+P45 DB $F7 ;1110 1111 ; 4, 5 start here
+ DB $03 ;1100 0000
+P23 DB $F7 ;1110 1111 ; 2, 3 start here
+ DB $03 ;1100 0000
+P1 DB $7F ;1111 1110 ; 1 starts here
+;
+; This table indexes where we start playing the tone from
+;
+STARTS
+ DB (Pattern-Pattern)*8 ; 0 (8 AM, 4PM, Midnight)
+ DB (P1-Pattern)*8 ; 1 (1 AM, 9AM, 5PM)
+ DB (P23-Pattern)*8 ; 2 (2 AM, 10AM, 6PM)
+ DB (P23-Pattern)*8 ; 3 (3 AM, 11AM, 7PM)
+ DB (P45-Pattern)*8 ; 4 (4 AM, NOON, 8PM)
+ DB (P45-Pattern)*8 ; 5 (5 AM, 1PM, 9PM)
+ DB (P67-Pattern)*8 ; 6 (6 AM, 2PM, 10PM)
+ DB (P67-Pattern)*8 ; 7 (7 AM, 3PM, 11PM)
+;
+; (4) State Table
+;
+STATETAB:
+ db 0
+ db EVT_ENTER,TIM_LONG,0 ; Initial state
+ db EVT_RESUME,TIM_ONCE,0 ; Resume from a nested app
+ db EVT_MODE,TIM_ONCE,$FF ; Mode button
+ db EVT_END
+;
+; (5) State Table 0 Handler
+; This is called to process the state events.
+; We see ENTER and RESUME events
+;
+HANDLE_STATE0:
+ bset 1,APP_FLAGS ; Allow us to be suspended
+ jsr CLEARALL ; Clear the display
+ lda #S6_SHIPS-START ; Put 'SHIPS ' on the top line
+ jsr PUT6TOP
+ lda #S6_BELLS-START ; Put ' BELLS' on the second line
+ jsr PUT6MID
+ bsr FORCESTATE ; Just for fun, check the alarm state
+ lda #S8_TOEBES-START
+ jmp BANNER8
+;
+; (6) This is the main initialization routine which is called when we first get the app into memory
+;
+MAIN:
+ lda #$C4 ; Bit2 = wristapp wants a call once an hour when it changes (WRIST_DOTIC) (SET=CALL)
+ ; Bit6 = Uses system rules for button beep decisions (SET=SYSTEM RULES)
+ ; Bit7 = Wristapp has been loaded (SET=LOADED)
+ sta WRISTAPP_FLAGS
+ bclr 2,MODE_FLAGS ; Turn off the hourly chimes
+ clr SND_REMAIN
+;
+; (7) Determining the current hour
+;
+CHECKSTATE
+ brclr 5,CHANGE_FLAGS,NO_HOUR ; Have we hit the hour mark?
+FORCESTATE
+ bclr 3,MAIN_FLAGS ; Make sure we don't play the system hourly chimes
+ jsr ACQUIRE ; Lock so that it doesn't change under us
+ lda TZ1_HOUR ; Assume that we are using the first timezone
+ jsr CHECK_TZ ; See which one we are really using
+ bcc GOT_TZ1 ; If we were right, just skip on to do the work
+ lda TZ2_HOUR ; Wrong guess, just load up the second time zone
+GOT_TZ1
+;
+; 12 1 2 3 4 5 6 7 8 9 10 11 12 1 2 3 4 5 6 7 8 9 10 11 12
+; 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 18
+; deca FF 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17
+; anda 07 00 01 02 03 04 05 06 07 00 01 02 03 04 05 06 07 00 01 02 03 04 05 06 07
+ and #7 ; Convert the hour to the number of bells
+ tax ; Save away as an index into the start position table
+ bne NOTEIGHT ; Is it midnight (or a multiple of 8)
+ lda #8 ; Yes, so that is 8 bells, not zero
+NOTEIGHT
+ lsla ; Multiple the number of bells by 8 to get the length
+ lsla
+ lsla
+ sta SND_REMAIN ; Save away the number of bells left to play
+ lda STARTS,X ; Point to the pattern of the first bell
+ sta SND_POS
+ bset 1,BTNFLAGS ; Turn on the tic timer
+ JMP RELEASE ; And release our lock on the time
+;
+; (8) Playing the next note piece
+;
+NO_HOUR
+ lda SND_REMAIN ; Do we have any more notes to play?
+ bne DO_SOUND ; No, skip out
+STOPIT
+ lda #TONE_PAUSE ; End of the line, shut up the sound hardware
+ sta $28
+ clr SND_REMAIN ; Force us to quit looking at sound
+ bclr 1,BTNFLAGS ; and turn off the tic timer
+ rts
+
+DO_SOUND
+ deca ; Yes, note that we used one up
+ sta SND_REMAIN
+ lda SND_POS ; See where we are in the sound
+ lsra ; Divide by 8 to get the byte pointer
+ lsra
+ lsra
+ tax ; and make it an index
+ lda Pattern,X ; Get the current pattern byte
+ sta SND_NOTE ; And save it where we can test it
+ lda SND_POS ; Get the pointer to where we are in the sound
+ inc SND_POS ; Advance to the next byte
+ and #7 ; and hack off the high bytes to leave the bit index
+ lsla ; Convert that to a BRSET instruction
+ sta TSTNOTE ; And self modify our code so we can play
+TSTNOTE brset 0,SND_NOTE,PLAYIT ; If the note is not set, skip out
+ lda #TONE_PAUSE ; Not playing, we want to have silence
+ brskip2
+PLAYIT lda #NOTE_BELL ; Playing, select the bell tone
+ sta $28 ; And make it play
+NO_SOUND
+ rts \ No newline at end of file
diff --git a/from_toebes/sound1/sound1.asm b/from_toebes/sound1/sound1.asm
new file mode 120000
index 0000000..473c21a
--- /dev/null
+++ b/from_toebes/sound1/sound1.asm
@@ -0,0 +1 @@
+sound1.zsm \ No newline at end of file
diff --git a/from_toebes/sound1/sound1.known_good b/from_toebes/sound1/sound1.known_good
new file mode 100644
index 0000000..5668f3f
--- /dev/null
+++ b/from_toebes/sound1/sound1.known_good
Binary files differ
diff --git a/from_toebes/sound1/sound1.spc b/from_toebes/sound1/sound1.spc
new file mode 100644
index 0000000..7b008c8
--- /dev/null
+++ b/from_toebes/sound1/sound1.spc
Binary files differ
diff --git a/from_toebes/sound1/sound1.zsm b/from_toebes/sound1/sound1.zsm
new file mode 100644
index 0000000..36c08fc
--- /dev/null
+++ b/from_toebes/sound1/sound1.zsm
@@ -0,0 +1,83 @@
+;Sound: Datalink Default
+;Version: Sound1
+;
+; This sample corresponds to the default sounds that you get when you reset a datalink
+; watch to its default state.
+;
+;****************************************************************************************
+;* Copyright (C) 1997 John A. Toebes, VIII *
+;* All Rights Reserved *
+;* This program may not be distributed in any form without the permission of the author *
+;* jtoebes@geocities.com *
+;****************************************************************************************
+;
+ INCLUDE "WRISTAPP.I"
+;
+; This is the default sound table
+;
+DEF_SOUNDS
+ db SP_1-SD_1 ; 0000: 08
+
+ db SD_1-DEF_SOUNDS ; 0001: 0b BUTTON BEEP
+ db SD_2-DEF_SOUNDS ; 0002: 0c RETURN TO TIME
+ db SD_3-DEF_SOUNDS ; 0003: 0d HOURLY CHIME
+ db SD_4-DEF_SOUNDS ; 0004: 0e CONFIRMATION
+ db SD_5-DEF_SOUNDS ; 0005: 0f APPOINTMENT BEEP
+ db SD_5-DEF_SOUNDS ; 0006: 0f ALARM BEEP
+ db SD_5-DEF_SOUNDS ; 0007: 0f PROGRAM DOWNLOAD
+ db SD_5-DEF_SOUNDS ; 0008: 0f EXTRA
+ db SD_6-DEF_SOUNDS ; 0009: 11 COMM ERROR
+ db SD_7-DEF_SOUNDS ; 000a: 12 COMM DONE
+;
+; This is the soundlet count table which contains the duration
+; counts for the individual soundlets
+;
+SD_1 db SND_END+1 ; 000b: 81
+SD_2 db SND_END+1 ; 000c: 81
+SD_3 db SND_END+2 ; 000d: 82
+SD_4 db SND_END+4 ; 000e: 84
+SD_5 db 10,SND_END+40 ; 000f: 0a a8
+SD_6 db SND_END+10 ; 0011: 8a
+SD_7 db SND_END+32 ; 0012: a0
+;
+; This is the soundlet pointer table which contains the pointers to the soundlets
+;
+SP_1 db SL_2-DEF_SOUNDS ; 0013: 1d
+SP_2 db SL_1-DEF_SOUNDS ; 0014: 1b
+SP_3 db SL_3-DEF_SOUNDS ; 0015: 1f
+SP_4 db SL_2-DEF_SOUNDS ; 0016: 1d
+SP_5 db SL_4-DEF_SOUNDS ; 0017: 22
+ db SL_5-DEF_SOUNDS ; 0018: 27
+SP_6 db SL_6-DEF_SOUNDS ; 0019: 2a
+SP_7 db SL_2-DEF_SOUNDS ; 001a: 1d
+;
+; These are the soundlets themselves. The +1 or other number
+; indicates the duration for the sound.
+;
+SL_1 db TONE_HI_GSHARP+1 ; 001b: 91
+ db TONE_END ; 001c: 00
+
+SL_2 db TONE_MID_C+1 ; 001d: 31
+ db TONE_END ; 001e: 00
+
+SL_3 db TONE_MID_C+2 ; 001f: 32
+ db TONE_PAUSE+2 ; 0020: f2
+ db TONE_END ; 0021: 00
+
+SL_4 db TONE_HI_C+2 ; 0022: 22
+ db TONE_PAUSE+2 ; 0023: f2
+ db TONE_HI_C+2 ; 0024: 22
+ db TONE_PAUSE+10 ; 0025: fa
+ db TONE_END ; 0026: 00
+
+SL_5 db TONE_HI_C+2 ; 0027: 22
+ db TONE_PAUSE+2 ; 0028: f2
+ db TONE_END ; 0029: 00
+
+SL_6 db TONE_HI_C+3 ; 002a: 23
+ db TONE_MID_C+3 ; 002b: 33
+ db TONE_END ; 002c: 00
+;
+; This is the tone that the comm app plays for each record
+;
+ db TONE_MID_C/16 ; 002d: 03
diff --git a/from_toebes/spend0/spend0.asm b/from_toebes/spend0/spend0.asm
new file mode 120000
index 0000000..c3e782c
--- /dev/null
+++ b/from_toebes/spend0/spend0.asm
@@ -0,0 +1 @@
+spend0.zsm \ No newline at end of file
diff --git a/from_toebes/spend0/spend0.known_good b/from_toebes/spend0/spend0.known_good
new file mode 120000
index 0000000..37d8946
--- /dev/null
+++ b/from_toebes/spend0/spend0.known_good
@@ -0,0 +1 @@
+spend0.zap.app \ No newline at end of file
diff --git a/from_toebes/spend0/spend0.zap b/from_toebes/spend0/spend0.zap
new file mode 100644
index 0000000..17bafbb
--- /dev/null
+++ b/from_toebes/spend0/spend0.zap
@@ -0,0 +1,37 @@
+TDL0801972¬
+spend watch¬
+spend0¬
+spend watch - by John A. Toebes, VIII
+This keeps track of how much is in one of 7 categories
+
+ Press the NEXT/PREV buttons to advance/backup through the categories
+ Press the SET button to add/subtract/set/clear the amounts in the categories
+ If you press the set button while the action is blinking, it will be carried out, otherwise
+ you can cancel the operation.
+
+TIP: Download your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!¬
+watchapp.hlp¬
+106¬
+SpendSet¬
+Timex Data Link 150 Watch¬
+CC03B0819D9DCC0276819D9D819D9DD601BD81CC023600CC0236140A0D0D1C1E0B1C0E1D0C151B1D181D0A152424240C0A1D01242424240C0A1D02242424240C0A1D03242424240C0A1D04242424240C0A1D05242424240C0A1D06242424240C0A1D0724242424000000000000000000000000000000000000000000000000050E130E0C180A14001915180A0C1801001505160E150D1D1A0A180C117F8585858B9100013EC7CACDD00709010C001B84001AFF001FFF0001FFFF02FF0186FF001D011AFF0186FF01A6FF0139FF001D4FB763CD03D3CD577AA691CD587EA696CD58A83F61A605B762A648CC584C006105CD577A1061A624B71D141EBE64CD594DCD5910BE65CD59513D642705BE65CD593ECD5920BE66CD593ECD5930B663484848AB27CC5845128FB691A11B27A1A186270A1390A10226023F62203BC604C32720A1022567221DB662A1042609CD0338CD03B4CD4E7A1161A605B762A639CC4E89109FC5119FB6622704A1052614AE63A607AD05CD03D3204A7C009F027A7AF4F781A103230CB6632739AE67A603ADE92031276F5FCF04F4AE63CF04F5AB6397B6624A48AB05CD57C7189081B662AE04CD6B0DB762A104260A3F673D632604A603B767CD01FDBE62D601ACCD587EBE622730A304222C029029260CAE3DA61DCD56D5B662BB6797DE01B1E664B75CE665B75DE666B75EBE62D601B8AE5CCD55BF149081AE60029009A608F7129020057A817D26FBA663AE66009F067A2AA5F720A27CF12A9E7F209BAD6DB6672720A102275625143F643F653F663D63264AAE174FD701775A2AFA81306430653066B666EBF2B766B665EBF1B765B664EBF0B764AE663D67271EAD08AD06B6642BC62018F62A06AB64F75A7A815A81F6A0642BF9F75A7C81ADF5ADF3AD0DB664E7F0B665E7F1B666E7F281B663AE0342AB879781A6C0B796B663B75F3F673F63AE02AD90A607B760B660AD0BCD03383A6026F5B65FB763ADD4E6F0B764E6F1B765E6F2B76681¬
+25663¬
+0¬
+spend watch¬
+spend0¬
+spend watch - by John A. Toebes, VIII
+This keeps track of how much is in one of 7 categories
+
+ Press the NEXT/PREV buttons to advance/backup through the categories
+ Press the SET button to add/subtract/set/clear the amounts in the categories
+ If you press the set button while the action is blinking, it will be carried out, otherwise
+ you can cancel the operation.
+
+TIP: Download your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!¬
+watchapp.hlp¬
+106¬
+SpendSet¬
+Timex Data Link 150s Watch¬
+CC03B0819D9DCC0276819D9D819D9DD601BD81CC023600CC0236140A0D0D1C1E0B1C0E1D0C151B1D181D0A152424240C0A1D01242424240C0A1D02242424240C0A1D03242424240C0A1D04242424240C0A1D05242424240C0A1D06242424240C0A1D0724242424000000000000000000000000000000000000000000000000050E130E0C180A14001915180A0C1801001505160E150D1D1A0A180C117F8585858B9100013EC7CACDD00709010C001B84001AFF001FFF0001FFFF02FF0186FF001D011AFF0186FF01A6FF0139FF001D4FB763CD03D3CD5AA0A691CD577FA696CD57A93F61A605B762A648CC574D006105CD5AA01061A622B71D141EBE64CD584ECD5811BE65CD58523D642705BE65CD583FCD5821BE66CD583FCD5831B663484848AB27CC5746128FB691A11B27A1A186270A1390A10226023F62203BC604C32720A1022567221DB662A1042609CD0338CD03B4CD4E691161A605B762A639CC4E78109FC5119FB6622704A1052614AE63A607AD05CD03D3204A7C009F027A7AF4F781A103230CB6632739AE67A603ADE92031276F5FCF04F4AE63CF04F5AB6397B6624A48AB05CD56C8189081B662AE04CD6B16B762A104260A3F673D632604A603B767CD01FDBE62D601ACCD577FBE622730A304222C029029260CAE3DA631CD59E7B662BB6797DE01B1E664B75CE665B75DE666B75EBE62D601B8AE5CCD55AE149081AE60029009A608F7129020057A817D26FBA663AE66009F067A2AA5F720A27CF12A9E7F209BAD6DB6672720A102275625143F643F653F663D63264AAE174FD701775A2AFA81306430653066B666EBF2B766B665EBF1B765B664EBF0B764AE663D67271EAD08AD06B6642BC62018F62A06AB64F75A7A815A81F6A0642BF9F75A7C81ADF5ADF3AD0DB664E7F0B665E7F1B666E7F281B663AE0342AB879781A6C0B796B663B75F3F673F63AE02AD90A607B760B660AD0BCD03383A6026F5B65FB763ADD4E6F0B764E6F1B765E6F2B76681¬
+30206¬
+0¬ \ No newline at end of file
diff --git a/from_toebes/spend0/spend0.zsm b/from_toebes/spend0/spend0.zsm
new file mode 100644
index 0000000..70488cb
--- /dev/null
+++ b/from_toebes/spend0/spend0.zsm
@@ -0,0 +1,656 @@
+;Name: spend watch
+;Version: spend0
+;Description: spend watch - by John A. Toebes, VIII
+;This keeps track of how much is in one of 7 categories
+;
+; Press the NEXT/PREV buttons to advance/backup through the categories
+; Press the SET button to add/subtract/set/clear the amounts in the categories
+; If you press the set button while the action is blinking, it will be carried out, otherwise
+; you can cancel the operation.
+;
+;TIP: Download your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!
+;HelpFile: watchapp.hlp
+;HelpTopic: 106
+;Parent: SpendSet
+;****************************************************************************************
+;* Copyright (C) 1997 John A. Toebes, VIII *
+;* All Rights Reserved *
+;* This program may not be distributed in any form without the permission of the author *
+;* jtoebes@geocities.com *
+;****************************************************************************************
+;
+; History:
+; 31 July 96 - Corrected problem with totals not being recalculated when you reenter
+; the wristapp.
+;
+ INCLUDE "WRISTAPP.I"
+;
+; (1) Program specific constants
+;
+; We use a few extra bytes here in low memory. Since we can't possibly
+; be running while the COMM app is running, we have no chance of
+; conflicting with it's use of this memory.
+;
+BLINK_BUF EQU $5C ; 3 Byte Buffer for the blink routine
+; EQU $5D
+; EQU $5E
+CAT_SAVE EQU $5F ; Temporary counter variable
+COUNTER EQU $60 ; Temporary variable to hold the
+FLAGBYTE EQU $61
+; Bit 0 indicates that the display does not need to be cleared
+; The other bits are not used
+
+CURRENT_MODE EQU $62 ; The current mode that we are in
+MODE_SELECT EQU 0 ; Set mode, selecting which category to modify
+MODE_HUNDREDS EQU 1 ; Set mode, changing the hundreds of dollars digits
+MODE_DOLLARS EQU 2 ; Set mode, changing the dollars digits
+MODE_CENTS EQU 3 ; Set mode, changing the cents
+MODE_ACTION EQU 4 ; Set mode, changing the action
+MODE_VIEW EQU 5 ; Normal display mode
+
+CATEGORY EQU $63 ; Current category
+;
+; These three bytes need to be contiguous. The represent the current
+; value that is being operated on
+;
+HUNDREDS EQU $64
+DOLLARS EQU $65
+CENTS EQU $66
+
+ACTION EQU $67 ; Selector for the current action
+ACT_ADD EQU 0
+ACT_SUB EQU 1
+ACT_SET EQU 2
+ACT_CLEAR EQU 3
+AMT_BASE EQU $F0
+;
+;
+; (2) System entry point vectors
+;
+START EQU *
+L0110: jmp MAIN ; The main entry point - WRIST_MAIN
+L0113: rts ; Called when we are suspended for any reason - WRIST_SUSPEND
+ nop
+ nop
+L0116: jmp DO_UPD ; Called to handle any timers or time events - WRIST_DOTIC
+L0119: rts ; Called when the COMM app starts and we have timers pending - WRIST_INCOMM
+ nop
+ nop
+L011c: rts ; Called when the COMM app loads new data - WRIST_NEWDATA
+ nop
+ nop
+
+L011f: lda STATETAB0,X ; The state table get routine - WRIST_GETSTATE
+ rts
+
+L0123: jmp HANDLE_STATE
+ db STATETAB0-STATETAB0
+L0127: jmp HANDLE_STATE
+ db STATETAB1-STATETAB0
+;
+; (3) Program strings
+;
+; These strings represent the 4 possible actions. They need to be early on in the data segment so that
+; then can be pointed to by using 8-bit offset addressing. They are exactly 3 bytes long and are
+; displayed by using the BLINK_TZONE routine
+;
+S3_MODE:
+S3_ADD timex "ADD"
+S3_SUB timex "SUB"
+S3_SET timex "SET"
+S3_CLR timex "CLR"
+;
+; These are the categories that the end user has configured. They are set by using the SPENDSET program
+; which searches for the first string "TOTAL ". These strings must be exactly 8 bytes each in order with
+; total being the first one.
+;
+S8_TOTAL: timex "TOTAL "
+S8_CAT1: timex "CAT1 "
+S8_CAT2: timex "CAT2 "
+S8_CAT3: timex "CAT3 "
+S8_CAT4: timex "CAT4 "
+S8_CAT5: timex "CAT5 "
+S8_CAT6: timex "CAT6 "
+S8_CAT7: timex "CAT7 "
+;
+; These are the running amounts for each category. Note that you can actually
+; initialize them with some default and the code will run properly
+;
+AMT_TOTAL: db 0,0,0
+AMT_CAT1: db 0,0,0
+AMT_CAT2: db 0,0,0
+AMT_CAT3: db 0,0,0
+AMT_CAT4: db 0,0,0
+AMT_CAT5: db 0,0,0
+AMT_CAT6: db 0,0,0
+AMT_CAT7: db 0,0,0
+;
+; These strings prompt for the current mode that we are in. They are displayed on the top line of
+; the display.
+;
+S6_SELECT timex6 "SELECT"
+S6_AMOUNT timex6 "AMOUNT"
+S6_ACTION timex6 "ACTION"
+S6_SPEND: timex6 "SPEND" ; save a byte by leaching off the space on the start of the next string
+S6_WATCH: timex6 " WATCH"
+;
+; This table selects which string is to be displayed. It is directly indexed by the current mode
+;
+MSG_TAB db S6_SELECT-START ; 0 - MODE_SELECT
+ db S6_AMOUNT-START ; 1 - MODE_HUNDREDS
+ db S6_AMOUNT-START ; 2 - MODE_DOLLARS
+ db S6_AMOUNT-START ; 3 - MODE_CENTS
+ db S6_ACTION-START ; 4 - MODE_ACTION
+ db S6_SPEND-START ; 5 - MODE_VIEW
+;
+; This is one of the magic tricks for providing the source for the blink routine.
+; These are base pointers (offset from HUNDREDS) that we use to copy three bytes into
+; BLINK_BUF. The interesting one here is the MODE_CENTS entry which points to DATDIGIT1
+; This works because the last number that we format happens to be the cents amount,
+; and the blink routine expects the two characters instead of the actual value.
+;
+DATASRC db HUNDREDS-HUNDREDS ; 1 - MODE_HUNDREDS
+ db DOLLARS-HUNDREDS ; 2 - MODE_DOLLARS
+ db DATDIGIT1-HUNDREDS ; 3 - MODE_CENTS
+ db S3_ADD-HUNDREDS ; 4 - MODE_ACTION 0 - ACT_ADD
+ db S3_SUB-HUNDREDS ; 4 - MODE_ACTION 1 - ACT_SUB
+ db S3_SET-HUNDREDS ; 4 - MODE_ACTION 2 - ACT_SET
+ db S3_CLR-HUNDREDS ; 4 - MODE_ACTION 3 - ACT_CLR
+;
+; This is the parameter to select which blink routine we want to use
+;
+BLINK_PARM db BLINK_MID12 ; 1 - MODE_HUNDREDS
+ db BLINK_MID34 ; 2 - MODE_DOLLARS
+ db BLINK_SECONDS ; 3 - MODE_CENTS
+ db BLINK_TZONE ; 4 - MODE_ACTION
+;
+; (4) State Tables
+;
+; This set of state tables is a little special since we actually use the
+; same state processing routine for both states. This saves us a lot of
+; memory but still allows us to let the state table make it easy to exit
+; the app with the MODE button
+;
+STATETAB0:
+ db 0
+ db EVT_ENTER,TIM2_12TIC,0 ; Initial state
+ db EVT_RESUME,TIM_ONCE,0 ; Resume from a nested app
+ db EVT_TIMER2,TIM_ONCE,0 ; This is the timer
+ db EVT_MODE,TIM_ONCE,$FF ; Mode button
+ db EVT_SET,TIM_ONCE,1 ; Set button
+ db EVT_DNANY4,TIM_ONCE,0 ; NEXT, PREV, SET, MODE button pressed
+ db EVT_END
+
+STATETAB1:
+ db 1
+ db EVT_RESUME,TIM_ONCE,1 ; Resume from a nested app
+ db EVT_DNANY4,TIM_ONCE,1 ; NEXT, PREV, SET, MODE button pressed
+ db EVT_UPANY4,TIM_ONCE,1 ; NEXT, PREV, SET, MODE button released
+ db EVT_USER2,TIM_ONCE,0 ; Return to state 0
+ db EVT_END ; End of table
+;
+; (5) Put up the initial banner screen
+;
+HANDLE_ENTER
+ clra
+ sta CATEGORY ; We start out displaying the totals
+ jsr FETCH_CATEGORY
+ jsr CLEARALL ; Clear the display
+ lda #S6_SPEND-START ; Put 'SPEND ' on the top line
+ jsr PUT6TOP
+ lda #S6_WATCH-START ; Put ' WATCH' on the second line
+ jsr PUT6MID
+ clr FLAGBYTE ; Force us to clear the display
+ lda #MODE_VIEW ; Start out in the VIEW mode
+ sta CURRENT_MODE
+ lda #SYS8_MODE ; Put MODE on the bottom line
+ jmp PUTMSGBOT
+;
+; (6) This is the main screen update routine.
+;---------------------------------------------------------------
+; Routine:
+; SHOWCURRENT
+; Parameters:
+; HUNDREDS,DOLLARS,CENTS - Current value to be displayed
+; 0,FLAGBYTE - Screen state (CLR=Must clear it first)
+; CATEGORY - the current category to be displayed
+; Returns:
+; DATDIGIT1,DATDIGIT2 - 2 digit characters for the cents value
+; Purpose:
+; This routine shows the current selected category and value for the category
+;---------------------------------------------------------------
+SHOWCURRENT
+ brset 0,FLAGBYTE,NOCLEAR ; If we don't need to clear the display, skip it
+ jsr CLEARALL ; Clear the display
+ bset 0,FLAGBYTE ; And remember that we did it
+NOCLEAR
+ lda #ROW_MP45 ; Turn on the decimal point
+ sta DISP_ROW
+ bset COL_MP45,DISP_COL
+ ldx HUNDREDS ; Get the Hundreds
+ jsr FMTBLANK0 ; Format it
+ jsr PUTMID12 ; and display it
+ ;
+ ; We want to output the dollars, but if there were no hundreds, we want to let the
+ ; first digit be a blank. To do this, we simply let it be a blank and set it to a zero
+ ; if there was actually anything in the hundreds field
+ ;
+ ldx DOLLARS ; Get the Dollars
+ jsr FMTX ; Format it
+ tst HUNDREDS ; Do we need to have a leading zero?
+ beq NOBLANKIT ; No, so it is fine
+ ldx DOLLARS ; Yes, Get the Dollars again
+ jsr FMTXLEAD0 ; And format it with a leading zero
+NOBLANKIT
+ jsr PUTMID34 ; Display the Dollars
+ ldx CENTS ; Get the Cents
+ jsr FMTXLEAD0 ; Format it (and leave it around for later)
+ jsr PUTMID56 ; and display it.
+ lda CATEGORY ; Get which category we want
+ lsla ; *2
+ lsla ; *4
+ lsla ; *8
+ add #S8_TOTAL-START ; *8+the start of the string
+ jmp BANNER8 ; and display the right string
+;
+; (7) State Table 0 and 1 Handler
+; This is called to process the state events.
+; We see SET, RESUME, DNANY4, and UPANY4 events
+;
+HANDLE_STATE:
+ bset 1,APP_FLAGS ; Indicate that we can be suspended
+ lda BTNSTATE ; Get the event
+ cmp #EVT_ENTER ; Is this the initial state?
+ beq HANDLE_ENTER
+ cmp #EVT_DNANY4 ; How about a button pressed?
+ beq HANDLE_DNANY
+ bclr 1,BTNFLAGS ; Turn off the repeat counter
+ cmp #EVT_SET ; Did they press the set button
+ bne SKIP2 ; No
+ clr CURRENT_MODE ; Yes, Go to MODE_SELECT
+SKIP2 bra GOREFRESH
+;
+; (8) They pressed a button, so handle it
+;
+HANDLE_DNANY
+ lda BTN_PRESSED ; Let's see what the button they pressed was
+ beq DO_NEXT ; MODE=1, and NEXT=0, so if it is less, it must be the next button
+ cmp #EVT_SET ; MODE=1 SET=2 PREV=3, test all at once
+ blo DO_MODE ; <2 = 1 so we have a EVT_MODE
+ bhi DO_PREV ; >2 = 3 so we have a EVT_PREV
+ ;
+ ; They pressed the set button, so we want to carry out the operation IF they have
+ ; one currently selected.
+ ;
+DO_SETOUT
+ lda CURRENT_MODE ; See what mode we were in
+ cmp #MODE_ACTION ; Is it the ACTION mode?
+ bne NO_ACTION ; No, so just cancel the operation
+ jsr DO_OPERATION ; Do what they requested
+ jsr DO_TOTAL ; And total up everything
+ jsr PLAYCONF ; Plus tell them that we did it
+NO_ACTION
+ bclr 0,FLAGBYTE ; We need to clear the display
+ lda #MODE_VIEW ; And switch back to VIEW mode
+ sta CURRENT_MODE
+ lda #EVT_USER2 ; And go back to state 0
+ jmp POSTEVENT
+;
+; (9) This handles the update routine to change a digit...
+;
+DO_NEXT
+ bset 0,SYSFLAGS ; Mark our update direction as up
+ BRSKIP2 ; and skip over the next instruction
+DO_PREV
+ bclr 0,SYSFLAGS ; Mark our update direction as down
+DO_UPD
+ lda CURRENT_MODE ; Which mode are we in?
+ beq CHANGE_CATEGORY ; 0=MODE_SELECT, so change the category
+ cmp #MODE_VIEW ; 5=MODE_VIEW, so we also change the category
+ bne TRYOTHERS
+CHANGE_CATEGORY
+; (10) updating the category
+ ldx #CATEGORY ; Point to the category variable
+ lda #7 ; get our range of values
+ bsr ADJUST_PX_ANDA ; And let the routine do the adjust for us
+ jsr FETCH_CATEGORY ; Update the current amount from the new category
+GOREFRESH
+ bra REFRESH
+;
+; (11) ADJUST_PX_ANDA - a routine to adjust a value based on the direction
+;---------------------------------------------------------------
+; Routine:
+; ADJUST_PX_ANDA
+; Parameters:
+; A - Binary range to limit value within ((2**x)-1)
+; 0,SYSFLAGS - Direction to adjust, SET=UP
+; X - Pointer to value to be adjusted
+; Returns:
+; Value pointed to by X is adjusted
+; Purpose:
+; This routine adjusts a value up or down based on the current direction, wrapping
+; it to the binary range indicated by the value in A. Note that this value must
+; be a power of 2-1 (e.g. 1, 3, 7, 15, 31, 63, or 127)
+;---------------------------------------------------------------
+ADJUST_PX_ANDA
+ inc ,X
+ brset 0,SYSFLAGS,NODEC
+ dec ,X
+ dec ,X
+NODEC and ,X
+ sta ,X
+ rts
+;
+; (12) Try updating one of the other modes
+; We have already handled MODE_SELECT and MODE_VIEW. This code handles
+; MODE_HUNDREDS, MODE_DOLLARS, MODE_CENTS, and MODE_ACTION
+;
+TRYOTHERS
+ cmp #MODE_CENTS ; 3=MODE_CENTS
+ bls TRYMORE ; If it is <=, then we leave only MODE_ACTION
+; (13) updating the Action
+ lda CATEGORY ; Which category is it?
+ beq REFRESH ; If we are displaying the total, you can't change the action
+ ldx #ACTION ; Point to the current action
+ lda #3 ; and the range of actions
+ bsr ADJUST_PX_ANDA ; and let our simple routine handle it for us
+ bra REFRESH
+TRYMORE
+ beq DOCENTS ; If it is MODE_CENTS, go handle it
+; (14) Update MODE_HUNDREDS=1 and MODE_DOLLARS=2
+ clrx ; Set the lower limit =0
+ stx UPDATE_MIN
+ ldx #99 ; And the upper limit= 99
+ stx UPDATE_MAX
+ add #HUNDREDS-1 ; Point to the right byte to update
+ tax ; And put it in X as the parameter
+ lda CURRENT_MODE ; MODE=1 MODE=2
+ deca ; 0 1
+ lsla ; 0 2
+ add #UPD_MID12 ; 5=UPD_MID12 7=UPD_MID34
+ jsr START_UPDATEP ; And prepare the update routine
+ bset 4,BTNFLAGS ; Mark that the update is now pending
+ rts
+;
+; (15) This is where we switch which digit we are changing...
+;
+DO_MODE
+ lda CURRENT_MODE ; Get the mode
+ ldx #MODE_ACTION ; Limit it to the first 5 modes
+ jsr INCA_WRAPX ; And let the system increment it for us
+ sta CURRENT_MODE ; Save it back
+ ; When we switch to the ACTION mode and we have the Totals category showing,
+ ; we need to limit them to the single action of CLEAR
+ ;
+ cmp #MODE_ACTION ; Did we go to action mode?
+ bne REFRESH ; No, nothing to do
+ clr ACTION ; Reset the action to be add
+ tst CATEGORY ; Are we displaying the totals
+ bne REFRESH ; No, nothing more to do
+ lda #ACT_CLEAR ; Yes, switch them to CLEAR
+ sta ACTION
+;
+; (16) Refresh the screen and start blinking the current digit...
+;
+REFRESH
+ ; 0 - SELECT <Category>
+ ; 1 - AMOUNT (Blink hundreds)
+ ; 2 - AMOUNT (Blink dollars)
+ ; 3 - AMOUNT (Blink cents)
+ ; 4 - ACTION
+ jsr SHOWCURRENT ; Format the screen
+ ldx CURRENT_MODE ; Get the mode
+ lda MSG_TAB,X ; So that we can get the message for it
+ jsr PUT6TOP ; And put that on the top of the display
+ ;
+ ; Now we need to make the right thing blink
+ ;
+ ldx CURRENT_MODE ; Are we in Select mode?
+ beq NOBLINK2 ; Yes, don't blink anything
+ cpx #MODE_ACTION ; How about ACTION MODE?
+ bhi NOBLINK2 ; >ACTION is VIEW mode, so if so, don't blink either
+ ; 1 -> BLINK_MID12 PARM=&HUNDREDS
+ ; 2 -> BLINK_MID34 PARM=&DOLLARS
+ ; 3 -> BLINK_SECONDS PARM=&2Characters
+ ; 4 -> BLINK_TZONE PARM=&3Characters
+ brset 1,BTNFLAGS,NOBLINK2 ; Also, we don't want to be blinking if we are in an update routine
+ bne SETUP_BLINK ; If we were not in action mode, we have the right data source
+ ; Put a > on the display
+ ldx #C_RIGHTARR ; Put a > sign right in front of the action
+ lda #POSL3_5
+ jsr PUTLINE3
+ lda CURRENT_MODE ; Get the mode
+ add ACTION ; And add in the action
+ tax ; To compute our data source pointer
+SETUP_BLINK
+;
+; (17) Set up the parameters for and call the blink routine
+;
+ ldx DATASRC-1,X ; Get the offsetted pointer to the right data
+ lda HUNDREDS,X ; And copy the 3 bytes to our blink buffer
+ sta BLINK_BUF
+ lda HUNDREDS+1,X
+ sta BLINK_BUF+1
+ lda HUNDREDS+2,X
+ sta BLINK_BUF+2
+ ldx CURRENT_MODE ; Get our mode again
+ lda BLINK_PARM-1,X ; and use it to pick up which parameter we are passing
+ ldx #BLINK_BUF ; Point to the common blink buffer
+ jsr START_BLINKP ; And do it
+ bset 2,BTNFLAGS ; Mark a blink routine as pending
+NOBLINK2
+ rts
+;
+; (18) Update MODE_CENTS
+; This is a special case since we don't have a system routine that allows updating
+; the right most digits on the middle line. Fortunately we can fake it by turning
+; on the tic timer and waiting until 8 tics have passed before going into a repeat
+; loop. The code has been carefully constructed so that the tic timer can just go
+; straight to the DO_UPD code to work.
+DOCENTS
+ ldx #COUNTER ; Point to the counter (saves code size)
+ brset 1,BTNFLAGS,NOSTART ; Are we already in an update loop?
+ lda #8 ; No, we need to wait 8 tics
+ sta ,X ; X->COUNTER ; Save the value
+ BSET 1,BTNFLAGS ; and start the timer
+ bra DOIT ; But still do it once right now
+;
+DEC_DELAY
+ dec ,X ; X->COUNTER ; We haven't hit the limit, decrement it and try again
+ rts
+NOSTART
+ tst ,X ; X->COUNTER ; We are in the loop, have we hit the limit?
+ bne DEC_DELAY ; no, go off and delay once more
+DOIT
+ lda #99 ; Our upper limit is 99
+ ldx #CENTS ; Point to the cents variable (saves code size)
+ brset 0,SYSFLAGS,UPCENTS ; Are we in an up mode?
+ dec ,X ; X->CENTS ; Down, decrement the value
+ bpl REFRESH ; If we didn't wrap, just go display it
+ sta ,X ; X->CENTS ; We wrapped, save the upper limit
+ bra REFRESH ; and go display it
+UPCENTS
+ inc ,X ; X->CENTS ; Up, increment the value
+ cmp ,X ; X->CENTS ; Did we hit the limit?
+ bpl REFRESH ; No, go display it
+ clr ,X ; X->CENTS ; Yes, wrap to the bottom
+ bra REFRESH ; and display it
+;
+; (19) DO_OPERATION - Perform the requested operation
+;---------------------------------------------------------------
+; Routine:
+; DO_OPERATION
+; Parameters:
+; HUNDREDS,DOLLARS,CENTS - Amount to be added/subtracted/set
+; CATEGORY - Item to be updated
+; ACTION - 0 = ACT_ADD
+; 1 = ACT_SUB
+; 2 = ACT_SET
+; 3 = ACT_CLEAR
+; Purpose:
+; Adjusts the corresponding category by the given amount
+;---------------------------------------------------------------
+DO_OPERATION
+ bsr COMPUTE_CATEGORY_BASE ; Point to the data for our category
+ lda ACTION ; Which action is it?
+ beq DO_ADD ; 0=ADD, go do it
+ cmp #ACT_SET ; 3 way compare here... (code trick)
+ beq DO_SET ; 2=SET, go do it
+ blo DO_SUB ; <2=1 (SUB), go do it
+DO_CLR ; >2 = 3 (CLEAR)
+ clr HUNDREDS ; Clear out the current values
+ clr DOLLARS
+ clr CENTS
+ tst CATEGORY ; Were we clearing the total?
+ bne DO_SET ; No, just handle it
+ ;
+ ; They want to clear everything
+ ;
+ ldx #(3*8)-1 ; Total number of categories
+CLEAR_TOTALS
+; Mini Routine here X=number of bytes to clear
+ clra
+CLR_MORE
+ sta AMT_TOTAL,X ; Clear out the next byte
+ decx ; Decrement the number to do
+ bpl CLR_MORE ; And go for more
+ rts
+;
+; (20) Handle Subtracting a value
+;
+DO_SUB
+ neg HUNDREDS ; Just negate the value to be added
+ neg DOLLARS
+ neg CENTS ; And fall into the add code
+;
+; (21) Handle Adding a value
+;
+DO_ADD
+ lda CENTS ; Add the cents
+ add AMT_BASE+2,X
+ sta CENTS
+ lda DOLLARS ; Add the dollars
+ add AMT_BASE+1,X
+ sta DOLLARS
+ lda HUNDREDS ; Add the hundreds
+ add AMT_BASE,X
+ sta HUNDREDS
+ ldx #CENTS ; Point to the cents as it will be the first one we fix up
+ tst ACTION ; See what type of operation we just did
+ beq FIXUP_ADD ; Was it an ADD? If so, do do it
+ bsr TRYDEC ; Decrement, fix up the Cents
+ bsr TRYDEC ; Then fix up the dollars
+ lda HUNDREDS ; Did the hundreds underflow as a result?
+ bmi DO_CLR ; Yes, so just set everything to zero
+ bra DO_SET ; No, so copy over the values to the current entry
+TRYDEC
+ lda ,X ; Get the current byte to check
+ bpl RETDEC ; If it didn't underflow, then skip to the next byte
+ add #100 ; Add back the 100 that it underflowed
+ sta ,X ; And save that away
+ decx ; Back up to the next most significant byte
+ dec ,X ; and borrow the one
+ rts
+RETDEC decx ; No need to do anything, so skip to the next byte
+ rts
+TRYADD
+ lda ,X ; Get the current byte to check
+ sub #100 ; See if it was less than 100
+ bmi RETDEC ; If so, then it was already normalized so skip out
+ sta ,X ; It was an overflow, so save the fixed value
+ decx ; Skip to the next byte
+ inc ,X ; And add in the overflow
+ rts
+
+FIXUP_ADD
+ bsr TRYADD ; Fix up the cents
+ bsr TRYADD ; and then fix up the dollars
+;
+; (22) Handle setting a value
+;
+DO_SET
+ bsr COMPUTE_CATEGORY_BASE ; Point to the data for our category
+ lda HUNDREDS ; Copy over the values to the current category
+ sta AMT_BASE,X
+ lda DOLLARS
+ sta AMT_BASE+1,X
+ lda CENTS
+ sta AMT_BASE+2,X
+ rts
+;
+; (23) COMPUTE_BASE - Computes an offset pointer to get to the total amounts
+; This is a trick to save us a few bytes in the instructions.
+;---------------------------------------------------------------
+; Routine:
+; COMPUTE_CATEGORY_BASE, COMPUTE_BASE
+; Parameters:
+; A - Offset into total
+; Returns:
+; X - Pointer relative to AMT_BASE to use
+; Purpose:
+; Computes an offset pointer to get to the total amounts
+;---------------------------------------------------------------
+COMPUTE_CATEGORY_BASE
+ lda CATEGORY ; Get our category
+COMPUTE_BASE
+ ldx #3
+ mul
+ add #AMT_TOTAL-AMT_BASE
+ tax
+ rts
+;
+; (24) This is the main initialization routine which is called when we first get the app into memory
+;
+MAIN:
+ lda #$c0 ; We want button beeps and to indicate that we have been loaded
+ sta WRISTAPP_FLAGS
+ ; Fall into DO_TOTAL
+;
+; (25) DO_TOTAL - Recomputes the current total
+;---------------------------------------------------------------
+; Routine:
+; DO_TOTAL
+; Parameters:
+; NONE
+; Purpose:
+; Recomputes the current total
+;---------------------------------------------------------------
+DO_TOTAL
+ lda CATEGORY ; Remember our category
+ sta CAT_SAVE
+ clr ACTION ; Say that we want to add 0=ACT_ADD
+ clr CATEGORY ; To the total category
+ ldx #2 ; But we need to clear it first
+ bsr CLEAR_TOTALS
+ lda #7 ; And iterate over the 7 categories
+ sta COUNTER
+TOT_LOOP
+ lda COUNTER ; Get our current category
+ bsr FETCH_CATEGORY ; And fetch the data
+ jsr DO_OPERATION ; Then add it to the total
+ dec COUNTER ; Go to the next category
+ bne TOT_LOOP ; Until we are done
+ lda CAT_SAVE ; Restore the category
+ sta CATEGORY
+ ; fall into FETCH_CATEGORY
+; (26) FETCH_CATEGORY - Retrieves the value of the total amount for the selected category
+;---------------------------------------------------------------
+; Routine:
+; FETCH_CATEGORY
+; Parameters:
+; A - Category to be fetched
+; Returns:
+; HUNDREDS,DOLLARS,CENTS - Current value of selected category
+; Purpose:
+; Retrieves the value of the total amount for the selected category
+;---------------------------------------------------------------
+FETCH_CATEGORY
+ bsr COMPUTE_BASE ; Get the pointer to the base
+ lda AMT_BASE,X ; And retrieve the data
+ sta HUNDREDS
+ lda AMT_BASE+1,X
+ sta DOLLARS
+ lda AMT_BASE+2,X
+ sta CENTS
+ rts
+;--------------------END OF CODE---------------------------------------------------
diff --git a/from_toebes/spend0/spendset.exe b/from_toebes/spend0/spendset.exe
new file mode 100644
index 0000000..859875a
--- /dev/null
+++ b/from_toebes/spend0/spendset.exe
Binary files differ
diff --git a/from_toebes/testsnd/testsnd.asm b/from_toebes/testsnd/testsnd.asm
new file mode 100644
index 0000000..949b2dc
--- /dev/null
+++ b/from_toebes/testsnd/testsnd.asm
@@ -0,0 +1,155 @@
+;Name: Test Sound
+;Version: TESTSND
+;Description: This routine tests the various sound capabilities of the datalink.
+;by John A. Toebes, VIII
+;
+;TIP: Download your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!
+;HelpFile: watchapp.hlp
+;HelpTopic: 106
+ INCLUDE "WRISTAPP.I"
+;
+; (1) Program specific constants
+;
+CURRENT_VAL EQU $61
+;
+; (2) System entry point vectors
+;
+START EQU *
+L0110: jmp MAIN ; The main entry point - WRIST_MAIN
+L0113: rts ; Called when we are suspended for any reason - WRIST_SUSPEND
+ nop
+ nop
+L0116: rts ; Called to handle any timers or time events - WRIST_DOTIC
+ nop
+ nop
+L0119: rts ; Called when the COMM app starts and we have timers pending - WRIST_INCOMM
+ nop
+ nop
+L011c: rts ; Called when the COMM app loads new data - WRIST_NEWDATA
+ nop
+ nop
+
+L011f: lda STATETAB0,X ; The state table get routine - WRIST_GETSTATE
+ rts
+
+L0123: jmp DOEVENT0
+ db TABLE0-TABLE0
+L0127: jmp DOEVENT1
+ db TABLE1-TABLE0
+;
+; (3) Program strings
+S6_SOUND: timex6 "SOUND "
+S6_TEST: timex6 " TEST "
+S8_TOEBES: timex "J.TOEBES"
+;
+; (4) State Table
+;
+STATETAB0:
+TABLE0:
+ db 0
+ db EVT_ENTER,TIM_LONG,0 ; Initial state
+ db EVT_RESUME,TIM_ONCE,0 ; Resume from a nested app
+ db EVT_TIMER2,TIM_ONCE,0 ;
+ db EVT_DNNEXT,TIM_ONCE,1 ; Next button
+ db EVT_DNPREV,TIM_ONCE,1 ; Prev button
+ db EVT_MODE,TIM_ONCE,$FF ; Mode button
+ db EVT_DNSET,TIM_ONCE,0 ; Set button
+ db EVT_UPSET,TIM_ONCE,0 ;
+ db EVT_END
+
+TABLE1:
+ db 1
+ db EVT_UPNEXT,TIM_ONCE,1 ; Releasing the next button
+ db EVT_UPPREV,TIM_ONCE,1 ; Releasing the prev button
+ db EVT_USER0,TIM_ONCE,0 ; Return to the main state table
+ db EVT_END ; End of table
+;
+; (5) State Table 0 Handler
+; This is called to process the state events.
+; We see ENTER, TIMER2, and RESUME events
+;
+DOEVENT0:
+ bset 1,APP_FLAGS ; Allow us to be suspended
+ lda BTNSTATE ; Get the event
+ cmp #EVT_RESUME ; Did another app get called in the meantime?
+ beq REFRESH ; We will refresh the display in this case
+ cmp #EVT_TIMER2 ; Did the initial timer expire?
+ beq REFRESH ; Yes, clean up the screen
+ cmp #EVT_ENTER ; Is this the initial state?
+ beq INITBANNER ; Yes, put up the banner
+ cmp #EVT_DNSET ; Did they hit the set button
+ beq PLAYIT
+ cmp #EVT_UPSET
+ beq SILENCE
+ rts
+;
+; (6) Sound playing code. Note that we go straight to the hardware here for this one
+;
+PLAYIT:
+ lda #ROW_NOTE ; Turn on the little note symbol
+ sta DISP_ROW
+ bset COL_NOTE,DISP_COL
+ lda CURRENT_VAL
+ sta $28
+ rts
+
+SILENCE:
+ lda #ROW_NOTE ; Turn off the little note symbol
+ sta DISP_ROW
+ bclr COL_NOTE,DISP_COL
+ lda #15
+ sta $28
+ rts
+
+REFRESH:
+ jsr CLEARALL ; Clear the display
+ lda #S6_SOUND-START ; Put "SOUND" on the top of the display
+ jsr PUT6TOP
+ ldx CURRENT_VAL
+ jsr FMTX
+ jsr PUTMID34
+ bra JBANNER
+
+INITBANNER:
+ jsr CLEARALL ; Clear the display
+ lda #S6_SOUND-START ; Put 'SOUND ' on the top line
+ jsr PUT6TOP
+ lda #S6_TEST-START ; Put ' TEST ' on the second line
+ jsr PUT6MID
+JBANNER
+ lda #S8_TOEBES-START
+ jmp BANNER8
+;
+; (7) This is the main initialization routine which is called when we first get the app into memory
+;
+MAIN:
+ bset 7,WRISTAPP_FLAGS ; Tell them that we are a live application
+ clr CURRENT_VAL
+ rts
+;
+; (8) State Table 1 Handler
+;
+; This is called when we press the prev/next button or when the timer fires during that event
+;
+DOEVENT1:
+ lda BTNSTATE
+ cmp #EVT_DNPREV
+ beq GO_DOWN
+ cmp #EVT_DNNEXT
+ beq GO_UP
+ lda #EVT_USER0
+ jmp POSTEVENT
+
+GO_DOWN bclr 0,SYSFLAGS ; Mark update direction as down
+ bra DOUPDN
+GO_UP bset 0,SYSFLAGS ; Mark update direction as up
+DOUPDN clra
+ jsr CLEARMID
+ sta UPDATE_MIN
+ lda #99
+ sta UPDATE_MAX
+ ldx #CURRENT_VAL
+ lda #UPD_MID34
+ jsr START_UPDATEP
+ bset 4,BTNFLAGS
+ rts
diff --git a/from_toebes/testsnd/testsnd.known_good b/from_toebes/testsnd/testsnd.known_good
new file mode 120000
index 0000000..1ef9b2c
--- /dev/null
+++ b/from_toebes/testsnd/testsnd.known_good
@@ -0,0 +1 @@
+testsnd.zap.app \ No newline at end of file
diff --git a/from_toebes/testsnd/testsnd.zap b/from_toebes/testsnd/testsnd.zap
new file mode 100644
index 0000000..165ef1f
--- /dev/null
+++ b/from_toebes/testsnd/testsnd.zap
@@ -0,0 +1,26 @@
+TDL0724962¬ Applet file header
+Test Sound¬ Applet friendly name
+testsnd1¬ Applet version #
+This routine tests the various sound capabilities of the datalink.
+
+TIP: Download your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!¬
+WATCHAPP.HLP¬ Applet help filename
+106¬
+none¬ Applet's parent's app name (if it exists - 'none' if it doesn't)
+Timex Data Link 150 Watch¬
+CC01B7819D9D819D9D819D9D819D9DD6013F81CC016400CC01BC1A050019150D1D1D180E05181D13321D180E0B0E1C001B84001AFF001FFF0080FF0183FF0101FFFF82FF00A2FF001D01A0FF01A3FF0137FF001D128FB691A11A2727A11F2723A11B2731A1822705A1A2270C81A60EB71D181EB661B72881A60EB71D191EA60FB72881CD577AA61BCD587EBE61CD5951CD5920200DCD577AA61BCD587EA621CD58A8A627CC58451E963F6181B691A1832709A1802709A637CC4E89119F2002109F4FCD58D8C704F4A663C704F5AE61A607CD57C7189081¬
+33981¬
+0¬ No data
+Test Sound¬ Applet friendly name
+testsnd2¬ Applet version #
+This routine tests the various sound capabilities of the datalink.
+
+
+TIP: Download your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!¬
+WATCHAPP.HLP¬ Applet help filename
+106¬
+none¬ Applet's parent's app name (if it exists - 'none' if it doesn't)
+Timex Data Link 150s Watch¬
+CC01B7819D9D819D9D819D9D819D9DD6013F81CC016400CC01BC1A050019150D1D1D180E05181D13321D180E0B0E1C001B84001AFF001FFF0080FF0183FF0101FFFF82FF00A2FF001D01A0FF01A3FF0137FF001D128FB691A11A2727A11F2723A11B2731A1822705A1A2270C81A60CB71D181EB661B72881A60CB71D191EA60FB72881CD5AA0A61BCD577FBE61CD5852CD5821200DCD5AA0A61BCD577FA621CD57A9A627CC57461E963F6181B691A1832709A1802709A637CC4E78119F2002109F4FCD57D9C704F4A663C704F5AE61A607CD56C8189081¬
+59850¬
+0¬ No data \ No newline at end of file
diff --git a/from_toebes/testsnd/testsnd.zsm b/from_toebes/testsnd/testsnd.zsm
new file mode 100644
index 0000000..f81b602
--- /dev/null
+++ b/from_toebes/testsnd/testsnd.zsm
@@ -0,0 +1,154 @@
+;Name: Test Sound
+;Version: TESTSND
+;Description: This routine tests the various sound capabilities of the datalink.
+;by John A. Toebes, VIII
+;
+;TIP: Download your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!
+;HelpFile: watchapp.hlp
+;HelpTopic: 106
+ INCLUDE "WRISTAPP.I"
+;
+; (1) Program specific constants
+;
+CURRENT_VAL EQU $61
+;
+; (2) System entry point vectors
+;
+START EQU *
+L0110: jmp MAIN ; The main entry point - WRIST_MAIN
+L0113: rts ; Called when we are suspended for any reason - WRIST_SUSPEND
+ nop
+ nop
+L0116: rts ; Called to handle any timers or time events - WRIST_DOTIC
+ nop
+ nop
+L0119: rts ; Called when the COMM app starts and we have timers pending - WRIST_INCOMM
+ nop
+ nop
+L011c: rts ; Called when the COMM app loads new data - WRIST_NEWDATA
+ nop
+ nop
+
+L011f: lda STATETAB0,X ; The state table get routine - WRIST_GETSTATE
+ rts
+
+L0123: jmp DOEVENT0
+ db TABLE0-TABLE0
+L0127: jmp DOEVENT1
+ db TABLE1-TABLE0
+;
+; (3) Program strings
+S6_SOUND: timex6 "SOUND "
+S6_TEST: timex6 " TEST "
+S8_TOEBES: timex "J.TOEBES"
+;
+; (4) State Table
+;
+TABLE0:
+ db 0
+ db EVT_ENTER,TIM_LONG,0 ; Initial state
+ db EVT_RESUME,TIM_ONCE,0 ; Resume from a nested app
+ db EVT_TIMER2,TIM_ONCE,0 ;
+ db EVT_DNNEXT,TIM_ONCE,1 ; Next button
+ db EVT_DNPREV,TIM_ONCE,1 ; Prev button
+ db EVT_MODE,TIM_ONCE,$FF ; Mode button
+ db EVT_DNSET,TIM_ONCE,0 ; Set button
+ db EVT_UPSET,TIM_ONCE,0 ;
+ db EVT_END
+
+TABLE1:
+ db 1
+ db EVT_UPNEXT,TIM_ONCE,1 ; Releasing the next button
+ db EVT_UPPREV,TIM_ONCE,1 ; Releasing the prev button
+ db EVT_USER0,TIM_ONCE,0 ; Return to the main state table
+ db EVT_END ; End of table
+;
+; (5) State Table 0 Handler
+; This is called to process the state events.
+; We see ENTER, TIMER2, and RESUME events
+;
+DOEVENT0:
+ bset 1,APP_FLAGS ; Allow us to be suspended
+ lda BTNSTATE ; Get the event
+ cmp #EVT_RESUME ; Did another app get called in the meantime?
+ beq REFRESH ; We will refresh the display in this case
+ cmp #EVT_TIMER2 ; Did the initial timer expire?
+ beq REFRESH ; Yes, clean up the screen
+ cmp #EVT_ENTER ; Is this the initial state?
+ beq INITBANNER ; Yes, put up the banner
+ cmp #EVT_DNSET ; Did they hit the set button
+ beq PLAYIT
+ cmp #EVT_UPSET
+ beq SILENCE
+ rts
+;
+; (6) Sound playing code. Note that we go straight to the hardware here for this one
+;
+PLAYIT:
+ lda #ROW_NOTE ; Turn on the little note symbol
+ sta DISP_ROW
+ bset COL_NOTE,DISP_COL
+ lda CURRENT_VAL
+ sta $28
+ rts
+
+SILENCE:
+ lda #ROW_NOTE ; Turn off the little note symbol
+ sta DISP_ROW
+ bclr COL_NOTE,DISP_COL
+ lda #15
+ sta $28
+ rts
+
+REFRESH:
+ jsr CLEARALL ; Clear the display
+ lda #S6_SOUND-START ; Put "SOUND" on the top of the display
+ jsr PUT6TOP
+ ldx CURRENT_VAL
+ jsr FMTX
+ jsr PUTMID34
+ bra JBANNER
+
+INITBANNER:
+ jsr CLEARALL ; Clear the display
+ lda #S6_SOUND-START ; Put 'SOUND ' on the top line
+ jsr PUT6TOP
+ lda #S6_TEST-START ; Put ' TEST ' on the second line
+ jsr PUT6MID
+JBANNER
+ lda #S8_TOEBES-START
+ jmp BANNER8
+;
+; (7) This is the main initialization routine which is called when we first get the app into memory
+;
+MAIN:
+ bset 7,WRISTAPP_FLAGS ; Tell them that we are a live application
+ clr CURRENT_VAL
+ rts
+;
+; (8) State Table 1 Handler
+;
+; This is called when we press the prev/next button or when the timer fires during that event
+;
+DOEVENT1:
+ lda BTNSTATE
+ cmp #EVT_DNPREV
+ beq GO_DOWN
+ cmp #EVT_DNNEXT
+ beq GO_UP
+ lda #EVT_USER0
+ jmp POSTEVENT
+
+GO_DOWN bclr 0,SYSFLAGS ; Mark update direction as down
+ bra DOUPDN
+GO_UP bset 0,SYSFLAGS ; Mark update direction as up
+DOUPDN clra
+ jsr CLEARMID
+ sta UPDATE_MIN
+ lda #99
+ sta UPDATE_MAX
+ ldx #CURRENT_VAL
+ lda #UPD_MID34
+ jsr START_UPDATEP
+ bset 4,BTNFLAGS
+ rts
diff --git a/from_toebes/tipcalc/tipcalc1.zap b/from_toebes/tipcalc/tipcalc1.zap
new file mode 100644
index 0000000..1c75866
--- /dev/null
+++ b/from_toebes/tipcalc/tipcalc1.zap
@@ -0,0 +1,35 @@
+TDL0702972¬
+Tip Calculator¬
+TIPCALC1¬
+The tip calculator - by John A. Toebes, VIII
+
+Press the set button to enter the amount. When in set mode, press the MODE button to switch between dollars and cents mode.
+Press the set button to go back to the display mode. The tip amount will scroll across the bottom of the screen as 15%, 20% and then 10% in sequence.
+
+When in display mode, pressing the prev or next buttons will enter the set mode automatically on the dollars amount.
+
+TIP: Download your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!¬
+watchapp.hlp¬
+106¬
+none¬
+Timex Data Link 150 Watch¬
+CC028C819D9D819D9D819D9D819D9DD6015681CC017B00CC0296171D1801161D1D1D0C0A130C1D0A14001915181D1219240C0A150C13321D180E0B0E1C000000000000000000001AFF001B84001FFF0001FFFF86FF0037FF0138FFFF1D0137FF0186FF01A6FF0139FF001DB691A11B270BA18627022058A637CC4E89C604A1270A4FC704A1A638CD4E8981CD577AA61BCD587EA621CD58A8A635CC5845CD595CCD5930BE66CD593EB6A2B7632604A61DB7A2B6A3B762CD5910A636B71D141EBE65CD593EB6A2B761B6A3B760CC5920CD577AA61BCD587EADC45FA60FAD13A614AD0FA60AAD0BA63FD704D1CD5522CC5545C7014DBF6797CD593EBE67B6A2AD52B6A3AD4EA629AD4AA637AD46BF67B660CE014D42C7014EB661CE014D42AB05C7014FB662CE014D42C70150B663CE014D42C701514FC70152C70153C701545FD6014EA00A2511D7014ED6014F4CD7014F20EDD704D25C815CA30625E3BE67C601532702ADEDC60152ADE8A632ADE4C60151ADDFC60150ADDAA62420D64FB765A60FB7661E00811200B691A1372714A1862704129F2031C604C3A1022611A639CC4E893F64A627CD587EA62DCD5845C604C3A1002728A1032720A101270181B6644CA401B764139FCD01ADA627CD587EA62DCD5845AD26149081119F2002109F4FC704F4A663C704F5B6642706AE65A6072004AE66A605CD57C7189081B6642706AE65A6092004AE66A607CC55BF¬
+53298¬
+0¬
+Tip Calculator¬
+TIPCALC1¬
+The tip calculator - by John A. Toebes, VIII
+
+Press the set button to enter the amount. When in set mode, press the MODE button to switch between dollars and cents mode.
+Press the set button to go back to the display mode. The tip amount will scroll across the bottom of the screen as 15%, 20% and then 10% in sequence.
+
+When in display mode, pressing the prev or next buttons will enter the set mode automatically on the dollars amount.
+
+TIP: Download your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!¬
+watchapp.hlp¬
+106¬
+none¬
+Timex Data Link 150s Watch¬
+CC028C819D9D819D9D819D9D819D9DD6015681CC017B00CC0296171D1801161D1D1D0C0A130C1D0A14001915181D1219240C0A150C13321D180E0B0E1C000000000000000000001AFF001B84001FFF0001FFFF86FF0037FF0138FFFF1D0137FF0186FF01A6FF0139FF001DB691A11B270BA18627022058A637CC4E78C604A1270A4FC704A1A638CD4E7881CD5AA0A61BCD577FA621CD57A9A635CC5746CD585DCD5831BE66CD583FB6A2B7632604A61DB7A2B6A3B762CD5811A636B71D141EBE65CD583FB6A2B761B6A3B760CC5821CD5AA0A61BCD577FADC45FA60FAD13A614AD0FA60AAD0BA63FD704D1CD5511CC5534C7014DBF6797CD583FBE67B6A2AD52B6A3AD4EA629AD4AA637AD46BF67B660CE014D42C7014EB661CE014D42AB05C7014FB662CE014D42C70150B663CE014D42C701514FC70152C70153C701545FD6014EA00A2511D7014ED6014F4CD7014F20EDD704D25C815CA30625E3BE67C601532702ADEDC60152ADE8A632ADE4C60151ADDFC60150ADDAA62420D64FB765A60FB7661E00811200B691A1372714A1862704129F2031C604C3A1022611A639CC4E783F64A627CD577FA62DCD5746C604C3A1002728A1032720A101270181B6644CA401B764139FCD01ADA627CD577FA62DCD5746AD26149081119F2002109F4FC704F4A663C704F5B6642706AE65A6072004AE66A605CD56C8189081B6642706AE65A6092004AE66A607CC55AE¬
+33831¬
+0¬ \ No newline at end of file
diff --git a/from_toebes/update/update.asm b/from_toebes/update/update.asm
new file mode 120000
index 0000000..85759e6
--- /dev/null
+++ b/from_toebes/update/update.asm
@@ -0,0 +1 @@
+update.zsm \ No newline at end of file
diff --git a/from_toebes/update/update.known_good b/from_toebes/update/update.known_good
new file mode 120000
index 0000000..9462f83
--- /dev/null
+++ b/from_toebes/update/update.known_good
@@ -0,0 +1 @@
+update.zap.app \ No newline at end of file
diff --git a/from_toebes/update/update.zap b/from_toebes/update/update.zap
new file mode 100644
index 0000000..9a1903a
--- /dev/null
+++ b/from_toebes/update/update.zap
@@ -0,0 +1,25 @@
+TDL0724962¬ Applet file header
+Update Sample¬ Applet friendly name
+Update1¬ Applet version #
+This is a simple number update program
+
+TIP: Download your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!¬
+WATCHAPP.HLP¬ Applet help filename
+106¬
+none¬ Applet's parent's app name (if it exists - 'none' if it doesn't)
+Timex Data Link 150 Watch¬
+CC01A9819D9D819D9D819D9D819D9DD6013381CC01470019160D0A180E050A1416130E001B83001FFF001AFF0001FFFF86FF00A6FF001D128FB691A186260FC604C3A1032724A100271CA1022737A11B26381361CD579FA617CD587EA61DCD58A8A648CC584C109F2002119F4FC704F4A663C704F5AE62A607CD57C718901361A650CC584C3F62026105CD577A12611F90BE62CD593ECC5920A6C0B7963F613F6281¬
+25714¬
+0¬ No data
+Update Sample¬ Applet friendly name
+Update2¬ Applet version #
+This is a simple number update program
+
+TIP: Download your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!¬
+WATCHAPP.HLP¬ Applet help filename
+106¬
+none¬ Applet's parent's app name (if it exists - 'none' if it doesn't)
+Timex Data Link 150s Watch¬
+CC01A9819D9D819D9D819D9D819D9DD6013381CC01470019160D0A180E050A1416130E001B83001FFF001AFF0001FFFF86FF00A6FF001D128FB691A186260FC604C3A1032724A100271CA1022737A11B26381361CD5ACBA617CD577FA61DCD57A9A648CC574D109F2002119F4FC704F4A663C704F5AE62A607CD56C818901361A650CC574D3F62026105CD5AA012611F90BE62CD583FCC5821A6C0B7963F613F6281¬
+3478¬
+0¬ No data \ No newline at end of file
diff --git a/from_toebes/update/update.zsm b/from_toebes/update/update.zsm
new file mode 100644
index 0000000..bbbc0ba
--- /dev/null
+++ b/from_toebes/update/update.zsm
@@ -0,0 +1,133 @@
+;Name: Update
+;Version: UPDATE
+;Description: This is a simple number update program
+;by John A. Toebes, VIII
+;
+;TIP: Download your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!
+;HelpFile: watchapp.hlp
+;HelpTopic: 106
+ INCLUDE "WRISTAPP.I"
+;
+; (1) Program specific constants
+;
+FLAGBYTE EQU $61
+; Bit 1 indicates that we need to clear the display first
+;
+CURVAL EQU $62 ; The current value we are displaying
+;
+; (2) System entry point vectors
+;
+START EQU *
+L0110: jmp MAIN ; The main entry point - WRIST_MAIN
+L0113: rts ; Called when we are suspended for any reason - WRIST_SUSPEND
+ nop
+ nop
+L0116: rts ; Called to handle any timers or time events - WRIST_DOTIC
+ nop
+ nop
+L0119: rts ; Called when the COMM app starts and we have timers pending - WRIST_INCOMM
+ nop
+ nop
+L011c: rts ; Called when the COMM app loads new data - WRIST_NEWDATA
+ nop
+ nop
+
+L011f: lda STATETAB,X ; The state table get routine - WRIST_GETSTATE
+ rts
+
+L0123: jmp HANDLE_STATE0
+ db STATETAB-STATETAB
+;
+; (3) Program strings
+S6_UPDATE: timex6 "UPDATE"
+S6_SAMPLE: timex6 "SAMPLE"
+;
+; (4) State Table
+;
+STATETAB:
+ db 0
+ db EVT_ENTER,TIM_2_8TIC,0 ; Initial state
+ db EVT_TIMER2,TIM_ONCE,0 ; The timer from the enter event
+ db EVT_RESUME,TIM_ONCE,0 ; Resume from a nested app
+ db EVT_MODE,TIM_ONCE,$FF ; Mode button
+ db EVT_DNANY4,TIM_ONCE,0 ; NEXT, PREV, SET, MODE button pressed
+ db EVT_UPANY4,TIM_ONCE,0 ; NEXT, PREV, SET, MODE button released
+ db EVT_END
+;
+; (5) State Table 0 Handler
+; This is called to process the state events.
+; We see ENTER, TIMER2, RESUME, DNANY4 and UPANY4 events
+;
+HANDLE_STATE0:
+ bset 1,APP_FLAGS ; Indicate that we can be suspended
+ lda BTNSTATE ; Get the event
+ cmp #EVT_DNANY4 ; Did they press a button?
+ bne CHKENTER ; No, pass on to see what else there might be
+ lda BTN_PRESSED ; Let's see what the button they pressed was
+ cmp #EVT_PREV ; How about the PREV button
+ beq DO_PREV ; handle it
+ cmp #EVT_NEXT ; Maybe the NEXT button?
+ beq DO_NEXT ; Deal with it!
+ cmp #EVT_SET ; Perhaps the SET button
+ beq DO_SET ; If so, handle it
+ ; In reality, we can't reach here since we handled all three buttons
+ ; in the above code (the MODE button is handled before we get here and the
+ ; GLOW button doesn't send in an event for this). We can just fall through
+ ; and take whatever we get from it.
+CHKENTER
+ cmp #EVT_ENTER ; Is this our initial entry?
+ bne REFRESH
+;
+; This is the initial event for starting us
+;
+DO_ENTER
+ bclr 1,FLAGBYTE ; Indicate that we need to clear the display
+ jsr CLEARSYM ; Clear the display
+ lda #S6_UPDATE-START
+ jsr PUT6TOP
+ lda #S6_SAMPLE-START
+ jsr PUT6MID
+ lda #SYS8_MODE
+ jmp PUTMSGBOT
+;
+; (6) Our real working code...
+
+DO_NEXT
+ bset 0,SYSFLAGS ; Mark our update direction as up
+ bra DO_UPD
+DO_PREV
+ bclr 0,SYSFLAGS ; Mark our update direction as down
+DO_UPD
+ clra
+ sta UPDATE_MIN ; Our low end is 0
+ lda #99
+ sta UPDATE_MAX ; and the high end is 99 (the max since this is a 2 digit value)
+ ldx #CURVAL ; Point to our value to be updated
+ lda #UPD_MID34 ; Request updating in the middle of the display
+ jsr START_UPDATEP ; And prepare the update routine
+ bset 4,BTNFLAGS ; Mark that the update is now pending
+ bclr 1,FLAGBYTE
+ lda #SYS8_SET_MODE
+ jmp PUTMSGBOT
+
+DO_SET
+ clr CURVAL ; When they hit the set button, we just clear to zero
+SHOWVAL
+ brset 1,FLAGBYTE,NOCLEAR ; Do we need to clear the display first?
+REFRESH
+ jsr CLEARALL ; Yes, clear everything before we start
+ bset 1,FLAGBYTE ; And remember that we have already done that
+NOCLEAR
+ bclr 7,BTNFLAGS ; Turn off any update routine that might be pending
+ ldx CURVAL ; Get the current value
+ jsr FMTXLEAD0 ; Convert it to the two ascii digits
+ jmp PUTMID34 ; And put it on the screen in the right place
+;
+; (7) This is the main initialization routine which is called when we first get the app into memory
+;
+MAIN:
+ lda #$c0 ; We want button beeps and to indicate that we have been loaded
+ sta WRISTAPP_FLAGS
+ clr FLAGBYTE ; start with a clean slate
+ clr CURVAL
+ rts
diff --git a/include/dl150/WRISTAPP.I b/include/dl150/WRISTAPP.I
new file mode 120000
index 0000000..b477956
--- /dev/null
+++ b/include/dl150/WRISTAPP.I
@@ -0,0 +1 @@
+wristapp.i \ No newline at end of file
diff --git a/dl150/include/wristapp.i b/include/dl150/wristapp.i
index 0ea942c..f2ead43 100644
--- a/dl150/include/wristapp.i
+++ b/include/dl150/wristapp.i
@@ -706,6 +706,7 @@ TIM1_96TIC EQU $15 ; Almost ten seconds
TIM2_TIC EQU $80 ; This is the typical scroll interval
TIM2_2TIC EQU $81
TIM2_4TIC EQU $82
+TIM_2_8TIC EQU $83 ; This is the normal blink interval
TIM2_8TIC EQU $83 ; This is the normal blink interval
TIM2_12TIC EQU $84 ; Just over a second
TIM2_16TIC EQU $85 ; A second and a half
diff --git a/include/dl150s/WRISTAPP.I b/include/dl150s/WRISTAPP.I
new file mode 120000
index 0000000..b477956
--- /dev/null
+++ b/include/dl150s/WRISTAPP.I
@@ -0,0 +1 @@
+wristapp.i \ No newline at end of file
diff --git a/dl150s/include/wristapp.i b/include/dl150s/wristapp.i
index 13cac0b..13cac0b 100644
--- a/dl150s/include/wristapp.i
+++ b/include/dl150s/wristapp.i
diff --git a/number/number.asm b/number/number.asm
deleted file mode 100644
index 8a71702..0000000
--- a/number/number.asm
+++ /dev/null
@@ -1,117 +0,0 @@
-;Name: Numbers
-;Version: NUMBER
-;Description: This is a simple number count program
-;by John A. Toebes, VIII
-;
-;TIP: Download your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!
-;HelpFile: watchapp.hlp
-;HelpTopic: 106
- INCLUDE "wristapp.i"
-;
-; (1) Program specific constants
-;
-FLAGBYTE EQU $61
-; Bit 0 indicates that we want to show the segments instead of the message
-;
-CURVAL EQU $62 ; The current value we are displaying
-START EQU *
-;
-; (2) System entry point vectors
-L0110: jmp MAIN ; The main entry point - WRIST_MAIN
-L0113: rts ; Called when we are suspended for any reason - WRIST_SUSPEND
- nop
- nop
-L0116: rts ; Called to handle any timers or time events - WRIST_DOTIC
- nop
- nop
-L0119: rts ; Called when the COMM app starts and we have timers pending - WRIST_INCOMM
- nop
- nop
-L011c: rts ; Called when the COMM app loads new data - WRIST_NEWDATA
- nop
- nop
-
-L011f: lda STATETAB,X ; The state table get routine - WRIST_GETSTATE
- rts
-
-L0123: jmp HANDLE_STATE0
- db STATETAB-STATETAB
-;
-; (3) Program strings
-S6_NUMBER: timex6 "NUMBER"
-S6_COUNT: timex6 "COUNT "
-;
-; (4) State Table
-STATETAB:
- db 0
- db EVT_ENTER,TIM2_8TIC,0 ; Initial state
- db EVT_TIMER2,TIM_ONCE,0 ; The timer from the enter event
- db EVT_RESUME,TIM_ONCE,0 ; Resume from a nested app
- db EVT_DNNEXT,TIM_ONCE,0 ; Next button
- db EVT_DNPREV,TIM_ONCE,0 ; Prev button
- db EVT_DNSET,TIM_ONCE,0 ; Set button
- db EVT_MODE,TIM_ONCE,$FF ; Mode button
- db EVT_END
-;
-; (5) State Table 0 Handler
-; This is called to process the state events. We will see ENTER, RESUME, DNNEXT, DNPREV, DNSET, and TIMER2
-;
-HANDLE_STATE0:
- bset 1,APP_FLAGS ; Indicate that we can be suspended
- lda BTNSTATE ; Get the event
- cmp #EVT_DNNEXT ; Did they press the next button?
- beq DO_NEXT ; Yes, increment the counter
- cmp #EVT_DNPREV ; How about the PREV button
- beq DO_PREV ; handle it
- cmp #EVT_DNSET ; Maybe the set button?
- beq DO_SET ; Deal with it!
- cmp #EVT_ENTER ; Is this our initial entry?
- bne REFRESH
-;
-; This is the initial event for starting us
-;
-DO_ENTER
- bclr 1,FLAGBYTE ; Indicate that we need to clear the display
- jsr CLEARSYM ; Clear the display
- lda #S6_NUMBER-START
- jsr PUT6TOP
- lda #S6_COUNT-START
- jsr PUT6MID
- lda #SYS8_MODE
- jmp PUTMSGBOT
-;
-; (6) Our only real working code...
-DO_NEXT
- inc CURVAL
- lda CURVAL
- cmp #100
- bne SHOWVAL
-DO_SET
- clr CURVAL
-SHOWVAL
- brset 1,FLAGBYTE,NOCLEAR
-REFRESH
- jsr CLEARALL
- bset 1,FLAGBYTE
-NOCLEAR
- ldx CURVAL
- jsr FMTXLEAD0
- jmp PUTMID34
-DO_PREV
- lda CURVAL
- beq WRAPUP
- dec CURVAL
- bra SHOWVAL
-WRAPUP
- lda #99
- sta CURVAL
- bra SHOWVAL
-;
-; (7) This is the main initialization routine which is called when we first get the app into memory
-;
-MAIN:
- lda #$c0 ; We want button beeps and to indicate that we have been loaded
- sta WRISTAPP_FLAGS
- clr FLAGBYTE ; start with a clean slate
- clr CURVAL
- rts
diff --git a/password/password.asm b/password/password.asm
deleted file mode 100644
index d73c482..0000000
--- a/password/password.asm
+++ /dev/null
@@ -1,232 +0,0 @@
-;Name: Password
-;Version: PASSWD
-;Description: This is a simple number update/passwd program
-;by John A. Toebes, VIII
-;
-;TIP: Download your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!
-;HelpFile: watchapp.hlp
-;HelpTopic: 106
- INCLUDE "wristapp.i"
-;
-; (1) Program specific constants
-;
-FLAGBYTE EQU $61
-; Bit 0 indicates which digit we are working on (SET=SECOND DIGIT)
-; Bit 1 indicates that we need to clear the display first
-;
-DIGIT0 EQU $62 ; The first digit to enter
-DIGIT1 EQU $63 ; The second digit to enter
-;SYSTEMP0 EQU $A0
-;SYSTEMP1 EQU $A1
-;
-; (2) System entry point vectors
-;
-START EQU *
-L0110: jmp MAIN ; The main entry point - WRIST_MAIN
-L0113: rts ; Called when we are suspended for any reason - WRIST_SUSPEND
- nop
- nop
-L0116: rts ; Called to handle any timers or time events - WRIST_DOTIC
- nop
- nop
-L0119: rts ; Called when the COMM app starts and we have timers pending - WRIST_INCOMM
- nop
- nop
-L011c: rts ; Called when the COMM app loads new data - WRIST_NEWDATA
- nop
- nop
-
-L011f: lda STATETAB0,X ; The state table get routine - WRIST_GETSTATE
- rts
-
-L0123: jmp HANDLE_STATE0
- db STATETAB0-STATETAB0
-L0127: jmp HANDLE_STATE1
- db STATETAB1-STATETAB0
-;
-; (3) Program strings
-S6_TOEBES: timex6 "TOEBES"
-S6_SAMPLE: timex6 "SAMPLE"
-S6_PRESS: timex6 "PRESS "
-S8_PASSWORD: timex "PASSWORD"
-SX_MESSAGE timex "BY JOHN A. TOEBES, VIII"
- db SEPARATOR
-;
-; (4) State Table
-;
-STATETAB0:
- db 0
- db EVT_ENTER,TIM2_8TIC,0 ; Initial state
- db EVT_TIMER2,TIM_ONCE,0 ; The timer from the enter event
- db EVT_RESUME,TIM_ONCE,0 ; Resume from a nested app
- db EVT_MODE,TIM_ONCE,$FF ; Mode button
- db EVT_SET,TIM_ONCE,1 ; SET button pressed
- db EVT_END
-
-STATETAB1:
- db 1
- db EVT_RESUME,TIM_ONCE,1 ; Resume from a nested app
- db EVT_DNANY4,TIM_ONCE,1 ; NEXT, PREV, SET, MODE button pressed
- db EVT_UPANY4,TIM_ONCE,1 ; NEXT, PREV, SET, MODE button released
- db EVT_USER2,TIM_ONCE,0
- db EVT_END
-;
-; (5) State Table 0 Handler
-; This is called to process the state events.
-; We see ENTER, TIMER2, and RESUME events
-;
-HANDLE_STATE0:
- bset 1,APP_FLAGS ; Indicate that we can be suspended
- lda BTNSTATE ; Get the event
- cmp #EVT_ENTER ; Is this our initial entry?
- bne REFRESH0
-;
-; This is the initial event for starting us
-;
-DO_ENTER
- bclr 1,FLAGBYTE ; Indicate that we need to clear the display
- jsr CLEARSYM ; Clear the display
- lda #S6_TOEBES-START
- jsr PUT6TOP
- lda #S6_SAMPLE-START
- jsr PUT6MID
- lda #( ( S8_PASSWORD - $10 ) & $ff )
- jmp BANNER8
-;
-; We come here for a RESUME or TIMER2 event. For this we want to reset the display
-;
-REFRESH0
- brset 1,FLAGBYTE,NOCLEAR0 ; Do we need to clear the display first?
- bset 1,FLAGBYTE
- jsr CLEARSYM
-NOCLEAR0
- lda #S6_PRESS-START
- jsr PUT6TOP
- lda #SYS6_SET
- jsr PUTMSG2
- lda #SX_MESSAGE-START
- jmp SETUP_SCROLL
-;
-; (6) State Table 1 Handler
-; This is called to process the state events.
-; We see SET, RESUME, DNANY4, and UPANY4 events
-;
-HANDLE_STATE1:
- bset 1,APP_FLAGS ; Indicate that we can be suspended
- lda BTNSTATE ; Get the event
- cmp #EVT_UPANY4
- beq REFRESH
- cmp #EVT_DNANY4 ; Is this our initial entry?
- bne FORCEFRESH
- lda BTN_PRESSED ; Let's see what the button they pressed was
- cmp #EVT_PREV ; How about the PREV button
- beq DO_PREV ; handle it
- cmp #EVT_NEXT ; Maybe the NEXT button?
- beq DO_NEXT ; Deal with it!
- cmp #EVT_MODE ; Perhaps the MODE button
- beq DO_MODE ; If so, handle it
- ; It must be the set button, so take us out of this state
- lda #EVT_USER2
- jmp POSTEVENT
-;
-; (7) Our real working code...
-DO_NEXT
- bset 0,SYSFLAGS ; Mark our update direction as up
- bra DO_UPD
-DO_PREV
- bclr 0,SYSFLAGS ; Mark our update direction as down
-DO_UPD
- clra
- sta UPDATE_MIN ; Our low end is 0
- lda #99
- sta UPDATE_MAX ; and the high end is 99 (the max since this is a 2 digit value)
- brset 0,FLAGBYTE,UPD1
- ldx DIGIT1
- jsr FMTXLEAD0
- jsr PUTMID34
- ldx #DIGIT0 ; Point to our value to be updated
- lda #UPD_MID12 ; Request updating in the middle of the display
- bra UPD2
-UPD1
- ldx DIGIT0
- jsr FMTXLEAD0
- jsr PUTMID12
- ldx #DIGIT1
- lda #UPD_MID34
-UPD2
- jsr START_UPDATEP ; And prepare the update routine
- bset 4,BTNFLAGS ; Mark that the update is now pending
- bclr 1,FLAGBYTE
- lda #SYS8_SET_MODE
- jmp PUTMSGBOT
-
-DO_MODE
- lda FLAGBYTE
- eor #1
- sta FLAGBYTE
-
-REFRESH
- brset 1,FLAGBYTE,NOCLEAR ; Do we need to clear the display first?
-FORCEFRESH
- jsr CLEARALL ; Yes, clear everything before we start
- bset 1,FLAGBYTE ; And remember that we have already done that
-NOCLEAR
- bclr 7,BTNFLAGS ; Turn off any update routine that might be pending
- brset 0,FLAGBYTE,SET1
- ldx DIGIT1
- jsr FMTXLEAD0
- jsr PUTMID34
- ldx #DIGIT0
- lda #BLINK_MID12
- bra SET2
-SET1
- ldx DIGIT0
- jsr FMTXLEAD0
- jsr PUTMID12
- ldx #DIGIT1
- lda #BLINK_MID34
-SET2
- jsr START_BLINKP
- bset 2,BTNFLAGS ; Mark a blink routine as pending
- rts
-;
-; (8) This is the main initialization routine which is called when we first get the app into memory
-;
-MAIN:
- lda #$c0 ; We want button beeps and to indicate that we have been loaded
- sta WRISTAPP_FLAGS
- clr FLAGBYTE ; start with a clean slate
- clr DIGIT0
- clr DIGIT1
- rts
-;
-; (9) This subroutine is useful for getting a scrolling string on the screen
-;
-;----------------------------------------------------------------------
-; Routine:
-; SETUP_SCROLL
-; Parameters:
-; X - Offset from Start to the string
-; Returns:
-; MSGBUF - contains copied string
-; Purpose
-; This copies the current string into MSGBUF and calls the appropriate routines
-; to start it scrolling on the bottom line.
-;----------------------------------------------------------------------
-SETUP_SCROLL:
- clr SYSTEMP0
- sta SYSTEMP1
-DO_COPY:
- ldx SYSTEMP1 ; Get the pointer to the source character
- lda START,X ; Get the character that we are copying
- ldx SYSTEMP0 ; Get the pointer to the output buffer
- sta MSGBUF,X ; and store the character away
- inc SYSTEMP0 ; Increment our count
- inc SYSTEMP1 ; As well as the pointer to the character
- cmp #SEPARATOR ; Did we get a terminator character
- bne DO_COPY ; No, go back for more
- ;
- ; The string is now in a buffer terminated by a separator character
- ;
- jsr PUTSCROLLMSG ; Initialize the scrolling support
- jmp SCROLLMSG ; And tell it to actually start scrolling
diff --git a/tools/zap2app b/tools/zap2app
new file mode 100755
index 0000000..d57dc8b
--- /dev/null
+++ b/tools/zap2app
@@ -0,0 +1,14 @@
+#!/usr/bin/env perl
+
+open ZAP, "<", $ARGV[0];
+open APP, ">", $ARGV[1];
+
+while (<ZAP>) {
+ chop; chop; chop;
+ last if /^Timex Data Link 150 Watch$/;
+}
+while (<ZAP>) {
+ chop; chop; chop;
+ print APP pack 'H*', $_;
+ last;
+}
diff --git a/update/update.asm b/update/update.asm
deleted file mode 100644
index 63eeadb..0000000
--- a/update/update.asm
+++ /dev/null
@@ -1,133 +0,0 @@
-;Name: Update
-;Version: UPDATE
-;Description: This is a simple number update program
-;by John A. Toebes, VIII
-;
-;TIP: Download your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!
-;HelpFile: watchapp.hlp
-;HelpTopic: 106
- INCLUDE "wristapp.i"
-;
-; (1) Program specific constants
-;
-FLAGBYTE EQU $61
-; Bit 1 indicates that we need to clear the display first
-;
-CURVAL EQU $62 ; The current value we are displaying
-;
-; (2) System entry point vectors
-;
-START EQU *
-L0110: jmp MAIN ; The main entry point - WRIST_MAIN
-L0113: rts ; Called when we are suspended for any reason - WRIST_SUSPEND
- nop
- nop
-L0116: rts ; Called to handle any timers or time events - WRIST_DOTIC
- nop
- nop
-L0119: rts ; Called when the COMM app starts and we have timers pending - WRIST_INCOMM
- nop
- nop
-L011c: rts ; Called when the COMM app loads new data - WRIST_NEWDATA
- nop
- nop
-
-L011f: lda STATETAB,X ; The state table get routine - WRIST_GETSTATE
- rts
-
-L0123: jmp HANDLE_STATE0
- db STATETAB-STATETAB
-;
-; (3) Program strings
-S6_UPDATE: timex6 "UPDATE"
-S6_SAMPLE: timex6 "SAMPLE"
-;
-; (4) State Table
-;
-STATETAB:
- db 0
- db EVT_ENTER,TIM2_8TIC,0 ; Initial state
- db EVT_TIMER2,TIM_ONCE,0 ; The timer from the enter event
- db EVT_RESUME,TIM_ONCE,0 ; Resume from a nested app
- db EVT_MODE,TIM_ONCE,$FF ; Mode button
- db EVT_DNANY4,TIM_ONCE,0 ; NEXT, PREV, SET, MODE button pressed
- db EVT_UPANY4,TIM_ONCE,0 ; NEXT, PREV, SET, MODE button released
- db EVT_END
-;
-; (5) State Table 0 Handler
-; This is called to process the state events.
-; We see ENTER, TIMER2, RESUME, DNANY4 and UPANY4 events
-;
-HANDLE_STATE0:
- bset 1,APP_FLAGS ; Indicate that we can be suspended
- lda BTNSTATE ; Get the event
- cmp #EVT_DNANY4 ; Did they press a button?
- bne CHKENTER ; No, pass on to see what else there might be
- lda BTN_PRESSED ; Let's see what the button they pressed was
- cmp #EVT_PREV ; How about the PREV button
- beq DO_PREV ; handle it
- cmp #EVT_NEXT ; Maybe the NEXT button?
- beq DO_NEXT ; Deal with it!
- cmp #EVT_SET ; Perhaps the SET button
- beq DO_SET ; If so, handle it
- ; In reality, we can't reach here since we handled all three buttons
- ; in the above code (the MODE button is handled before we get here and the
- ; GLOW button doesn't send in an event for this). We can just fall through
- ; and take whatever we get from it.
-CHKENTER
- cmp #EVT_ENTER ; Is this our initial entry?
- bne REFRESH
-;
-; This is the initial event for starting us
-;
-DO_ENTER
- bclr 1,FLAGBYTE ; Indicate that we need to clear the display
- jsr CLEARSYM ; Clear the display
- lda #S6_UPDATE-START
- jsr PUT6TOP
- lda #S6_SAMPLE-START
- jsr PUT6MID
- lda #SYS8_MODE
- jmp PUTMSGBOT
-;
-; (6) Our real working code...
-
-DO_NEXT
- bset 0,SYSFLAGS ; Mark our update direction as up
- bra DO_UPD
-DO_PREV
- bclr 0,SYSFLAGS ; Mark our update direction as down
-DO_UPD
- clra
- sta UPDATE_MIN ; Our low end is 0
- lda #99
- sta UPDATE_MAX ; and the high end is 99 (the max since this is a 2 digit value)
- ldx #CURVAL ; Point to our value to be updated
- lda #UPD_MID34 ; Request updating in the middle of the display
- jsr START_UPDATEP ; And prepare the update routine
- bset 4,BTNFLAGS ; Mark that the update is now pending
- bclr 1,FLAGBYTE
- lda #SYS8_SET_MODE
- jmp PUTMSGBOT
-
-DO_SET
- clr CURVAL ; When they hit the set button, we just clear to zero
-SHOWVAL
- brset 1,FLAGBYTE,NOCLEAR ; Do we need to clear the display first?
-REFRESH
- jsr CLEARALL ; Yes, clear everything before we start
- bset 1,FLAGBYTE ; And remember that we have already done that
-NOCLEAR
- bclr 7,BTNFLAGS ; Turn off any update routine that might be pending
- ldx CURVAL ; Get the current value
- jsr FMTXLEAD0 ; Convert it to the two ascii digits
- jmp PUTMID34 ; And put it on the screen in the right place
-;
-; (7) This is the main initialization routine which is called when we first get the app into memory
-;
-MAIN:
- lda #$c0 ; We want button beeps and to indicate that we have been loaded
- sta WRISTAPP_FLAGS
- clr FLAGBYTE ; start with a clean slate
- clr CURVAL
- rts