Subversion Repositories Kolibri OS

Rev

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

  1. format ELF
  2. include "public_stdcall.inc"
  3. section '.text' executable
  4. public_stdcall _ksys_make_button,24
  5. ;arg1 - x
  6. ;arg2 - y
  7. ;arg3 - xsize
  8. ;arg4 - ysize
  9. ;arg5 - id
  10. ;arg6 - color
  11.   push  ebx esi
  12.   mov   ebx,[esp+12]
  13.   shl   ebx,16
  14.   mov   bx,[esp+20]
  15.   mov   ecx,[esp+16]
  16.   shl   ecx,16
  17.   mov   cx,[esp+24]
  18.   mov   edx,[esp+28]
  19.   mov   esi,[esp+32]
  20.   mov   eax,8
  21.   int   0x40
  22.   pop   esi ebx
  23.   ret   24
  24.  
  25. public_stdcall _ksys_get_button_id,0
  26.   mov   eax,17
  27.   int   0x40
  28.   test  al,al
  29.   jnz   .no_button
  30.   shr   eax,8
  31.   ret
  32. .no_button:
  33.   xor   eax,eax
  34.   dec   eax
  35.   ret