Y2K Patch for View Professional =============================== Y2KViewPro 1.00 J.G.Harston, 70 Camm Street, Walkley, Sheffield, S6 3TR jgh@arcade.demon.co.uk View Professional allows you to insert the current date into documents with the @d marker. Unfortunately, VP does not check the validity of the returned time string after calling Osword14 to read the Real Time Clock. This short program patches the View Professional support rom image and the View Professional 6502CoPro program code to make it check the returned date, and ensures the century is correct. When View Professional is used without a 6502 coprocessor, it is run from two roms, ViewProfA and ViewProfB, the second being the image that needs to be patched. When used with a 6502 coprocessor, it is run from a single file VP2nd6502. To patch the rom image it needs to be saved on disk. If you do not have an image on disk, you will need to save the rom. There is a *SrSave command supplied with this which will allow you to do this. The syntax is */SrSave + , so if ViewProfB is in rom slot 12, save it to disk using: */SrSave ViewProfB 8000+4000 C Once you have the ViewProfB image and the VP2nd6502 files on disk, run the Y2KViewPro program. It will ask for the filenames of the rom image and the program file, and the filenames to use to save the patched programs. If is pressed on its own, then than part of the program is skipped. Once the new rom image is saved, it can be blown into an Eprom and used to replace the original, or you can load it into sideways ram. There is a *SrLoad command supplied which will allow you to do this. The syntax is */SrLoad , so if you want to load the new rom image to slot 14, you would use: */SrLoad VPb_New 8000 E The NetFS fileserver interface defines the Acorn Era as starting in 1981, so, 1980 is used as the change-over point. When ViewPro reads the date, it checks the decade number. If the year is xx8x or xx9x, nothing is done. If the returned year is xx0x to xx7x, then the century is forced to be 20. This gives an effective year range of 1980 to 2079. To squeeze in the code it is written over the end of the code's copyright message. This version does not work with the Master Compact when the RTC is read from NetFS, as NetFS looses bit4 of the year, so wraps around from 1996 to 1981 and overflows into the date. This is easily fixed, but with the current version there is no more room left in ViewPb to fit it in. If the Compact reads the RTC from another source that correctly passes 1996, then the Y2K patch will work correctly. Version History --------------- 21-Dec-1998 v1.00 First version