0

I am doing a project of Unit Converter in MARS MIPS simulator. I also need to store the results of conversions in a file. The result of conversion is a float which i need to store. I am using the code

###############################################################
# Write to file just opened
li   $v0, 15       # system call for write to file
move $a0, $s6      # file descriptor 
move $a1, $f0       
li   $a2, 30       
syscall            # write to file

I know that the $a0 does not contains the float value but i don't know what to do? .Please help me in solving this problem

wasif
  • 1
  • 1
  • See: [Single Point Precision MIPS Arithmetics](http://stackoverflow.com/questions/36143761/single-point-precision-mips-arithmetics) – Paul R Mar 26 '16 at 11:11

1 Answers1

0

Newbie here but let me try. I think the float value should be in the .data section e.g.

 .data
 writer: .float 1.5
cjj20
  • 60
  • 9