# MI_CpuFind*

## Syntax

  `#include <nitro/mi.h>`
  `void* MI_CpuFind8( const void* src, u8 data, u32 size );`
  `void* MI_CpuFind16( const void* src, u16 data, u32 size );`
  `void* MI_CpuFind32( const void* src, u32 data, u32 size );`

## Arguments

src | Source address to search.
data | Data to search for.
size | Search size.

## Return Values

If the data being searched for was found, it returns a pointer to that location. `NULL` is returned if the address is not found.

## Description

Searches through memory in the CPU for the specified data.

`MI_CpuFind8()` selects the most efficient memory access based on the source address to search, and appropriately searches through the memory for the specified data in 16-bit or 32-bit units. The alignment of the source address to search does not need to be considered.

`MI_CpuFind16()` searches through the memory for the specified data in 16-bit units. The source address to search must be 2-byte aligned.

`MI_CpuFind32()` searches through the memory for the specified data in 32-bit units. The source address to search must be 4-byte aligned.

## Internal Operation

Processing is done by the CPU only and does not use the DMA controller. It does not use a system call. `MI_CpuFind8` also performs reads in units of 16/32 bits, so accessing VRAM directly will not cause problems.

## See Also

## Revision History

2007/12/10 Initial version.

CONFIDENTIAL