💾 Archived View for mirrors.apple2.org.za › active › ftp.apple.asimov.net › images › disk_utils › up… captured on 2023-01-29 at 06:42:07.
-=-=-=-=-=-=-
Notes on DATE.SET.SOURCE Program and notes (C) 2000 by Aaron Heiss (heiss@pdx.edu) This is a program that sets the system date. I wrote it because I was frustrated at my Apple //c always saving things with no date stamp. Since this computer has no clock capability, software is required to initialise and/or update the ProDOS date. Many applications will sense this and allow the user to set the date on entry. However, many suffer from one form or another of the Y2K bug: some take '00' to mean '1900,' and others simply refuse to accept dates later than 1999 in the first place. So, I decided to take care of the problem myself. Seeing that others might find this thing useful as well, I decided to make it available to the public, and I thought that it might double as a good example of source code for my ENI Assembler. It is my hope that anyone interested in using the ENI Assembler will find it a helpful example. The source code is ready to assemble. The object code takes up three blocks of disk space, so you will need that much free on an available disk. It is important that the object file be named 'UP.DATE.SYSTEM' because the program saves itself upon exiting, and if it is not assembled under that name, it will produce an error message and/or another copy of itself with that name. It is likewise important that it never be either renamed or locked, for the same reason. If another name is required for the program, the FILENAME variable must be changed in the source code as well, and the program reassembled, if it is to work. Note that, if the length of the name is changed, the hexadecimal value before the string in the FILENAME variable will need to be changed to reflect that. Such renamed versions of this program may not be distributed, as that would violate the Freeware agreement not to distribute modified code. This restriction on the name of the program is a result of my decision to keep the date record as part of the program itself. The alternative was to have a separate file on the disk, which would mean one block (512 bytes) of space to hold two bytes of data! I thought that the inability to rename or lock the object file was much less than that of using up extra space on the disk and in the directory. Using the program is straightforward. Start the program, and there will be a title at the top and brief instructions at the bottom. The most recently set date will be displayed in the middle, and there will be an inverse-text cursor on the 'day' field. This cursor can be moved from one field to an adjacent one by using the left and right arrow keys, and the value currently selected can be incremented or decremented by using either the up and down arrow keys or the 'I' and 'D' keys (for compatibility with Apples without the up and down arrow keys). Incrementing the 'day' field past the maximum date for the current month causes the 'month' field to increment, and incrementing the 'month' field past December causes the year to increment. If the program is run every day or so, only the 'day' field need ever be adjusted. When the date is set to your satisfaction, press <RETURN> to save the current setting both in the ProDOS date variable and on the disk (so don't take the disk out while using the program!); if for some reason you want to leave the program without saving the current setting, hit <ESCAPE> instead. Either way, you will be returned to whatever selector or shell is currently set up. This program is distributed as Freeware. That means that although it is copyrighted, you can own, copy, distribute and use it however you like, provided that you 1) do not distribute it in anything other than unmodified form, and 2) you include this document (also unmodified) with it in the same package. This package need not be distributed with the ENI Assembler. It may not be distributed commercially without my explicit permission. You may use this source code as a template for your own programming projects without any further consideration or notice, but if you use any of the actual code itself, please indicate that in some form that is distributed with the program. If you have any comments, please contact me. I hope you find this of use!