home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 17 / CD_ASCQ_17_101194.iso / dos / prg / cthugha5 / cthu5src / luts.c < prev    next >
Text File  |  1994-08-19  |  783b  |  41 lines

  1. void FillLUTBuffer(int pal)
  2. {
  3.     /* fills the buffer with 8 bit values */
  4.  
  5.         curpal=pal%numluts;
  6.  
  7.         memcpy(LUTbuffer,LUTfiles[curpal],768);
  8.  
  9.  
  10.     _asm {
  11.             push di;
  12.             push si;
  13.             push ds;
  14.             push ss;
  15.             push sp;
  16.             push bp;
  17.  
  18.     mov     dx,0x03da
  19. WaitVS:
  20.     in      al,dx
  21.     test    al,0x08
  22.     jz      WaitVS  ;vertical sync is active high (1 = active)
  23.  
  24.  
  25.             mov ax,1012h;
  26.             mov bx,0;
  27.             mov cx,100h;
  28.             mov dx,SEG LUTbuffer;
  29.             mov es,dx;
  30.             mov dx,OFFSET LUTbuffer;
  31.             int 10h;
  32.             pop bp;
  33.             pop sp;
  34.             pop ss;
  35.             pop ds;
  36.             pop si;
  37.             pop di;
  38.     }
  39. }
  40.  
  41.