Subversion Repositories Kolibri OS

Rev

Rev 9478 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. use32
  2. db 'MENUET01'
  3. dd 1, start, i_end, mem, mem, 0, selfpath
  4.  
  5. start:
  6. ;------ strcat(selfpath, '.drv')
  7.                 mov  eax, selfpath
  8.         @@:
  9.                 inc  eax
  10.                 cmp  [eax], byte 0
  11.                 jne  @b
  12.                 mov  [eax], dword '.sys'
  13.  
  14. ;------ writing some info
  15.                 mov  edx, info_msg
  16.                 call debug_string
  17.                 mov  cl, 13 ; line break symbol
  18.                 int  40h
  19.  
  20. ;------ init driver            
  21.                 mov  eax, 68
  22.                 mov  ebx, 16
  23.                 mov  ecx, sz_sound
  24.                 int  40h
  25.                 test eax, eax
  26.                 jnz  .exit
  27.  
  28.                 mov  eax, 68
  29.                 mov  ebx, 21
  30.                 mov  ecx, selfpath
  31.                 int  40h
  32.  
  33. .exit:
  34.                 mov  eax, -1
  35.                 int  40h
  36.                
  37. debug_string:
  38.                 mov  eax,63
  39.                 mov  ebx,1
  40.         @@:
  41.                 mov  cl,[edx]
  42.                 test cl,cl
  43.                 jz   @f
  44.                 int  40h
  45.                 inc  edx
  46.                 jmp  @b
  47.         @@:
  48.                 ret
  49.  
  50. sz_sound  db 'SOUND',0
  51. info_msg  db 'Trying to load the driver: '
  52. selfpath  rb 4096
  53.  
  54. align 4
  55. i_end:
  56. rb 128
  57. mem:
  58.