0

This code is supposed to calculate the number e. And when I execute it in WinMips64 it gives me an error in line 1 that I am not able to see. Can you help me please?

    .data
res:    .float 1
rang:   .float 10
i:  .float 1
resultatactual: .float 1

    .text

L.D     F0, rang(R0)
L.D     F2, res(R0)
L.D     F4. i(R0)
L.D     F6, resultatactual(R0)

fact:   BEQ F4, 1, act
        MUL.D F6, F6, F4
        SUB.D F4, F4, 1
        j fact
act:    DIV.D R1, 1, F6 ;divideixo 1/fact
        SUM.D F2, R1, F2 ;actualitzo resultat   
        SUM.D F4, 1, F4 ; sumo i
        BNE F0, F4, fact ; si i!=10 fa un altre factorial
        HALT
raultds
  • 23
  • 4

0 Answers0