Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. format MS COFF
  2.  
  3. include "snd.inc"
  4. include "proc32.inc"
  5.  
  6. section '.text' align 16 code readable executable
  7.  
  8. extrn hSound      
  9.  
  10. public _SetBufferPos@8
  11.  
  12. align 4
  13. proc _SetBufferPos@8 stdcall, str:dword, offs:dword
  14.            locals
  15.              handle     dd ?
  16.              io_code    dd ?
  17.              input      dd ?
  18.              inp_size   dd ?
  19.              output     dd ?
  20.              out_size   dd ?
  21.            endl
  22.  
  23.            push ebx
  24.            push ecx
  25.            mov eax, [hSound]
  26.            lea ebx, [str]
  27.            xor ecx, ecx
  28.  
  29.            mov [handle], eax
  30.            mov [io_code], SND_SETPOS
  31.            mov [input], ebx
  32.            mov [inp_size], 8
  33.            mov [output], ecx
  34.            mov [out_size], ecx
  35.  
  36.            mov eax, 68
  37.            mov ebx, 17
  38.            lea ecx, [handle]
  39.            int 0x40
  40.            pop ecx
  41.            pop ebx
  42.            ret
  43. endp
  44.