1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html> 3 4<head> 5<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 6<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 7.0.0.0 for Windows"> 7<META http-equiv="Content-Style-Type" content="text/css"> 8<title>MI_CpuComp</title> 9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css"> 10</head> 11 12<body> 13 14<h1 align="left">MI_CpuComp* <IMG src="../../image/NTR.gif" align="middle"><IMG src="../../image/TWL.gif" align="middle"></h1> 15<h2>Syntax</h2> 16 17<dl> 18 <dd> 19<CODE>#include <nitro/mi.h></CODE><BR> 20 <BR> 21 <CODE>int MI_CpuComp8( const void* mem1, const void* mem2, u32 size );</CODE><br> 22 <CODE>int MI_CpuComp16( const void* mem1, const void* mem2, u32 size );</CODE><br> 23 <CODE>int MI_CpuComp32( const void* mem1, const void* mem2, u32 size );</CODE><br> 24 </dd> 25</dl> 26<h2>Arguments</h2> 27<TABLE border="1" width="100%"> 28 <TBODY> 29 <TR> 30 <TD width="13%"><EM><STRONG>mem1</STRONG></EM></TD> 31 <TD width="87%">First address to compare.</TD> 32 </TR> 33 <TR> 34 <TD width="13%"><EM><STRONG>mem2</STRONG></EM></TD> 35 <TD width="87%">Second address to compare.</TD> 36 </TR> 37 <TR> 38 <TD><EM><STRONG>size</STRONG></EM></TD> 39 <TD>Comparison size. 40 </TD> 41 </TR> 42 </TBODY> 43</TABLE> 44 45<h2>Return Values</h2> 46<p>Returns 0 if the addresses being compared are equal, a negative value if <B><I>mem1</I></B> is smaller, or a positive value if <B><I>mem1</I></B> is larger.</p> 47 48<H2>Description</H2> 49<P>Uses CPU to perform a memory comparison.</P> 50<P><CODE>MI_CpuComp8()</CODE> compares using 8-bit units. The alignment of the addresses to compare does not matter.</P> 51<P><CODE>MI_CpuComp16()</CODE> compares using 16-bit units. The second address to compare must be 2-byte aligned.</P> 52<P><CODE>MI_CpuComp32()</CODE> compares using 32-bit units. The second address to compare must be 4-byte aligned.</P> 53 54<h2>Internal Operation</h2> 55<P>Processing is done by the CPU only and does not use the DMA controller. It does not use a system call. 56 57<h2>See Also</h2> 58 59<H2>Revision History</H2> 60<P> 612007/12/10 Initial version. 62</P> 63<hr><p>CONFIDENTIAL</p></body> 64</html> 65