***************************************************************************** * DOCUMENTATION FILE FOR HP48SX CALENDAR DRAWING FUNCTIONS * * Version 1.02 * * * * by Kevin Jessup October 23rd, 1990 * ***************************************************************************** [The HORN1 disk contains Kevin's first version, which doesn't work. This one works! -jkh-] A thousand appologies. I screwed up again! There was still a bug in the ALMDATE? routine that I said was fixed in version 1.01. So much for my software validation methods. Let's try one more time! Here is version 1.02. The ALMDATE? routine is the only difference between this and previous versions. If you have successfully loaded the binary CALENDAR directory file, a directory named "CALENDAR" should now be in your current working directory. Verify the following... Checksum: # 14BA (hex) or # 5306 (decimal) Byte count: 2479 Note: The checksum will change if the day, month or year global variables have been modified since you downloaded the directory! Introduction ------------ These routines will display a calendar graphic for a specific year and month on the 48SX display. Functions are provided to move the calendar forward or backwards in month or year increments. Day of week and leap year func- tions are also provided. The CALENDAR directory should contain the following objects in the order they appear below. For ease of use, DO NOT re-order the directory. Objects preceeded with an asterisk (*) are described in detail later. All other objects are subroutines used by the main functions and are NOT described. A listing of ALL objects is provided at the end of the documentation. Name Object type Purpose ------- ----------- -------------------------------------------------- * CURR program Draws a calendar for the current month. * <-Y program Draws a calendar for the previous year, same month. * Y-> program Draws a calendar for the next year, same month. * <-M program Draws a calendar for the previous month, same year. * M-> program Draws a calendar for the next month, same year. * PCAL program Prints the last calendar dislayed. * CAL program Given specific month and year, draws the calendar. * DOW program Returns current day of week string to stack. * SDOW program Given a date, returns day of week string to stack. * RDOW program Given a date, returns day of week number to stack. * LPYR program Given a year, determines if it is a leap year. * ALMDATE? program Given a date, determines if any alarms are due. MOY list Months of the year. DIM list Number of days in the months. DOWL list Days of the week. GENC program Main calendar graphic generating function. FILLD program Adds days and alarm flags to the calendar graphic. MONTHBOX program Draws the calendar graphic lines and days of week. CPSDT program Compress date and time. EXPDT program Expand date and time. JFIX program Adjust for date mode. day real number year real number month real number PPAR list Plot parameters. Detailed function descriptions ------------------------------ CURR Draws a calendar for the current month. A graphic display of the month, year and appropriately positioned day numbers is generated. Days that have an alarm associated with them will contain a box to mark the alarm. <-Y Same as CURR but backs up one year. Y-> Same as CURR but moves forward one year. <-M Same as CURR but backs up one month. M-> Same as CURR but moves forward one month. PCAL Prints the current contents of the PICT variable. If some other program has not deleted PICT or modified it, the object printed should be the last calendar you displayed. CAL Given a date on the stack in valid HP48SX date format (MM.DDYYYY or DD.MMYYYY) displays the calendar for the month as in CURR. DOW Returns the current day of week text string to the stack. SDOW Given a date as in CAL, returns the day of week text string to the stack. RDOW Same as SDOW but returns a real number. Sunday = 0, Monday = 1, ... Saturday = 6. LPYR Given a year on level 1, returns 1 if it is a leap year, else 0. ALMDATE? Given a date as in CAL, returns 1 if alarms are due on that date, else 0. Always returns 0 if date input is less than the current date (Does not detect past-due alarms!). Warranties and Support ---------------------- None provided. Programs are supplied AS IS. Shareware --------- Please support the HP48SX "shareware" concept by either contributing a few bucks to the author (address below) or posting your own USEFUL programs on the HP48SX BBS! Kevin Jessup 9118 N. 85th St. Milwaukee, WI 53224