I am trying to output a text file which has MIPS code, however it keeps picking up the arguments and won't write them to the text file.
Code:
function errorMessage() {
echo "You have entered the wrong amount of arguments. The default files will now be used"
echo '#input.txt' > input.txt
"add $s0 $s1 $s2" >> input.txt
"sub $s2 $t0 $t3" >> input.txt
"add $s0 $s1 $z2" >> input.txt
"lw $t1 8($t2)" >> input.txt
"addi $t3 $s0 -9" >> input.txt
"sw $s3 4($t0)" >> input.txt
"lw $t11 70000($s0)'" >> input.txt
}
Results:
#input.txt
add
sub
add
lw 8()
addi -9
sw 4()
lw 70000()
echo "add \$s0 \$s1 \$s2" >> input.txt> input.txt