home *** CD-ROM | disk | FTP | other *** search
/ Vectronix 2 / VECTRONIX2.iso / FILES_10 / DEVELOP.LZH / DSP / SAMPLES / SAMPLE.C < prev    next >
C/C++ Source or Header  |  1992-05-29  |  759b  |  32 lines

  1. #include "osbind.h"
  2. #include "dspbind.h"
  3.  
  4.  
  5. long ptemp;
  6. long xavail,yavail;
  7. long size;
  8. main()
  9. {
  10.    int ret;
  11.    long buffer;
  12.  
  13.    Dsp_Available(&xavail,&yavail);
  14.    printf("Dsp_Avail call made\n");
  15.    printf("X available = %D\n",xavail);
  16.    printf("Y available = %D\n",yavail);
  17.    ret = Dsp_Reserve(100L,100L);
  18.    printf("Reserving 100L X and 100L Y memory\n");
  19.    printf("Return from Dsp_Reserve = %d\n",ret);
  20.    buffer = Malloc(1000L);
  21.    size = Dsp_LodToBinary("test1.lod",buffer); 
  22.    printf("Calling Dsp_LodToBinary\n");
  23.    printf("Program size is %ld\n",size);
  24.    
  25.    Dsp_ExecProg(buffer,size,1);
  26.    Dsp_DoBlock(0L,0L,&ptemp,1L);
  27.    ptemp = (ptemp >> 8);
  28.    printf("Program return value = %X. \n",ptemp);   
  29.    Bconin(2);
  30. }
  31.  
  32.