3 ms·
I recall being asked to look into a perplexing problem with some legacy technology a few years ago. An 80s era radio controller system was effectively some DOS
by billforsternz 10y ago
I recall being asked to look into a perplexing problem with some legacy technology a few years ago. An 80s era radio controller system was effectively some DOS software running on a DOS embedded board. The boards were dying from old age. Replacing them with modern industrial PC boards wasn't working as expected - the software wouldn't run. The techs had tried various methods of slowing down the hardware to match the software's expectations to no avail. After much probing about (all original source code was long ago lost - if it was ever available) I found the code was crashing inside something that looked like an RS232 driver. Specifically the software was using what was apparently an undocumented scratchpad register in the 8253/8254. The modern PC's hardware emulation didn't cover that (the data was always reading back as 0xff - enough of a problem to turn the delay_n_millisecs() type routine I think I was looking at into a delay_forever() routine). The lesson, as always, avoid undocumented quirks unless you have absolutely no alternative.