Storing variables in mips and using the variables for calculations -
i'm new mips , know little trying simple conversion of java code mips explore little. mind shining light on problem or direct me answered question similar problem?
code i'm trying convert (java):
int x = 1, y = 2, z = 3; x = x + z; y = y + x; system.out.println(y);
what have (mips);
li $s1, 1 li $s2, 2 li $s3, 3 li $t1, 0 li $t2, 0 addi $t1, $s1, $s3 addi $t2, $s2, $t1 li $v0, 1 move $a0, $t2 syscall li $v0, 10 syscall
the code have in mips leads error states "operand of incorrect type" , i'm not sure why occurring.
Comments
Post a Comment