Subversion Repositories Kolibri OS

Rev

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

  1.  
  2. SECTION .text
  3.  
  4. [GLOBAL __start]
  5. extern go.kernel.Load
  6.  
  7. global go.os.Sleep
  8. global go.os.Event
  9. global go.os.Button
  10. global go.os.Exit
  11. global go.os.Redraw
  12. global go.os.Window
  13.  
  14. __start:
  15.   call  go.kernel.Load
  16.   ret
  17.  
  18. go.os.Sleep:
  19.     push ebp
  20.     mov ebp,esp
  21.         mov eax, 5
  22.         mov ebx, [ebp+8]
  23.         int 0x40
  24.     mov esp,ebp
  25.     pop ebp
  26.     ret
  27.  
  28.  
  29. go.os.Event:
  30.         push ebp
  31.     mov ebp,esp
  32.         mov eax, 10
  33.         int 0x40
  34.         mov esp,ebp
  35.     pop ebp
  36.         ret
  37.  
  38. go.os.Button:
  39.     push ebp
  40.     mov ebp,esp
  41.         mov eax, 17
  42.         int 0x40
  43.     mov esp,ebp
  44.     pop ebp
  45.     ret
  46.  
  47. go.os.Exit:
  48.     push ebp
  49.     mov ebp,esp
  50.         mov eax, -1
  51.         int 0x40
  52.     mov esp,ebp
  53.     pop ebp
  54.     ret
  55.  
  56.  
  57. go.os.Redraw:
  58.     push ebp
  59.     mov ebp,esp
  60.         mov eax, 12
  61.         mov ebx, [ebp+8]
  62.         int 0x40
  63.     mov esp,ebp
  64.     pop ebp
  65.     ret
  66.  
  67. go.os.Window:
  68.     push ebp
  69.     mov ebp,esp
  70.         mov ebx, [ebp+8]
  71.         shl ebx, 16
  72.         or ebx, [ebp+16]
  73.         mov ecx, [ebp+12]
  74.         shl ecx, 16
  75.         or ecx, [ebp+20]
  76.         mov edx, 0x14
  77.         shl edx, 24
  78.         or edx, 0xFFFFFF
  79.         mov esi, 0x808899ff
  80.         mov edi, [ebp+24]
  81.         xor eax, eax
  82.         int 0x40
  83.     mov esp,ebp
  84.     pop ebp
  85.     ret
  86.  
  87.