barrym95838 wrote:
Fresh bulb ... problem solved!
Good one, Mike!
Quote:
You didn't tell us the story, doc!
Yeah, well, it's kinda embarrassing -- as is the story about the uninitialized memory byte. In that case my downfall was wondering whether I was fighting a hardware or software fault, since the hardware and software were both new. But in fact both hardware and software were involved.
I knew the fault was intermittent. And, by mucking around with the power supply and I forget what else I discovered it was possible to have some limited influence on whether the system worked or failed (in hindsight, whether that uninitialized byte in RAM would wake up "right" or "wrong" after power-up -- it was actually only ONE BIT that mattered). Anyway, mucking around with hardware produced a result, and that convinced me I was dealing with a hardware problem. But it was 100% a software fault -- one of the face-palm variety -- which produced a flaky result
based on hardware.
The details are foggy, as this all happened in the late 1980's. But IIRC I was actually
aware I was accessing an uninitialized byte, and concluded it didn't matter! I was using an RTI instruction to jump to an address that had gotten pushed on stack. Through some forgotten chain of cause & effect, that meant the processor status register, P, would get loaded with garbage from a dummy byte also pushed to stack. But it didn't seem important, since all I cared about was the
address of the routines I'd be jumping to. The routines made no assumptions about Negative, Overflow and so on, so who cares, right? Um...
Except. For. Decimal. Mode. As for the system that only worked in the dark, that was much simpler. I was using an EPROM-based microcontroller (MC68HC705), and in those days I never bothered to cover up the little window in the EPROM because I didn't know any better and had never had a problem. Fortunately, when my luck ran out a colleague informed me that photoelectric effects can upset the chip, and it really is best to cover the window so it's kept in the dark.
_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html