From ee33718ab57c5a041b55c70c0ae7e046b3d1592b Mon Sep 17 00:00:00 2001 From: fishsoupisgood Date: Tue, 28 May 2019 12:09:03 +0100 Subject: general tidy up add all the timex apps and the toebes apps and numpad --- from_others/Makefile | 9 + from_others/numpad/Makefile | 58 ++++ from_others/numpad/numpad-a.zap | 33 ++ from_others/numpad/numpad-b.zap | 33 ++ from_others/numpad/numpad-c.zap | 33 ++ from_others/numpad/numpad-d.zap | 33 ++ from_others/numpad/numpad.txt | 165 +++++++++ from_others/numpad/numpad.zsm | 718 ++++++++++++++++++++++++++++++++++++++++ 8 files changed, 1082 insertions(+) create mode 100644 from_others/Makefile create mode 100644 from_others/numpad/Makefile create mode 100644 from_others/numpad/numpad-a.zap create mode 100644 from_others/numpad/numpad-b.zap create mode 100644 from_others/numpad/numpad-c.zap create mode 100644 from_others/numpad/numpad-d.zap create mode 100644 from_others/numpad/numpad.txt create mode 100644 from_others/numpad/numpad.zsm (limited to 'from_others') 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: + + <> + + 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 -- cgit v1.2.3