Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!ames!ucbcad!ucbvax!decvax!tektronix!tekgen!tekigm2!timothym From: timothym@tekigm2.TEK.COM (Timothy D Margeson) Newsgroups: comp.sys.ibm.pc Subject: Re: IBM ROM Format??? Message-ID: <1669@tekigm2.TEK.COM> Date: Wed, 22-Apr-87 15:47:05 EST Article-I.D.: tekigm2.1669 Posted: Wed Apr 22 15:47:05 1987 Date-Received: Fri, 24-Apr-87 06:00:07 EST References: <4342@beta.UUCP> Reply-To: timothym@tekigm2.UUCP (Timothy D Margeson) Organization: Tektronix, Inc., Beaverton, OR. Lines: 32 In article <4342@beta.UUCP> myxm@beta.UUCP (Mike Mitchell) writes: >What is stumping me is the method in which the PC calculates a >checksum on the ROM. How is this checksum derived and what locations >Mike Mitchell It is easier than it looks. Just add ALL of the 8 bit locations together, modulo 256, and if the result is 0 then the ROM is valid (as far as the BIOS will be concerned). The byte that is used to adjust the checksum can be anywhere in the ROM, but is typically the last byte location. So, to create the checksum byte, add together all but one byte of the data in the ROM (we'll assume it to be the location holding the checksum), this can be done easiest in HEX. From the sum, strip any of the bits above XX (making the number between 0 and 255, essentially doing a mod 256 on it), add to this result a one byte value so that the final sum is 100, this one byte value is what you want to put into the ROM checksum location. Most ROM burners can do all but the last step for you (at least the Data I/O machines I've used). Good luck... -- Tim Margeson (206)253-5240 PO Box 3500 d/s C1-937 @@ 'Who said that?' Vancouver, WA. 98668 {amd..hplabs}cae780!tektronix!tekigm2!timothym (this changes daily)