rss
twitter
facebook

Home

Virgula Flutuante

int main(void)
{
float res;
int val1;
val1 = 35;
res = (float)val1 / 100.0;
print_flat(res);
return 0;
}


.data
.text
.globl main

main:
li.s $f6, 10.0 #f6 =100.0
li $t0,35 #val=35
mtc1 $t0, $f4
cvt.s.w $f4, $f4 #float(val1)

div.s $f12, $f4, $f6 #res=float(val1)\100.0
li $v0,2 #print.float(res)
syscall
li.s $f0,0.0
jr $ra

0 comentários:

 
Powered by Blogger