Post Reply 
XALM: Set alarm for next occurrence of time in X
02-13-2020, 01:50 PM (This post was last modified: 02-18-2020 01:20 PM by Dave Britten.)
Post: #1
XALM: Set alarm for next occurrence of time in X
This is a small program I use to quickly set an alarm given just the time and message. The alarm will be set on the date of the next occurrence of the given time, whether today or tomorrow, and with no repeat.

This requires a Time Module, or a 41CX (or a 41 clone/emulator with similar functionality). Program size is 47 bytes, or 7 registers.

For convenience, I've assigned the program to the User key Shift-4 (BEEP). If you use a paper agenda, you could then quickly set reminder alarms for all of your appointments for the day, with as much lead time as you want.

Usage

Enter message into alpha, enter time into X (HH.MMSS, use 24-hour format or negative for PM), and then XEQ "XALM" to set the alarm.

EDIT: Added a couple of steps to handle negative values for PM like most built-in time functions.

Code:
LBL "XALM"
CF 09
X<0?
FS? 30
GTO 01
CHS
12
+
LBL 01
DATE
X<>Y
TIME
X<=Y?
SF 09
CLX
STO T
RDN
FS? 09
GTO 01
X<>Y
1
DATE+
X<>Y
LBL 01
XYZALM
END
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)