Advertisement
glokyfull

c and asm packer for specific curves

Jun 26th, 2023
2,078
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <math.h>
  4.    
  5.  
  6. static const double PI=3.14159265358979;
  7. void make_packedtab(int nbe,int* tableau)
  8. {  
  9. static  int delta[32000];
  10. static  int delta2[32000];
  11.     for (int i=0;i<nbe-1;i++)
  12.     {
  13.       delta[i]=tableau[i+1]-tableau[i];
  14.      
  15.     }
  16.        
  17.     for (int i=0;i<nbe-2;i++)
  18.     {
  19.         delta2[i]=delta[i+1]-delta[i];
  20.     }
  21.     printf("    dc.w %d  ; nombre d'element depack\n",nbe);
  22.     printf("    dc.w %d\n",tableau[0]);
  23.     printf("    dc.w %d\n",delta[0]);       // value du premier delta tab[0]+delta[0]=tab[1]
  24.      int line=0;
  25.     for (int i=0;i<nbe-1;i+=2)
  26.     {
  27.         int octet=(delta2[i] & 15)*16+(delta2[i+1] & 15);
  28.       if ((i & 31)==0)  
  29.       {line++;
  30.           if (line==16)
  31.           {
  32.               printf("\n");
  33.               line=0;
  34.           }
  35.           printf("\n\tdc.b\t  %d",octet);}
  36.       else
  37.       {
  38.             printf(",%d",octet);
  39.       }
  40.      
  41.      
  42.     }
  43.     printf("\n\n");
  44. }
  45. int main()
  46. {
  47.     int* tab=malloc(32000*sizeof(int));
  48.  
  49.     tab[512]=0;
  50.     for (int i=0;i<512;i++)
  51.     {
  52.         double angle=i*2*PI/512;
  53.         tab[i]=(32766*sin(angle));
  54.        
  55.     }
  56.     make_packedtab(512,&tab[0]);
  57.     tab[2048]=0;
  58.     for (int i=0;i<2048;i++)
  59.     {
  60.         double angle=i*2*PI/2048;
  61.         tab[i]=(32766*sin(sin(angle)*PI));
  62.     }
  63.        
  64.     make_packedtab(2048,&tab[0]);
  65.  
  66.     tab[8192]=0;
  67.     for (int i=0;i<8192;i++)
  68.     {
  69.         double angle=i*2*PI/8192;
  70.         tab[i]=(32766*sin(PI*sin(sin(angle)*PI)));
  71.     }
  72.        
  73.     make_packedtab(8192,&tab[0]);
  74.    
  75.  
  76.     printf (";fin\n");
  77.     return 0;
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84. }
  85.  
  86.  
  87. partie asm  PACKER.S
  88.  
  89.  
  90. ; depack periodictable
  91. ; a0 = packed data
  92. ; a1 = unpacked data
  93. depackperiod
  94.     lea extnibble,a2
  95.  
  96.     move.w (a0)+,d0     ; nombre d'element de la table finale
  97.     move.w (a0)+,d1     ; tab[0]
  98.     move.w (a0)+,d2     ; delta[0]=tab[1]-tab[0]
  99.     move.w d0,d3
  100.     subq #2,d3      ; nombre de delta de delta: delta2[0]=delta[1]-delta[0]
  101.     lsr #1,d3
  102. .ok
  103.     subq #1,d3
  104.     ;bset #0,d3         ; si paire = nb impair d'element on set a +1
  105.                         ; si impair  nb pair d'lement on ne change rien
  106.     move.w d1,(a1)+     ; tab[0]
  107.    
  108. .loop
  109.     add d2,d1           ; tab[0]+delta[0]=tab[1]
  110.     move.w d1,(a1)+
  111.    
  112.     move.b (a0)+,d4      lire 2 valeur
  113.     move.w d4,d5
  114.     and.w #$F0,d4
  115.     lsr #4,d4
  116.     move.b (a2,d4.w),d4
  117.     ext.w d4
  118.     add d4,d2           : delta2[0]=delta[1]-delta[0]  d2= delta[1]=tab[2]-tab[1]
  119.    
  120.     add d2,d1
  121.     move.w d1,(a1)+
  122.     and.w #$F,d5
  123.     move.b (a2,d5.w),d5
  124.     ext.w d5
  125.     add d5,d2
  126.  
  127.     dbf d3,.loop
  128.     add d2,d1
  129.     move.w d1,(a1)+
  130.     rts
  131.  
  132.    
  133. extnibble   dc.b 0,1,2,3,4,5,6,7,$F8,$f9,$fa,$fb,$fc,$fd,$fe,$ff
  134.     even
  135.     DATA
  136. packed_sinus_table:
  137.  
  138. sin1pack
  139.    dc.w 512  ; nombre d'element depack
  140.     dc.w 0
  141.     dc.w 402
  142.  
  143.     dc.b      0,241,240,240,240,240,224,255,254,14,13,14,254,239,238,253
  144.     dc.b      253,253,239,207,221,252,238,206,222,206,206,205,221,220,220,235
  145.     dc.b      221,204,205,204,205,189,189,189,188,203,219,203,203,218,204,188
  146.     dc.b      187,203,203,187,202,218,188,187,187,202,203,187,187,187,202,202
  147.     dc.b      202,203,187,187,187,202,203,187,188,186,218,203,187,203,203,188
  148.     dc.b      188,202,219,203,203,219,204,189,189,189,189,204,205,204,205,219
  149.     dc.b      236,220,221,221,206,206,206,222,206,236,253,223,207,237,253,253
  150.     dc.b      254,239,238,254,13,14,14,255,240,224,240,240,240,241,240,0
  151.     dc.b      0,31,16,16,16,16,32,17,18,2,3,2,18,33,34,19
  152.     dc.b      19,19,33,65,51,20,34,66,50,66,66,67,51,52,52,37
  153.     dc.b      51,68,67,68,67,83,83,83,84,69,53,69,69,54,68,84
  154.     dc.b      85,69,69,85,70,54,84,85,85,70,69,85,85,85,70,70
  155.     dc.b      70,69,85,85,85,70,69,85,84,86,54,69,85,69,69,84
  156.     dc.b      84,70,53,69,69,53,68,83,83,83,83,68,67,68,67,53
  157.     dc.b      36,52,51,51,66,66,66,50,66,36,19,49,65,35,19,19
  158.     dc.b      18,33,34,18,3,2,2,17,16,32,16,16,16,31,16,0
  159.     even
  160.    
  161. sin2pack
  162.    dc.w 2048  ; nombre d'element depack
  163.     dc.w 0
  164.     dc.w 315
  165.  
  166.     dc.b      16,241,240,0,240,15,15,0,255,15,240,255,240,255,224,255
  167.     dc.b      255,255,224,239,224,239,239,239,254,254,239,238,254,253,254,253
  168.     dc.b      253,254,238,238,238,237,254,222,238,238,222,237,238,237,237,252
  169.     dc.b      253,237,237,237,238,221,238,221,252,237,238,207,207,206,237,222
  170.     dc.b      222,222,221,238,221,237,237,237,222,237,237,237,237,237,252,238
  171.     dc.b      237,222,238,222,237,238,237,238,237,253,238,237,253,253,253,239
  172.     dc.b      223,223,238,238,239,223,253,254,239,238,254,254,239,254,224,223
  173.     dc.b      255,239,224,208,254,255,254,14,255,14,255,255,14,14,15,240
  174.     dc.b      224,255,15,240,255,15,15,15,241,225,225,240,240,15,0,15
  175.     dc.b      0,15,31,0,0,0,241,15,16,0,0,0,1,0,0,1
  176.     dc.b      0,31,16,16,1,0,1,16,0,17,0,17,242,0,16,17
  177.     dc.b      1,1,1,16,16,17,16,2,1,1,17,1,16,17,16,32
  178.     dc.b      2,1,17,1,47,33,1,17,16,18,0,33,2,1,17,2
  179.     dc.b      16,17,17,17,16,32,18,1,17,16,33,2,1,32,17,17
  180.     dc.b      17,17,2,2,2,2,1,18,1,17,17,16,33,16,33,2
  181.  
  182.     dc.b      2,1,32,18,1,17,17,17,17,17,17,16,33,2,2,16
  183.     dc.b      18,2,1,32,17,17,17,17,17,17,17,2,16,33,2,2
  184.     dc.b      1,32,17,32,17,17,17,2,17,2,2,2,2,1,17,17
  185.     dc.b      17,16,33,2,1,32,17,17,2,16,32,17,17,17,16,18
  186.     dc.b      1,17,2,1,32,2,16,17,17,1,47,33,1,17,2,0
  187.     dc.b      32,17,16,17,1,17,1,2,0,17,16,16,17,1,1,1
  188.     dc.b      16,16,2,241,16,1,16,0,17,0,1,0,16,31,16,1
  189.     dc.b      0,0,1,0,0,0,0,31,1,240,0,0,15,31,0,15
  190.     dc.b      0,15,0,240,241,225,225,255,15,15,15,240,255,15,240,224
  191.     dc.b      255,14,14,15,255,254,15,254,14,255,254,240,208,239,239,255
  192.     dc.b      208,238,255,238,254,254,239,238,253,255,223,238,238,239,223,223
  193.     dc.b      237,253,253,253,238,237,253,238,237,238,237,238,222,238,221,238
  194.     dc.b      236,253,237,237,237,237,238,221,237,237,237,222,237,222,222,222
  195.     dc.b      221,238,207,207,206,237,236,253,222,237,222,237,237,237,237,252
  196.     dc.b      253,237,238,237,238,222,238,238,222,253,238,238,238,238,253,253
  197.     dc.b      254,253,254,254,239,238,254,255,239,239,224,239,224,239,255,255
  198.  
  199.     dc.b      240,239,240,255,240,255,15,240,15,15,0,240,0,241,240,16
  200.     dc.b      240,31,16,0,16,1,1,0,17,1,16,17,16,17,32,17
  201.     dc.b      17,17,32,33,32,33,33,33,18,18,33,34,18,19,18,19
  202.     dc.b      19,18,34,34,34,35,18,50,34,34,50,35,34,35,35,20
  203.     dc.b      19,35,35,35,34,51,34,51,20,35,34,65,65,66,35,50
  204.     dc.b      50,50,51,34,51,35,35,35,50,35,35,35,35,35,20,34
  205.     dc.b      35,50,34,50,35,34,35,34,35,19,34,35,19,19,19,33
  206.     dc.b      49,49,34,34,33,49,19,18,33,34,18,18,33,18,32,49
  207.     dc.b      17,33,32,48,18,17,18,2,17,2,17,17,2,2,1,16
  208.     dc.b      32,17,1,16,17,1,1,1,31,47,47,16,16,1,0,1
  209.     dc.b      0,1,241,0,0,0,31,1,240,0,0,0,15,0,0,15
  210.     dc.b      0,241,240,240,15,0,15,240,0,255,0,255,30,0,240,255
  211.     dc.b      15,15,15,240,240,255,240,14,15,15,255,15,240,255,240,224
  212.     dc.b      14,15,255,15,225,239,15,255,240,254,0,239,14,15,255,14
  213.     dc.b      240,255,255,255,240,224,254,15,255,240,239,14,15,224,255,255
  214.     dc.b      255,255,14,14,14,14,15,254,15,255,255,240,239,240,239,14
  215.  
  216.     dc.b      14,15,224,254,15,255,255,255,255,255,255,240,239,14,14,240
  217.     dc.b      254,14,15,224,255,255,255,255,255,255,255,14,240,239,14,14
  218.     dc.b      15,224,255,224,255,255,255,14,255,14,14,14,14,15,255,255
  219.     dc.b      255,240,239,14,15,224,255,255,14,240,224,255,255,255,240,254
  220.     dc.b      15,255,14,15,224,14,240,255,255,15,225,239,15,255,14,0
  221.     dc.b      224,255,240,255,15,255,15,14,0,255,240,240,255,15,15,15
  222.     dc.b      240,240,14,31,240,15,240,0,255,0,15,0,240,241,240,15
  223.     dc.b      0,0,15,0,0,0,0,241,15,16,0,0,1,241,0,1
  224.     dc.b      0,1,0,16,31,47,47,17,1,1,1,16,17,1,16,32
  225.     dc.b      17,2,2,1,17,18,1,18,2,17,18,16,48,33,33,17
  226.     dc.b      48,34,17,34,18,18,33,34,19,17,49,34,34,33,49,49
  227.     dc.b      35,19,19,19,34,35,19,34,35,34,35,34,50,34,51,34
  228.     dc.b      36,19,35,35,35,35,34,51,35,35,35,50,35,50,50,50
  229.     dc.b      51,34,65,65,66,35,36,19,50,35,50,35,35,35,35,20
  230.     dc.b      19,35,34,35,34,50,34,34,50,19,34,34,34,34,19,19
  231.     dc.b      18,19,18,18,33,34,18,17,33,33,32,33,32,33,17,17
  232.  
  233.     dc.b      16,33,16,17,16,17,1,16,1,1,0,16,0,31,16,0
  234. sin3pack
  235.    dc.w 8192  ; nombre d'element depack
  236.     dc.w 0
  237.     dc.w 248
  238.  
  239.     dc.b      0,241,0,241,240,0,15,0,15,0,240,15,0,240,240,240
  240.     dc.b      240,255,0,255,15,240,255,14,30,14,0,239,15,255,255,14
  241.     dc.b      14,14,14,14,14,255,14,224,254,14,255,224,239,254,255,255
  242.     dc.b      239,239,255,239,254,254,255,239,254,224,208,238,255,238,255,239
  243.     dc.b      239,239,238,13,255,238,255,208,238,254,239,254,239,239,238,255
  244.     dc.b      238,254,254,239,254,239,238,255,238,255,238,254,254,254,224,223
  245.     dc.b      254,254,254,254,254,255,238,13,13,14,254,254,255,254,224,238
  246.     dc.b      14,224,239,239,255,224,238,14,255,254,14,254,15,239,240,208
  247.     dc.b      255,224,254,14,240,224,224,224,224,255,255,255,14,15,255,240
  248.     dc.b      224,14,14,30,15,255,15,15,240,225,224,15,240,255,0,255
  249.     dc.b      15,0,255,0,240,240,240,15,15,30,31,15,0,15,0,240
  250.     dc.b      0,15,0,241,240,0,15,0,30,16,15,31,0,31,0,0
  251.     dc.b      0,0,15,16,31,0,0,31,31,16,0,0,1,241,0,1
  252.     dc.b      241,0,0,16,0,1,0,1,0,1,241,31,16,31,17,241
  253.     dc.b      1,241,31,17,241,31,17,0,1,0,16,16,1,0,16,16
  254.  
  255.     dc.b      1,1,0,16,16,1,1,0,17,242,241,16,1,1,1,0
  256.     dc.b      17,0,16,16,1,16,1,1,1,1,1,1,0,17,242,0
  257.     dc.b      16,16,16,16,16,16,2,241,16,1,16,1,1,16,1,1
  258.     dc.b      1,1,1,1,1,1,0,47,17,0,17,0,17,0,16,17
  259.     dc.b      242,0,16,2,241,16,16,1,16,1,16,1,1,1,1,0
  260.     dc.b      17,1,242,0,16,16,16,16,1,16,1,1,1,1,0,17
  261.     dc.b      242,242,242,241,16,1,1,0,47,16,16,16,16,1,31,47
  262.     dc.b      17,0,16,16,1,16,0,17,0,16,16,1,31,17,0,16
  263.     dc.b      16,1,1,1,242,241,16,1,0,17,241,16,1,0,16,16
  264.     dc.b      1,0,16,16,31,17,0,16,1,1,0,1,31,17,0,1
  265.     dc.b      1,0,1,31,17,241,31,17,241,31,17,241,31,17,241,31
  266.     dc.b      16,16,0,16,1,0,16,0,16,1,0,1,1,241,1,241
  267.     dc.b      1,0,0,16,31,16,1,0,1,241,31,16,0,16,0,31
  268.     dc.b      16,31,16,0,16,0,1,241,1,241,241,1,241,241,1,240
  269.     dc.b      16,0,1,241,0,0,0,16,241,0,1,241,241,15,16,1
  270.     dc.b      240,31,1,15,16,0,0,0,0,1,240,1,240,31,1,241
  271.  
  272.     dc.b      240,31,1,240,31,0,1,240,0,15,16,15,31,31,1,240
  273.     dc.b      0,241,15,31,0,0,0,241,240,0,15,31,0,0,15,1
  274.     dc.b      225,15,31,15,31,31,241,241,255,31,31,241,240,0,240,0
  275.     dc.b      241,225,15,0,240,0,240,0,240,15,31,241,255,31,15,31
  276.     dc.b      241,255,31,15,0,15,241,240,241,225,240,240,15,0,240,15
  277.     dc.b      0,240,240,15,15,30,31,241,255,0,240,15,15,15,30,31
  278.     dc.b      240,15,0,240,240,240,15,15,0,240,240,240,15,15,15,0
  279.     dc.b      240,240,240,15,15,15,0,255,30,31,240,15,15,15,0,255
  280.     dc.b      30,31,240,15,241,255,15,0,240,240,15,241,224,0,255,0
  281.     dc.b      240,240,15,15,15,0,255,30,31,241,225,225,240,240,240,15
  282.     dc.b      241,255,0,240,15,241,255,0,240,15,241,255,30,31,241,255
  283.     dc.b      0,240,15,0,240,240,15,0,240,15,15,30,31,15,0,15
  284.     dc.b      15,0,241,225,240,241,255,0,15,30,31,15,30,16,255,31
  285.     dc.b      0,240,0,240,15,31,241,240,241,240,15,0,15,31,241,240
  286.     dc.b      0,240,0,240,30,31,31,15,31,0,241,240,0,241,240,15
  287.     dc.b      31,0,0,240,31,241,15,0,0,15,31,0,0,15,1,240
  288.  
  289.     dc.b      0,241,241,240,0,0,241,241,240,0,0,15,16,240,31,0
  290.     dc.b      0,0,0,241,15,31,31,1,240,0,31,0,0,0,241,0
  291.     dc.b      0,241,0,15,16,241,0,241,0,15,16,0,241,0,0,0
  292.     dc.b      0,0,31,0,1,241,241,241,241,0,241,0,0,1,240,31
  293.     dc.b      31,16,241,0,1,240,1,241,15,16,0,31,1,241,15,16
  294.     dc.b      31,0,16,241,0,0,31,31,16,0,0,31,16,0,0,1
  295.     dc.b      241,0,0,1,241,0,0,31,16,241,31,1,15,16,31,31
  296.     dc.b      16,0,31,16,0,0,16,0,0,1,0,0,1,241,0,31
  297.     dc.b      31,16,31,31,16,1,241,0,0,31,16,1,241,15,47,1
  298.     dc.b      0,0,31,16,31,1,0,1,241,0,0,16,0,1,241,0
  299.     dc.b      31,16,0,1,0,0,31,16,1,241,0,31,31,17,241,241
  300.     dc.b      1,241,0,0,16,0,0,16,0,31,16,1,241,0,0,16
  301.     dc.b      0,1,0,0,31,16,31,31,17,241,241,1,241,0,0,16
  302.     dc.b      0,1,0,0,31,16,31,31,47,1,241,31,1,0,1,15
  303.     dc.b      47,1,0,0,31,17,240,16,0,31,16,1,241,0,31,16
  304.     dc.b      0,16,241,31,16,0,1,0,0,31,16,31,16,0,1,0
  305.  
  306.     dc.b      0,16,0,1,15,47,1,0,1,241,0,31,16,0,16,0
  307.     dc.b      0,16,0,31,16,1,241,0,1,15,47,1,0,0,16,0
  308.     dc.b      1,0,0,31,16,31,16,0,1,0,0,31,17,240,16,0
  309.     dc.b      31,16,1,241,0,31,16,0,16,241,31,16,0,1,15,47
  310.     dc.b      1,0,1,15,17,241,15,47,31,16,31,16,0,1,0,0
  311.     dc.b      16,0,1,241,1,241,241,31,31,16,31,16,0,1,0,0
  312.     dc.b      16,0,1,241,0,31,16,0,16,0,0,16,0,1,241,1
  313.     dc.b      241,241,31,31,16,1,241,0,31,16,0,1,0,0,31,16
  314.     dc.b      1,241,0,0,16,0,1,241,0,1,15,16,31,16,0,1
  315.     dc.b      15,47,1,241,0,31,16,0,1,241,0,31,31,16,31,31
  316.     dc.b      16,1,241,0,0,1,0,0,0,16,0,0,31,16,0,31
  317.     dc.b      31,16,31,1,15,17,240,31,16,0,1,241,0,0,1,241
  318.     dc.b      0,0,0,31,16,0,0,31,31,16,0,1,240,16,15,16
  319.     dc.b      31,1,241,15,16,0,31,1,241,0,241,0,1,240,31,31
  320.     dc.b      16,241,0,0,1,240,1,241,241,241,241,0,15,16,0,0
  321.     dc.b      0,0,1,240,0,31,0,1,240,1,240,31,0,1,240,0
  322.  
  323.     dc.b      1,240,0,0,15,16,0,241,15,31,31,1,240,0,0,0
  324.     dc.b      15,16,240,31,0,0,0,241,241,240,0,0,241,241,240,0
  325.     dc.b      241,15,0,0,15,31,0,0,15,1,255,16,240,0,15,31
  326.     dc.b      0,241,240,0,241,240,15,31,15,31,30,16,240,0,240,0
  327.     dc.b      241,255,31,0,15,0,241,240,241,255,31,0,240,0,240,15
  328.     dc.b      31,240,30,31,15,30,31,0,15,241,240,241,225,240,15,15
  329.     dc.b      0,15,15,30,31,15,0,240,15,0,240,240,15,0,240,15
  330.     dc.b      241,255,30,31,241,255,0,240,15,241,255,0,240,15,241,255
  331.     dc.b      0,240,240,241,225,225,255,30,31,240,15,15,15,0,240,240
  332.     dc.b      15,240,0,225,255,0,240,240,15,15,241,255,0,255,30,31
  333.     dc.b      240,15,15,15,0,255,30,31,240,15,15,15,0,240,240,240
  334.     dc.b      15,15,15,0,240,240,240,15,15,0,240,240,240,15,0,255
  335.     dc.b      30,31,15,15,0,240,15,241,255,30,31,15,0,240,240,15
  336.     dc.b      0,240,15,0,240,241,225,240,241,255,0,15,15,31,241,255
  337.     dc.b      31,15,31,241,255,31,0,240,0,240,0,240,15,1,225,240
  338.     dc.b      0,240,0,241,255,31,31,241,241,255,31,31,15,31,1,225
  339.  
  340.     dc.b      15,0,0,15,31,0,0,241,240,0,0,15,31,1,240,0
  341.     dc.b      241,15,31,31,0,31,0,0,241,0,15,16,241,15,16,241
  342.     dc.b      241,15,16,241,0,241,0,0,0,0,0,31,1,15,16,241
  343.     dc.b      0,31,1,241,241,0,1,240,16,0,0,1,241,0,0,16
  344.     dc.b      241,1,241,241,1,241,241,1,241,0,0,16,0,31,16,31
  345.     dc.b      16,0,16,0,31,17,241,0,1,0,31,16,16,0,1,1
  346.     dc.b      241,1,241,1,0,1,0,16,0,16,1,0,16,0,16,31
  347.     dc.b      17,241,31,17,241,31,17,241,31,17,241,31,17,0,1,1
  348.     dc.b      0,1,31,17,0,1,1,0,16,1,31,16,16,16,1,0
  349.     dc.b      16,16,1,0,17,241,16,1,0,17,242,241,1,1,0,16
  350.     dc.b      16,1,31,17,0,16,16,1,16,0,17,0,16,16,1,31
  351.     dc.b      47,17,0,16,16,16,31,32,1,1,0,17,242,242,242,241
  352.     dc.b      16,1,1,1,1,0,17,0,16,16,16,16,2,241,1,16
  353.     dc.b      1,1,1,1,0,17,0,17,0,16,17,242,0,16,2,241
  354.     dc.b      16,16,1,16,1,16,1,31,32,1,1,1,1,1,1,1
  355.     dc.b      1,0,17,1,0,17,0,17,242,0,16,16,16,16,16,16
  356.  
  357.     dc.b      2,241,16,1,1,1,1,1,1,0,17,0,16,16,1,16
  358.     dc.b      1,1,1,0,17,242,241,16,1,1,0,16,16,1,1,0
  359.     dc.b      16,16,1,0,16,16,1,0,1,31,17,241,31,17,241,1
  360.     dc.b      241,31,16,31,17,241,0,1,0,1,0,0,16,0,1,241
  361.     dc.b      0,1,241,0,0,0,31,31,16,0,15,16,31,0,0,0
  362.     dc.b      0,15,16,15,31,0,30,16,15,0,0,241,240,15,0,0
  363.     dc.b      240,15,0,15,15,30,31,15,0,240,240,240,15,240,15,15
  364.     dc.b      240,15,240,255,0,225,224,255,15,15,255,14,30,14,0,224
  365.     dc.b      255,255,14,15,255,255,240,224,224,224,224,254,14,240,239,240
  366.     dc.b      208,255,239,14,254,14,255,254,14,224,239,255,239,224,238,14
  367.     dc.b      224,238,255,254,254,254,13,13,14,239,254,254,254,254,254,255
  368.     dc.b      208,238,254,254,254,239,254,239,254,239,238,255,238,254,254,239
  369.     dc.b      254,239,239,238,255,238,254,224,223,254,239,253,14,239,239,239
  370.     dc.b      239,254,239,254,224,208,238,255,239,254,254,255,239,255,239,239
  371.     dc.b      255,254,255,224,239,254,14,240,238,15,254,14,14,14,14,14
  372.     dc.b      15,255,255,15,224,14,14,30,15,240,255,15,240,15,240,240
  373.  
  374.     dc.b      240,240,240,15,0,240,15,0,15,0,0,241,240,1,240,0
  375.     dc.b      0,31,0,31,16,0,1,0,1,0,16,1,0,16,16,16
  376.     dc.b      16,17,0,17,1,16,17,2,242,2,0,33,1,17,17,2
  377.     dc.b      2,2,2,2,2,17,2,32,18,2,17,32,33,18,17,17
  378.     dc.b      33,33,17,33,18,18,17,33,18,32,48,34,17,34,17,33
  379.     dc.b      33,33,34,3,17,34,17,48,34,18,33,18,33,33,34,17
  380.     dc.b      34,18,18,33,18,33,34,17,34,17,34,18,18,18,32,49
  381.     dc.b      18,18,18,18,18,17,34,3,3,2,18,18,17,18,32,34
  382.     dc.b      2,32,33,33,17,32,34,2,17,18,2,18,1,33,16,48
  383.     dc.b      17,32,18,2,16,32,32,32,32,17,17,17,2,1,17,16
  384.     dc.b      32,2,2,242,1,17,1,1,16,47,32,1,16,17,0,17
  385.     dc.b      1,0,17,0,16,16,16,1,1,242,241,1,0,1,0,16
  386.     dc.b      0,1,0,31,16,0,1,0,242,240,1,241,0,241,0,0
  387.     dc.b      0,0,1,240,241,0,0,241,241,240,0,0,15,31,0,15
  388.     dc.b      31,0,0,240,0,15,0,15,0,15,31,241,240,241,255,31
  389.     dc.b      15,31,241,255,31,241,255,0,15,0,240,240,15,0,240,240
  390.  
  391.     dc.b      15,15,0,240,240,15,15,0,255,30,31,240,15,15,15,0
  392.     dc.b      255,0,240,240,15,240,15,15,15,15,15,15,0,255,30,0
  393.     dc.b      240,240,240,240,240,240,14,31,240,15,240,15,15,240,15,15
  394.     dc.b      15,15,15,15,15,15,0,225,255,0,255,0,255,0,240,255
  395.     dc.b      30,0,240,14,31,240,240,15,240,15,240,15,15,15,15,0
  396.     dc.b      255,15,30,0,240,240,240,240,15,240,15,15,15,15,0,255
  397.     dc.b      30,30,30,31,240,15,15,0,225,240,240,240,240,15,241,225
  398.     dc.b      255,0,240,240,15,240,0,255,0,240,240,15,241,255,0,240
  399.     dc.b      240,15,15,15,30,31,240,15,0,255,31,240,15,0,240,240
  400.     dc.b      15,0,240,240,241,255,0,240,15,15,0,15,241,255,0,15
  401.     dc.b      15,0,15,241,255,31,241,255,31,241,255,31,241,255,31,241
  402.     dc.b      240,240,0,240,15,0,240,0,240,15,0,15,15,31,15,31
  403.     dc.b      15,0,0,240,241,240,15,0,15,31,241,240,0,240,0,241
  404.     dc.b      240,241,240,0,240,0,15,31,15,31,31,15,31,31,15,16
  405.     dc.b      240,0,15,31,0,0,0,240,31,0,15,31,31,1,240,15
  406.     dc.b      16,241,15,1,240,0,0,0,0,15,16,15,16,241,15,31
  407.  
  408.     dc.b      16,241,15,16,241,0,15,16,0,1,240,1,241,241,15,16
  409.     dc.b      0,31,1,241,0,0,0,31,16,0,1,241,0,0,1,15
  410.     dc.b      47,1,241,1,241,241,31,31,17,241,241,31,16,0,16,0
  411.     dc.b      31,47,1,0,16,0,16,0,16,1,241,31,17,241,1,241
  412.     dc.b      31,17,241,1,0,1,31,16,31,47,16,16,1,0,16,1
  413.     dc.b      0,16,16,1,1,242,241,31,17,0,16,1,1,1,242,241
  414.     dc.b      16,1,0,16,16,16,1,1,0,16,16,16,1,1,1,0
  415.     dc.b      16,16,16,1,1,1,0,17,242,241,16,1,1,1,0,17
  416.     dc.b      242,241,16,1,31,17,1,0,16,16,1,31,32,0,17,0
  417.     dc.b      16,16,1,1,1,0,17,242,241,31,47,47,16,16,16,1
  418.     dc.b      31,17,0,16,1,31,17,0,16,1,31,17,242,241,31,17
  419.     dc.b      0,16,1,0,16,16,1,0,16,1,1,242,241,1,0,1
  420.     dc.b      1,0,31,47,16,31,17,0,1,242,241,1,242,240,17,241
  421.     dc.b      0,16,0,16,1,241,31,16,31,16,1,0,1,241,31,16
  422.     dc.b      0,16,0,16,242,241,241,1,241,0,31,16,0,31,16,1
  423.     dc.b      241,0,0,16,241,31,1,0,0,1,241,0,0,1,15,16
  424.  
  425.     dc.b      0,31,31,16,0,0,31,31,16,0,0,1,240,16,241,0
  426.     dc.b      0,0,0,31,1,241,241,15,16,0,241,0,0,0,31,0
  427.     dc.b      0,31,0,1,240,31,0,31,0,1,240,0,31,0,0,0
  428.     dc.b      0,0,241,0,15,31,31,31,31,0,31,0,0,15,16,241
  429.     dc.b      241,240,31,0,15,16,15,31,1,240,0,241,15,31,1,240
  430.     dc.b      241,0,240,31,0,0,241,241,240,0,0,241,240,0,0,15
  431.     dc.b      31,0,0,15,31,0,0,241,240,31,241,15,1,240,241,241
  432.     dc.b      240,0,241,240,0,0,240,0,0,15,0,0,15,31,0,241
  433.     dc.b      241,240,241,241,240,15,31,0,0,241,240,15,31,1,225,15
  434.     dc.b      0,0,241,240,241,15,0,15,31,0,0,240,0,15,31,0
  435.     dc.b      241,240,0,15,0,0,241,240,15,31,0,241,241,255,31,31
  436.     dc.b      15,31,0,0,240,0,0,240,0,241,240,15,31,0,0,240
  437.     dc.b      0,15,0,0,241,240,241,241,255,31,31,15,31,0,0,240
  438.     dc.b      0,15,0,0,241,240,241,241,225,15,31,241,15,0,15,1
  439.     dc.b      225,15,0,0,241,255,16,240,0,241,240,15,31,0,241,240
  440.     dc.b      0,240,31,241,240,0,15,0,0,241,240,241,240,0,15,0
  441.  
  442.     dc.b      0,240,0,15,1,225,15,0,15,31,0,241,240,0,240,0
  443.     dc.b      0,240,0,241,240,15,31,0,15,1,225,15,0,0,240,0
  444.     dc.b      15,0,0,241,240,241,240,0,15,0,0,241,255,16,240,0
  445.     dc.b      241,240,15,31,0,241,240,0,240,31,241,240,0,15,1,225
  446.     dc.b      15,0,15,1,255,31,1,225,241,240,241,240,0,15,0,0
  447.     dc.b      240,0,15,31,15,31,31,241,241,240,241,240,0,15,0,0
  448.     dc.b      240,0,15,31,0,241,240,0,240,0,0,240,0,15,31,15
  449.     dc.b      31,31,241,241,240,15,31,0,241,240,0,15,0,0,241,240
  450.     dc.b      15,31,0,0,240,0,15,31,0,15,1,240,241,240,0,15
  451.     dc.b      1,225,15,31,0,241,240,0,15,31,0,241,241,240,241,241
  452.     dc.b      240,15,31,0,0,15,0,0,0,240,0,0,241,240,0,241
  453.     dc.b      241,240,241,15,1,255,16,241,240,0,15,31,0,0,15,31
  454.     dc.b      0,0,0,241,240,0,0,241,241,240,0,15,16,240,1,240
  455.     dc.b      241,15,31,1,240,0,241,15,31,0,31,0,15,16,241,241
  456.     dc.b      240,31,0,0,15,16,15,31,31,31,31,0,1,240,0,0
  457.     dc.b      0,0,15,16,0,241,0,15,16,15,16,241,0,15,16,0
  458.  
  459.     dc.b      15,16,0,0,1,240,0,31,1,241,241,15,16,0,0,0
  460.     dc.b      1,240,16,241,0,0,0,31,31,16,0,0,31,31,16,0
  461.     dc.b      31,1,0,0,1,241,0,0,1,15,17,240,16,0,1,241
  462.     dc.b      0,31,16,0,31,16,1,241,1,241,242,240,16,0,16,0
  463.     dc.b      31,17,241,0,1,0,31,16,31,17,241,0,16,0,16,1
  464.     dc.b      241,16,242,241,1,242,241,0,1,31,16,31,47,16,1,1
  465.     dc.b      0,1,1,242,241,1,0,16,1,0,16,16,1,0,16,1
  466.     dc.b      31,17,242,241,31,17,0,16,1,31,17,0,16,1,31,17
  467.     dc.b      0,16,16,31,47,47,17,242,241,16,1,1,1,0,16,16
  468.     dc.b      1,16,0,47,17,0,16,16,1,1,31,17,0,17,242,241
  469.     dc.b      16,1,1,1,0,17,242,241,16,1,1,1,0,16,16,16
  470.     dc.b      1,1,1,0,16,16,16,1,1,0,16,16,16,1,0,17
  471.     dc.b      242,241,1,1,0,16,1,31,17,242,241,1,0,16,16,1
  472.     dc.b      0,16,1,0,16,31,47,16,31,17,0,1,1,241,31,17
  473.     dc.b      241,1,241,31,17,241,0,16,0,16,0,16,1,15,47,16
  474.     dc.b      0,16,0,31,17,241,241,31,31,17,241,241,1,241,15,47
  475.  
  476.     dc.b      1,0,0,1,241,0,0,31,16,0,0,1,241,15,16,0
  477.     dc.b      31,1,241,241,0,241,0,0,31,0,1,240,31,1,240,31
  478.     dc.b      31,1,240,31,0,31,0,0,0,0,0,241,15,1,240,31
  479.     dc.b      0,241,15,31,31,0,15,16,240,0,0,15,31,0,0,240
  480.     dc.b      31,15,31,31,15,31,31,15,31,0,0,240,0,241,240,241
  481.     dc.b      240,0,240,0,241,255,31,0,15,0,241,240,240,0,15,15
  482.     dc.b      31,15,31,15,0,15,0,240,0,240,15,0,240,0,240,241
  483.     dc.b      255,31,241,255,31,241,255,31,241,255,31,241,255,0,15,15
  484.     dc.b      0,15,241,255,0,15,15,0,240,15,241,240,240,240,15,0
  485.     dc.b      240,240,15,0,255,31,240,15,0,255,30,31,15,15,0,240
  486.     dc.b      240,15,241,255,0,240,240,15,240,0,255,0,240,240,15,241
  487.     dc.b      225,255,0,240,240,240,241,224,15,15,0,255,30,30,30,31
  488.     dc.b      240,15,15,15,15,0,255,0,240,240,240,240,14,31,15,240
  489.     dc.b      15,15,15,15,0,255,0,255,0,240,255,30,0,240,14,31
  490.     dc.b      240,240,15,240,15,240,15,241,224,15,15,15,15,15,15,15
  491.     dc.b      15,0,255,15,0,255,0,255,30,0,240,240,240,240,240,240
  492.  
  493.     dc.b      14,31,240,15,15,15,15,15,15,0,255,0,240,240,15,240
  494.     dc.b      15,15,15,0,255,30,31,240,15,15,0,240,240,15,15,0
  495.     dc.b      240,240,15,0,240,240,15,0,15,241,255,31,241,255,31,15
  496.     dc.b      31,241,240,241,255,31,0,15,0,15,0,0,240,0,15,31
  497.     dc.b      0,15,31,0,0,0,241,241,240,0,1,240,241,0,0,0
  498.     dc.b      0,1,240,1,241,0,242,240,1,0,0,31,16,1,0,0
  499.     dc.b      16,1,0,1,1,242,241,1,0,16,16,16,1,16,1,1
  500.     dc.b      16,1,16,17,0,47,32,17,1,1,17,2,242,2,0,32
  501.     dc.b      17,17,2,1,17,17,16,32,32,32,32,18,2,16,33,16
  502.     dc.b      48,17,33,2,18,2,17,18,2,32,33,17,33,32,34,2
  503.     dc.b      32,34,17,18,18,18,3,3,2,33,18,18,18,18,18,17
  504.     dc.b      48,34,18,18,18,33,18,33,18,33,34,17,34,18,18,33
  505.     dc.b      18,33,33,34,17,34,18,32,49,18,33,19,2,33,33,33
  506.     dc.b      33,18,33,18,32,48,34,17,33,18,18,17,33,17,33,33
  507.     dc.b      17,18,17,32,33,18,2,16,34,1,18,2,2,2,2,2
  508.     dc.b      1,17,17,1,32,2,2,242,1,16,17,1,16,1,16,16
  509.  
  510.     dc.b      16,16,16,1,0,16,1,0,1,0,0,31,16,15,16,0
  511.     even
  512.  
  513.     BSS
  514.  
  515. amp1        ds.w 512
  516. amp2        ds.w 2048
  517. amp3        ds.w 8192
  518. amp4           
  519.  
  520.     ; deuxieme routine asm TSTPACK.S
  521.  
  522.     jmp pcstart
  523.     include "packer.s"
  524.     TEXT
  525. pcstart
  526.     lea amp1,a1
  527.     lea sin1pack,a0
  528.     jsr depackperiod
  529.    
  530.     lea sin2pack,a0
  531.     jsr depackperiod
  532.     lea sin3pack,a0
  533.     jsr depackperiod
  534.  
  535.    
  536.  
  537.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement