Ref: article at: http://www.toggle.org/html/0011ART9.HTM
Users of the vintage 1986 DOS spreadsheet program SuperCalc 4 , and
possibly other SC versions were afflicted at the turn of the century
with the failure of the "TODAY" function, a command which inserts the
current date into a spreadsheet cell, and permits current date
dependant calculations of other dates and date related information to
be updated without user input.
The Y2K failure, according to the cited article, orginated in
careless programming of a date validation function, which accepted only
dates from 1900 through 1999, with no provision for override by the
user. This meant that the function failed, ungracefully, after
December 31, 1999, and that manual input of the current date was
required when calculations based on, or display of that date were
desired. Since the failure of the function resulted in the
constant display of a date of January 1, 2000 + 23,206,492 days
(November 30, 65535), an automated "work around" was not possible - the
necessary adjustment decreased one day with each passing day.
Bob Thomson's article, based on correspondence with Erich Wagner,
provides a procedure for using the Windows "Debug" function to change
the valid range of dates to include dates through 2100, thus correcting
the failure of the function.
I've the later SC4 version described in the article and was
able to "cookbook" the changes described in Bob Thomson's article
successfully.
Procedure:
Erich Wagner's second instruction to Bob Thomson was to:
"Try this:In my first trial case (run in the Command window of Win98SE) those commands returned:
DEBUG SC4.COM
S CS:0 FFF0 2A CD 21
then:
-U 118D:EEE2
returned:
118D:EEE2
2ACD
SUB CL,CH
118D:EEE4 2181F96C
AND
[BX+DI+6CF9],AX
118D:EEE8
07
POP ES
118D:EEE9 722F
JB EF1A
118D:EEEB 81F9D007
CMP
CX,07D0
118D:EEEF 7329
JNB EF1A
118D:EEF1 FECE
DEC DH
118D:EEF3 7825
JS EF1A
118D:EEF5 80FE0C
CMP
DH,0C
118D:EEF8 7320
JNB EF1A
118D:EEFA FEC6
INC DH
118D:EEFC FECA
DEC DL
118D:EEFE 781A
JS EF1A
118D:EF00 80FE1F
CMP
DH,1F
Which indicated to me that in this case I would index EEEB by 2, and
change the value from 700hex to 834hex as follows:
-e EEED 34 08
followed by the n, w, and q commands; all as Bob Thomson and Erich W.
wrote in the article.
"So I made a backup copy of SC4.COM, indexed CB23 by 2, and changed the value from 700hex to 834hex as follows:"I asked what condition of the debug process requires, the indexing (incrementing) of the displayed address value for the date validation compare command by 2? Mr. Wagner's response was that:
I infer that the command -e EEED 34 08 changes the value at EEED from D0 to 34 and the value at EEEE from 07 to 08. The reason for the reversal in order of the numbers in execution of the compare instructin is beyond me, but apparently has to do with the basic processes in which the machine executes instructions.The reason Bob wrote about ""Indexing by 2"" is that having found the address of the compare instruction one has to skip over the "compare" part of the instruction to get to the value which is being compared against. Thus in your case you found the compare instruction at EEEB but EEEB actually points to the 81 part of the compare instruction ("81F9D007", ed.); EEEC points to the F9 part of the compare instruction and EEED and EEEE to the actual number (07D0 bzw 0834) being compared with the CX register of the microprocessor, which needs changing.
Erich Wagner also responded to my request for background on Debug and its use generally. I have taken the liberty of highlighting his general caution about the use of the debug function:The way I suggested to find the date checking part involved the debug command
S CS:0 FFF0 2A CD 21
which boils down to:
Search (S)
from Code Segment offset zero (CS:0)
for the next approx 64,000 bytes (FFF0)
for this pattern: 2A CD 21 (the machine code for getting date from DOS)
OK, good, I am happy. I don't really understand more than I did before, but somehow I feel as if I do. And it gives me hooks to hang other new information on in the future, as well as tools with which to locate the information.Debug was a supplementary program to DOS, its commands are listed in MS-DOS manuals for versions 1.25 to 5.0. I think DOS 6 and 6.22 listed its command syntax in the online help system (e.g. help debug). From the command prompt DEBUG /? or debug <enter> ? should present a list of commands.
From DOS 7 (aka Win95) onwards all reference to it seems to be dropped. Any old DOS manual should have it. The definitive book of that era is the MS-DOS Encylopedia (Microsoft Press) from about 1987 which had about 1200 pages and cost about $200 then.
I must say Debug is really intended for machine code programmers who know what they're doing. I think MS included it as a last ditch way of patching applications when all else fails. You can do serious damage with debug - so please be very careful - and never use the W (write to disk) command unless you are confident you know what will happen.
http://www.google.com/search?hl=en&lr=&ie=ISO-8859-1&q=%22Using+SuperCalc+4%22+book&btnG=Search
http://www.amazon.com/exec/obidos/search-handle-url/index=books&field-keywords=SuperCalc4/ref=br_sub_/002-8198993-3871265
http://www.amazon.com/gp/product/offer-listing/0471859923//002-8198993-3871265?condition=all
http://www.amazon.com/gp/product/offer-listing/0395477867//002-8198993-3871265?condition=all