BEGIN_DOC sch48.doc ******************************************************** SCH48 VERSION 2.0 A SCHEDULER FOR THE HP48 ******************* AUTHOR'S NOTE ******************************** I am very pleased with the way SCH48 has turned out, thanks to the many valuable suggestions I have received from users. Version 2.0 should be the last revision, barring any bugs which, of course, I will fix. It has been both an enjoyable and educational project and I am working on a few more. I hope SCH48 proves useful to you! ******************* UPDATES ******************************** CHANGES FROM VERSION 1.2: * The TakeOver commands that were removed in version 1.2 have been put back. It turns out they are needed if SCHED is executed from the command line. This should have only caused the calculator to hang forcing you to do ON-C (a warm-start) without any memory corruption. No one complained about this so I guess no one executes SCHED from the commandline. * Repeating alarm capabilities have been added. Repeating alarms show up on the future days to which they will be rescheduled. The repeat alarms on future days can be switched off to improve speed. An "R" in the upper part of the display is shown in reverse if future repeat alarms are displayed. The description of the alarm to the right will have a "(RPT)" added to it if it is a future position of a repeat alarm. SCH48 recognizes only repeat intervals greater than one day. To display repeat alarms with shorter intervals would be cumbersome and, in my opinion, of little use. SCH48 can set repeating alarms with repeat intervals that are an integral number of days. Again, shorter intervals would be better served by using the built-in HP ALARM function. * Control alarms are now supported and can be edited and set within SCH48. The prompt is a little different for setting alarms. For appointment alarms, a string delimiter (") is required so that the alarm EXEC will be interpretted as a string. For control alarms, the argument on the command line must evaluate to a single object or it will be considered invalid. This can be any object (e.g. program, list, etc.). The command line will be evaluated as it would if you were inputting to the stack so 1 2 3 + + would store the real number 6 as the alarm EXEC << 1 2 3 + + >> would store this as a program in the alarm EXEC 1 2 3 + would be invalid because it left two arg's on the stack "1 2 3 + +" would set an appointment alarm with the string as the EXEC Get it? * Marks in the form of one pixel to the right of each day indicate an alarm set for that day. This display can be turned off for the sake of speed. A pixel in the upper part of the display will be shown in reverse if date marks are on. * More key definitions for scrolling and moving months and years. In general, unshifted and right-shifted arrow keys move the date cursor; left-shifted arrow keys scroll the screen; right- shift-OFF turns the calc off; right-shift NXT moves the time and date cursors to the current time and date; +/- key toggles the future repeating alarm displays; EEX key toggles whether days with alarms are marked with a pixel. Other keys behave the same as before. CHANGES FROM VERSION 1.1: All the sys-RPL TakeOver commands were removed from the key definitions. This results in a savings of over 50 bytes. I have investigated whether the TakeOver commands are needed and came to the conclusion they are not for this application. This change has not given me any problems but no one has definitively explained the useage of TakeOver. If someone has a problem with this or can think of a possible problem, please let me know. Thanks! CHANGES FROM VERSION 1.0 (ORIGINAL VERSION): Two minor bugs were found and fixed. One involved the STD mode setting on the HP48. In version 1.0, the calender display was unless STD mode was used. This has been fixed. The other bug involved update of the appointments when keys were quickly pressed. Sometimes, the appointments would not match the day. Noone seems to have noticed this, but I did and it is fixed. Two features were added. A copy function copies an entire alarm to a different day. This is intended to compensate for the lack of repeating alarms in SCH48. Try this option to see if repeating alarms are still necessary. Let me know...Is this good enough or should I work on the repeating stuff? The scanning of repeating alarms to correctly indicate them on future dates might slow SCH48 down - how much, I don't know yet. An edit feature has also been added to allow you to change the alarm text without deleting and resetting. I found this handy. ************************* DESCRIPTION ************************* SCH48 is a library written entirely in system RPL and ML which allows the HP48 to function as an electronic "DAYTIMER". The intent is to replace the "ALARMS" catalog in the HP48 for a more useful and intuitive representation of appointments, events or blocks of time. SCH48 uses the existing ALARM functions built into the HP48. BUT...the user interface is improved (I hope). The SCH48 library contains two commands, D->CAL and SCHED. D->CAL merely takes a date from the stack and displays the calender for that month. The stack diagram is: ( date --> ) where "date" is in MM.DDYYYY or DD.MMYYYY format, depending on the HP48 setting. If YYYY is omitted, the current year is assumed. If a whole real number is input, it is interpreted as the month of the current year. SCHED is the primary function of the library. When this command is executed, a calender is displayed with the current day highlighted. To the right of the calender is a listing of the current ALARMs that are scheduled for the day. These alarms can be entered as a single point in time or as a block of time. The time or block of time is reflected in the listing of alarms. Below the calender is a 24 hour time-line which shows the times of the listed alarms blacked out. In this way, you can see graphically, how much of your day has been scheduled. I have attempted to present as much data as possible on a single screen for quick viewing, but the alarm text listings may extend beyond the window. Scrolling is provided for this. Once the SCHED is started, it is fairly self-explainatory. Alarms can be set, deleted (and acknowledged), moved, and edited. I have tried to make the functional keys intuitive. I thought about adding a help function but it seemed to be a waste of memory, so I'll leave it to you to read the documentation. **********************KEY DEFINITIONS************************* ************************************************************* NO SHIFT KEYS: ************************************************************* KEY DEFINITION {A} Scroll the screen fully to the left (JUMPLEFT) {F} scroll the screen fully to the right (JUMPRIGHT) {up arrow} {down arrow} {left arrow} {right arrow} Move the date cursor on the calender {NXT} Go to the next alarm {ENTER} Set the alarm - the user will be prompted for the alarm text. If a time has been marked (see {*} key), a block of time will be set; if not, a single time will be set. ATTN at the prompt will erase the contents of the command line if it is present. ATTN without a commandline, aborts the setting of the alarm. ENTER enters the alarm text. {DEL} Deletes the alarm if the time cursor is pointing at an alarm block on the timeline. If the time cursor is not pointing at an alarm, a error beep will be generated. {LEFT-SHIFT} Activates left shift mode {RIGHT-SHIFT} Activates right shift mode {*} (This is the "multiply" key) sets one end of a block of time on the time-line. {ENTER} determines the other end of the block of time. {-} Moves the time cursor 15 minutes to the left (hold down for repeat) {+} Moves the time cursor 15 minutes to the right (hold down for repeat) {+/-} Toggle the display of future repeat alarms {EEX} Toggle the display of marks on days with alarms ATTN Ends SCHED ************************************************************* LEFT SHIFT KEYS: ************************************************************* KEY DEFINITION {up arrow} {down arrow} Scrolls the screen up and down. This is necessary if a lot of alarms are set on a single day (the listing may extend beyond the bottom of the screen). Hold the key down to continue scrolling. {right arrow} {left arrow} Scrolls the screen left and right. Hold the key down to continue scrolling. {PREV} Go to the previous alarm {LEFT-SHIFT} Disables left shift mode {RIGHT-SHIFT} Activates right shift mode {-} Moves the time cursor 1 minutes to the left (hold down for repeat) {+} Moves the time cursor 1 minutes to the right (hold down for repeat) {EDIT} Edits the EXEC of the alarm that the time cursor is pointing to. ATTN at the prompt will erase the contents of the command line if it is present. ATTN without a commandline deletes the alarm. If you enter the EDIT function, and change your mind, ENTER will reset the alarm with the text indicated. Or, you can attention out of the EDIT and reset the alarm with the {LEFT SHIFT - ENTER} function. CONTROL alarms cannot be edited this way. If you accidentally try to edit a CONTROL alarm, ATTN out of the EDIT and reset the alarm using {LEFT SHIFT - ENTER}. {ENTER} Copies the alarm from the last DEL, NXT, PREV EDIT, or ENTER command to the current day. Use this feature to move, copy (repeat), an alarm by using one of the above commands to indicate the alarm of interest, move to a different day and set the alarm with the same time block and EXEC on that day. CONTROL alarms can use this too. ************************************************************* RIGHT SHIFT KEYS: ************************************************************* KEY DEFINITION {up arrow} {down arrow} Move the date cursor 4 weeks at a time {left arrow} {right arrow} Move the date cursor 1 year at a time {LEFT-SHIFT} Activates left shift mode {RIGHT-SHIFT} Disables right shift mode {NXT} Move time and date cursors to the current time and date {-} Moves the time cursor 1 hour to the left (hold down for repeat) {+} Moves the time cursor 1 hour to the right (hold down for repeat) {OFF} Turn calculator off *************FEATURES, LIMITATIONS, AND BUGS???************* An alarm can be moved by first deleting it. The alarm text is copied and will be the default the next time an alarm is set. Use this method if the time needs to be adjusted. If you only want to change the day, use {LEFT SHIFT - ENTER} An alarm can be copied by going to it by means of {NXT} or {PREV}. Again, the text will be copied and offered as a default the next time an alarm is set. Again, if only the day is to be changed, use {LEFT SHIFT - ENTER} To delete an alarm, move the cursor to the alarm block or use {NXT} or {PREV} and press {DEL}. An alarm may not show up on the time-line of it is a block alarm which spans less than 7 minutes. It cannot be edited or removed in SCH48 either. I didn't think this was much of a limitation, but if you don't like it, I can fix it. CONTROL ALARMS can now be set using SCHED. Any alarm EXEC that is not a string is set as a control alarm, just as the HP internal alarms work. The alarm EXEC must be a single object. The input line is treated just as the command line is treated when in the stack display. If more that one object result from the input line contents, an invalid EXEC error will occur and you will be prompted to alter the input. In most cases, the EXEC will be either a string, which must be surrounded by double quotes, or as a program which must be surrounded by << >>. The default prompt starts with two double quotes so that appointment alarms can be input easily. Remember, if you start over with ATTN to erase the input line of an appointment alarm, you must add a double quote mark. REPEAT alarms with repeat intervals that are an integral number of days can also now be set in SCHED. To do this, you must use the * (or multiply key) to mark the day to set the repeating alarm on (this also sets the endpoint of the alarm span but if the time cursor is not moved, the time span will be zero). Now, move to the day you wish to have the first repeat alarm appear and press ENTER (you can also move backwards the number of days you wish the time interval to be). The copy function is still available using left-shift-ENTER if you prefer that over the repeat alarms. SCHED should operate correctly with any HP48 time/date settings. I primarily use a 24 hour clock and MM.DDYYYY settings and haven't experienced any problems. Alarms not set from inside SCHED should work fine with the following exception. In order to set block times, the alarm time is set with the "begin" time as the time of the alarm. The end time is indicated by the fractional seconds of the alarm time. That's not clear, how about an example: An alarm from 8:15 a.m. to 11:45 a.m. is set with an alarm time = 08.15001145 If an alarm is created with arbitrary fractional seconds, the time-line may end up looking a little strange but no damage will be done. This carries with it another minor limitation that the end time of the alarm will be rounded to the nearest 5 minute interval. This is necessary because of accuracy problems with those fractional seconds (trust me). I may be able to fix this if enough of you wish it. Past due alarms will be acknowledged when they are deleted from within SCHED. The alarms will behave just like the HP48 handbook describes for appointment alarms. If you don't want the beeper going off, set flag -57. The display of marks on the days with alarms can slow SCH48 quite a bit when moving from month to month. Also, the display of future repeating alarms can slow things. For instance, if you have a repeating alarm with an interval of one day, every day will have a mark by it indicating that this repeating alarm will show up each day. If you want the marks but don't want the future repeat alarms, hit the +/- key to toggle this function. Then, only the original alarms will be shown with marks by the day and on the right side of the screen where the current days alarms are listed. If you don't marks at all (a lot of alarms will also slow things down a bit), then toggle this function using the EEX key. Both function are indicated in the upper part of the screen with an inverse "R" for the repeat function and an inverse single pixel for the mark function. If these are not shown in reverse, then they are off. The start up state of the mark and repeat functions is set by the system flag -43 (reschedule unacknowledged repeating alarms - if set, alarms are not rescheduled) and system flag -59 (fast catalog display - set and the marks on the dates are not initially shown). So if you don't use repeating alarms, things will be a little faster in SCH48 if you set flag -43. And if you don't want the marks, set flag -59. If these functions are toggled from withing SCH48, the system flags will be unaffected. ********************* CREDITS ********************************** SCH48 was written in system RPL and ML using the excellent RPL48 package written by Detlef Mueller and Raymond Hellstern. The SCH48 library was created using <-LIB->, again by Detlef Mueller, Raymond Hellstern, Rick Grevelle. THANKS to all of you for a tremendous contribution to the HP48 world!! Thanks also to HP for the RPL TOOLS and, especially, the RPLMAN documentation. And, of course, thanks to HP for such a versatile calculator. Thanks to Mika Heiskanen and other contributors to the entries lists that were posted at seq.uncwil.edu. Thanks to Jan Brittenson, whose MLDL was a great help. Thanks to Chris Spell for his tireless maintainance of comp.sources.hp48 and the archives. And thanks to all the helpful 48'ers who helped me get this far. I hope this will be a useful partial payback with, hopefully, more to come. ********************* DISCLAIMER ******************************* I have not had any problems with SCH48 while using it on my HP48-D but...It does contain some unsupported entry points. Although they have appeared on several of the "entries" lists, that doesn't guarantee that they will work the same on other revisions of the HP48. With that in mind...Have fun SCHeduling and certainly let me know of any problems! ****************** COPYRIGHT NOTICE *************************** Copyright (c), 1992, W.J. Levenson. Permission to copy this article is granted provided that the copies are not made or distributed for resale (excepting nominal copying fees). Other permissions can be arranged by contacting W.J. Levenson via email at the following address: akcs.levenson@hpcvbbs.cv.hp.com or by U.S. Mail at 12558 Caminito Mira Del Mar San Diego, CA 92130 USA SCH48 is distributed in the hope that it will be useful, but WITHOUT *ANY* WARRANTY. This software is LET-ME-KNOW-WARE. Please let me know if you like it or not and any improvements you would like to see. But MONEY will be accepted in lieu of the above!! ************************* INSTALLATION ************************** To install SCH48, a) download the ASC version, execute ASC->, or b) download the uudecoded version and recall it into the stack. Purge the variable which contains the orginal copy. Enter the port number (0,1,2) where you want to store SCH48 and press STO. Switch the HP48 off, then on again. SCH48 will now be installed. SIZE = 4854.5 bytes HP48 CHECKSUM = # D4FBh