Advertisement
Guest User

Untitled

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