I tried to do the following:
andi $s7, $s6, 0x1 # (i + j) & 1 (to check if it's even)
however it generates an error... am I doing something wrong?
I tried to do the following:
andi $s7, $s6, 0x1 # (i + j) & 1 (to check if it's even)
however it generates an error... am I doing something wrong?
bneq does not exist.
Use
bne $s7,$zero,else
Post edit:
Heres a working example
#include<mips/regdef>
...
andi t1,t1,0x1
Please add any error msg!
Try
andi $s7, $s6, 1
Or
andi $23, $22, 1 # $22=$s6 and $23=$s7
If you use SPIM Simulator, first code should work.
Note that the comment of the code you show, does not describe the code line.
andi Rdest, Rsrc1, Imm
Put the logical AND of the integers from register Rsrc1 And Imm into register Rdest.