Advertisement
Guest User

Untitled

a guest
Jun 15th, 2018
248
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
ARM 0.59 KB | None | 0 0
  1. calc sin tab:
  2.     lea     sin tab,a0
  3.    
  4. ; calcul de tab[0..511] correspondant aux valeurs de x>0
  5.     moveq   #0,d0
  6. .1
  7.     move.w  #512,d1
  8.     sub.w   d0,d1
  9.     beq.b   .2       ; donc quand on sort, d0 vaut 512
  10.     mulu.w  d0,d1
  11.     addq.w  #1,d0
  12.     move.l  d1,(a0)+
  13.     bra.b   .1
  14.    
  15. ; calcul de tab[512..1023] correspondante aux valeurs de x<0
  16. ; on ne fait que recopier leaa table de la partie 1 en inversant le signe
  17. .2
  18.     move.l  -512*4(a0),d1
  19.     neg.l   d1
  20.     move.l  d1,(a0)+
  21.     subq.w  #1,d0
  22.     bne.b   .2
  23.  
  24. ; fini
  25.     rts
  26.  
  27. ; tableau de 4ko
  28. sin tab:
  29.     ds.l   1024
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement