Subversion Repositories Kolibri OS

Rev

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

  1. $Revision: 426 $
  2. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  3. ;;                                                            ;;
  4. ;; KERNEL32.INC                                               ;;
  5. ;;                                                            ;;
  6. ;; Included 32 bit kernel files for MenuetOS                  ;;
  7. ;;                                                            ;;
  8. ;; This file is kept separate as it will be easier to         ;;
  9. ;; maintain and compile with an automated SETUP program       ;;
  10. ;; in the future.                                             ;;
  11. ;;                                                            ;;
  12. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  13.  
  14. ;struc db [a] { common . db a
  15. ;  if ~used .
  16. ;    display 'not used db: ',`.,13,10
  17. ;  end if }
  18. ;struc dw [a] { common . dw a
  19. ;  if ~used .
  20. ;    display 'not used dw: ',`.,13,10
  21. ;  end if }
  22. ;struc dd [a] { common . dd a
  23. ;  if ~used .
  24. ;    display 'not used dd: ',`.,13,10
  25. ;  end if }
  26. ;struc dp [a] { common . dp a
  27. ;  if ~used .
  28. ;    display 'not used dp: ',`.,13,10
  29. ;  end if }
  30. ;struc dq [a] { common . dq a
  31. ;  if ~used .
  32. ;    display 'not used dq: ',`.,13,10
  33. ;  end if }
  34. ;struc dt [a] { common . dt a
  35. ;  if ~used .
  36. ;    display 'not used dt: ',`.,13,10
  37. ;  end if }
  38.  
  39. struc RECT {
  40.   .left   dd ?
  41.   .top    dd ?
  42.   .right  dd ?
  43.   .bottom dd ?
  44. }
  45. virtual at 0
  46.  RECT RECT
  47. end virtual
  48.  
  49. struc BOX {
  50.   .left   dd ?
  51.   .top    dd ?
  52.   .width  dd ?
  53.   .height dd ?
  54. }
  55. virtual at 0
  56.  BOX BOX
  57. end virtual
  58.  
  59. ; constants definition
  60. WSTATE_NORMAL    = 00000000b
  61. WSTATE_MAXIMIZED = 00000001b
  62. WSTATE_MINIMIZED = 00000010b
  63. WSTATE_ROLLEDUP  = 00000100b
  64.  
  65. WSTATE_REDRAW    = 00000001b
  66. WSTATE_WNDDRAWN  = 00000010b
  67.  
  68. WSTYLE_HASCAPTION     = 00010000b
  69. WSTYLE_CLIENTRELATIVE = 00100000b
  70.  
  71. struc TASKDATA
  72. {
  73.   .event_mask  dd ?
  74.   .pid         dd ?
  75.                dw ?
  76.   .state       db ?
  77.                db ?
  78.                dw ?
  79.   .wnd_number  db ?
  80.                db ?
  81.   .mem_start   dd ?
  82.   .counter_sum dd ?
  83.   .counter_add dd ?
  84.   .cpu_usage   dd ?
  85. }
  86. virtual at 0
  87.  TASKDATA TASKDATA
  88. end virtual
  89.  
  90. ; structures definition
  91. struc WDATA {
  92.   .box             BOX
  93.   .cl_workarea     dd ?
  94.   .cl_titlebar     dd ?
  95.   .cl_frames       dd ?
  96.   .reserved        db ?
  97.   .fl_wstate       db ?
  98.   .fl_wdrawn       db ?
  99.   .fl_redraw       db ?
  100. }
  101. virtual at 0
  102.  WDATA WDATA
  103. end virtual
  104. label WDATA.fl_wstyle byte at 0x13
  105.  
  106. struc APPDATA
  107. {
  108.   .app_name        db 11  dup(?)
  109.                    db 5   dup(?)
  110.  
  111.   .fpu_state       dd ?            ;+16
  112.   .ev_count        dd ?            ;+20
  113.   .fpu_handler     dd ?            ;+24
  114.   .sse_handler     dd ?            ;+28
  115.   .pl0_stack       dd ? ;unused    ;+32
  116.   .heap_base       dd ?            ;+36
  117.   .heap_top        dd ?            ;+40
  118.   .cursor          dd ?            ;+44
  119.   .fd_ev           dd ?            ;+48
  120.   .bk_ev           dd ?            ;+52
  121.   .fd_obj          dd ?            ;+56
  122.   .bk_obj          dd ?            ;+60
  123.  
  124.                    db 64 dup(?)    ;+64
  125.  
  126.   .wnd_shape       dd ?            ;+128
  127.   .wnd_shape_scale dd ?            ;+132
  128.                    dd ?            ;+136
  129.   .mem_size        dd ?            ;+140
  130.   .saved_box       BOX
  131.   .ipc_start       dd ?
  132.   .ipc_size        dd ?
  133.   .event_mask      dd ?
  134.   .debugger_slot   dd ?
  135.                    dd ?
  136.   .keyboard_mode   db ?
  137.                    db 3   dup(?)
  138.   .dir_table       dd ?
  139.   .dbg_event_mem   dd ?
  140.   .dbg_regs:
  141.   .dbg_regs.dr0    dd ?
  142.   .dbg_regs.dr1    dd ?
  143.   .dbg_regs.dr2    dd ?
  144.   .dbg_regs.dr3    dd ?
  145.   .dbg_regs.dr7    dd ?
  146.   .wnd_caption     dd ?
  147.   .wnd_clientbox   BOX
  148. }
  149. virtual at 0
  150.  APPDATA APPDATA
  151. end virtual
  152.  
  153. ;// mike.dld, 2006-29-01 ]
  154.  
  155.  
  156. ; Core functions
  157. include "core/sync.inc"     ; macros for synhronization objects
  158. include "core/sys32.inc"    ; process management
  159. include "core/sched.inc"    ; process scheduling
  160. include "core/syscall.inc"  ; system call
  161. include "core/fpu.inc"      ; all fpu/sse support
  162. include "core/memory.inc"
  163. include "core/heap.inc"     ; kernel and app heap
  164. include "core/malloc.inc"   ; small kernel heap
  165. include "core/taskman.inc"
  166. include "core/dll.inc"
  167. include "core/exports.inc"
  168.  
  169. ; GUI stuff
  170. include "gui/window.inc"
  171. include "gui/event.inc"
  172. include "gui/font.inc"
  173. include "gui/button.inc"
  174.  
  175. ; shutdown
  176.  
  177. include "boot/shutdown.inc" ; shutdown or restart
  178.  
  179. ; file system
  180.  
  181. include "fs/fs.inc"       ; syscall
  182. include "fs/fat32.inc"    ; read / write for fat32 filesystem
  183. include "fs/ntfs.inc"     ; read / write for ntfs filesystem
  184. include "fs/fat12.inc"    ; read / write for fat12 filesystem
  185. include "blkdev/rd.inc"   ; ramdisk read /write
  186. include "fs/fs_lfn.inc"    ; syscall, version 2
  187. include "fs/iso9660.inc"  ; read for iso9660 filesystem CD
  188.  
  189. ; sound
  190.  
  191. include "sound/sb16.inc"     ; playback for Sound Blaster 16
  192. include "sound/playnote.inc" ; player Note for Speaker PC
  193.  
  194. ; display
  195.  
  196. include "video/vesa12.inc"   ; Vesa 1.2 functions
  197. include "video/vesa20.inc"   ; Vesa 2.0 functions
  198. include "video/vga.inc"      ; VGA 16 color functions
  199. include "video/cursors.inc"  ; cursors functions
  200.  
  201. ; Network Interface & TCPIP Stack
  202.  
  203. include "network/stack.inc"
  204.  
  205. ; Mouse pointer
  206.  
  207. include "gui/mouse.inc"
  208.  
  209. ; Window skinning
  210.  
  211. include "gui/skincode.inc"
  212.  
  213. ; Pci functions
  214.  
  215. include "bus/pci/pci32.inc"
  216.  
  217. ; Floppy drive controller
  218.  
  219. include "blkdev/fdc.inc"
  220. include "blkdev/flp_drv.inc"
  221.  
  222. ; HD drive controller
  223. include "blkdev/hd_drv.inc"
  224.  
  225. ; CD drive controller
  226.  
  227. include "blkdev/cdrom.inc"
  228. include "blkdev/cd_drv.inc"
  229.  
  230. ; Character devices
  231.  
  232. include "hid/keyboard.inc"
  233. include "hid/mousedrv.inc"
  234.  
  235. ; setting date,time,clock and alarm-clock
  236.  
  237. include "hid/set_dtc.inc"
  238.  
  239. ;% -include
  240.