Programming Embedded Systems in C and C++ by Michael Barr The following changes were made in the 6/00 reprint: [69] 2nd paragraph: The following was added to the end of the paragraph: If the address bus test fails, the address at which the first error was detected will be returned. Otherwise, this function returns NULL to indicate success. The code used to read: datum * memTestAddressBus(volatile datum * baseAddress, unsigned long nBytes) { unsigned long offset; unsigned long testOffset; datum pattern = 0xAA; datum antipattern = 0x55; /* * Set the address mask that will be used as a stop condition. */ unsigned long addressMask = (nBytes - 1); int busWidth = 8 * sizeof(datum); switch (busWidth) { case 8: break; case 16: addressMask >>= 1; break; case 32: addressMask >>= 2; break; case 64: addressMask >>= 3; break; } /* * Write the default pattern at each of the power-of-two offsets. */ It now reads: datum* memTestAddressBus(volatile datum * baseAddress, unsigned long nBytes) { unsigned long addressMask = (nBytes - 1); unsigned long offset; unsigned long testOffset; datum pattern = (datum) 0xAAAAAAAA; datum antipattern = (datum) 0x55555555; /* * Write the default pattern at each of the power-of-two offsets. */ {69-72} All instances of: /*(Text)*/ in the code were changed back to: /* * (Text) */ as they were in the original printing. NOTE that these changes undo some of the changes that were made in the 3/00 reprint. Those previous changes broke the code, and are now corrected.