• API
• FAQ
• Tools
• Archive
daily pastebin goal
7%
SHARE
TWEET

# kutas

a guest Jun 13th, 2018 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
1. .data
2. T: .space 1120
3. TB: .space 816
4. ulamek: .double 0.25
6. jeden: .double 1
7. suma: .double 0
8. mnoznik: .double 2.2
9. mnoznik_2: .double 0.25
10. nr: .double 2
11. rozmiar: .word 102
12.
13.
14.
15. .text
17. ld f0, nr
19. ld f4, ulamek
20. ld f8, jeden
24.
25.
26. loop:
27. addd f10, f10, f8; f10+=1
28. sd 0(r10), f10; f10 -> [r10]
29. addi r10, r10, 8; r10+= sizeof(double)
30. addi r2, r2, 1; licznik+=1
31. seqi r20, r2, 130; if licznik != 130 goto loop else continue
32. beqz r20, loop
33.
36. add r2, r0, r0; licznik =0
37.
38. loop2:
39. ld f0, 0(r10); 0
40. ld f2, 8(r10); 1
41. ld f4, 16(r10); 2
42. ld f6, 24(r10); 3
43. ld f8, 32(r10); 4
44. ld f22, 40(r10); 5
45. ld f24, 48(r10); 6
46. ld f26, 56(r10); 7
47. ld f28, 64(r10); 8
48. ld f30, mnoznik
49.
50. multd f10, f0, f30; t[i] * 2.2 -> f10
51. multd f10, f10, f2; f10* t[i+1] -> f10
52.
53. multd f12, f4, f6 ;  t[i+2]*t[i+3] -> f12
54. multd f12, f12, f8; f12 * t[i+4] -> f12
55. addd f12, f12, f10; f12 + f10 -> f12
56.
57.
58. ld f30, mnoznik_2
59. multd f10,f30, f22
60. multd f10, f10, f24
61.
62. multd f0, f26, f28
63.
65.
66. divd f14, f12, f0;
67.
68. sd 0(r11), f14; zapis
69. addd f16, f16, f14 ; suma+=f14