Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!yale!mintaka!mit-eddie!uw-beaver!Teknowledge.COM!unix!hplabs!hp-pcd!hpvcfs1!johne From: johne@hpvcfs1.HP.COM (John Eaton) Newsgroups: comp.sys.ibm.pc Subject: Re: Need Help with ROM/empty address distinction Message-ID: <21990003@hpvcfs1.HP.COM> Date: 17 Jan 90 22:35:08 GMT References: <1990Jan15.162053.14109@ee.rochester.edu> Organization: Hewlett Packard, Vancouver, WA Lines: 33 <<< > but how do I distinguish between >ROM and nothing. In my experiments nothing sometimes is read as the >same hex data and other times the data changes between reads. ---------- Bus capacitance can be a big problem when trying to identify non-existant memory since you normally will read the last valid data on the buss. I once did a PC-compatible design using an 8086 that had several problems with this. It would randomly fail its POST by jumping into nonexistant ROM space. I traced it and found that it was reading a rom location to see if it was AA55. The code was such that when executed on a 8086 that the cycle before the read was a prefetch of the AA55 that the read was to be compared with. It passed! It then did a checksum on the "Rom" by adding all of its bytes to see if they sum to 00. This was done in a loop so that the value read was always the same value that was in the loop before the read. Since rom sizes were always a multiple of 256 bytes the sum always came out to 00. Many applications that search for memory rely on the program cycle accesses to trash the buss between the time they write something and read it back. We had seperated the 8 bit buss from the 16 bit cpu buss so that you could write a byte to the 8 bit buss and it would still be there the next time you did a 8 bit read. A lot of applications would think they found memory or I/O cards until we added circuitry to trash the buss between accesses. There are quite a few applications that search for the presence of a plug in card on the PC buss that really don't work in theory but work enough of the time that nobody notices. John Eaton !hpvcfs1!johne