***************************************************************************** * DOCUMENTATION FILE FOR HP48SX CALENDAR DRAWING FUNCTIONS * * Version 1.03 * * * * by Kevin Jessup August 30, 1991 * ***************************************************************************** [Note: Version 1.02 was on Goodies Disk #2. -jkh-] Version 1.03 differs from 1.02 in the following ways... - The calendar box is stored as a graphic object (GROB) rather than generated by a program. This makes the total package 500 bytes larger but execution speed is faster. - Days that have any alarms due are now shown with the numerals in reverse video rather than with a BOX character after them. The remainder of this documentation has been taken from version 1.02 with changes made as required. If you have successfully loaded the binary CALENDAR directory file, a directory named CALENDAR should now be in your current working directory. Place 'CALENDAR' on the stack, execute the BYTES command and verify the following... Checksum (on level 2): # D6D2 (hex) or # 54994 (decimal) Byte count (on level 1): 3091 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. 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. 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. CALGROB grob Graphics object of the calendar "frame". 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. Use at your own risk. This is freeware. Modify it and/or enhance it as you see fit. Kevin Jessup 9118 N. 85th St. Milwaukee, WI 53224