int my number [10];
void fun(int input, int* addr){
    if (input %2 == 0){
        *addr = 1;
    }
}

int main (){
    int i;
    for (i = 0; i < 10; i+=1){
        fun(number[i], &number[i]);
    }
    return 0;
}

The last MIPS project we had at the office used a C compiler so there would be little to no changes.

Maybe you wanted something else but didn't ask. Also, the MIPS C compiler would create an assembler file if need be.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.