/* Compare the code in the shared RAM of an IOP with a copy in system memory and return 0 on match or the first nonmatching system memory address on failure.  */
__u8* iop_compare_code(uint iop_num, __u8 *code_start, uint code_len, __u16 shared_ram_start)
/* Compare the code in the shared RAM of an IOP with a copy in system memory and return 0 on match or the first nonmatching system memory address on failure.  */
__u8* iop_compare_code(uint iop_num, __u8 *code_start, uint code_len, __u16 shared_ram_start)
{
	if ((iop_num >= NUM_IOPS) || !iop_base[iop_num]) return code_start;
	iop_loadaddr(iop_base[iop_num], shared_ram_start);
	while (code_len--) {
		if (*code_start != iop_base[iop_num]->ram_data) {
			return code_start;
		}
		code_start++;
	}
	return (__u8 *) 0;
}