Saturday, 14 September 2013

set on less than error - MIPS

set on less than error - MIPS

Ok, So I'm familiar with x86 Microsoft assembly but am super new to MIPS
assembly, I've chose MARS assembler but things aren't going really good..
main:
li $s0, 0
li $s1, 0
li $s5, 100
Loop: slti $t0, $S0, 100
beq $S3, $zero, Fin
add $s1, $S1, $s0
addi $S0, $s0, 1
j Loop
There's no single line without errors.. but I really can't figure why..
The code is right or that is what I believe..
Error in /home/****/Desktop/Ex.asm line 9 column 18: "$S0": operand is of
incorrect type
Error in /home/****/Desktop/Ex.asm line 10 column 12: "$S3": operand is of
incorrect type
Error in /home/****/Desktop/Ex.asm line 11 column 17: "$S1": operand is of
incorrect type
Error in /home/****/Desktop/Ex.asm line 12 column 12: "$S0": operand is of
incorrect type
I tested this on another Windows machine.. and it worked.. :? using Debian
here

No comments:

Post a Comment