Subversion Repositories Kolibri OS

Rev

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

  1. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2. ;;                                                              ;;
  3. ;; Copyright (C) KolibriOS team 2004-2008. All rights reserved. ;;
  4. ;; Distributed under terms of the GNU General Public License    ;;
  5. ;;                                                              ;;
  6. ;; KERNEL32.INC                                                 ;;
  7. ;;                                                              ;;
  8. ;; Included 32 bit kernel files for MenuetOS                    ;;
  9. ;;                                                              ;;
  10. ;; This file is kept separate as it will be easier to           ;;
  11. ;; maintain and compile with an automated SETUP program         ;;
  12. ;; in the future.                                               ;;
  13. ;;                                                              ;;
  14. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  15.  
  16. $Revision: 2014 $
  17.  
  18.  
  19.  
  20. struc POINT {
  21.   .x dd ?
  22.   .y dd ?
  23.   .sizeof:
  24. }
  25. virtual at 0
  26.  POINT POINT
  27. end virtual
  28.  
  29. struc RECT {
  30.   .left   dd ?
  31.   .top    dd ?
  32.   .right  dd ?
  33.   .bottom dd ?
  34.   .sizeof:
  35. }
  36. virtual at 0
  37.  RECT RECT
  38. end virtual
  39.  
  40. struc BOX {
  41.   .left   dd ?
  42.   .top    dd ?
  43.   .width  dd ?
  44.   .height dd ?
  45.   .sizeof:
  46. }
  47. virtual at 0
  48.  BOX BOX
  49. end virtual
  50.  
  51. struc DISPMODE {
  52.   .width   rw 1
  53.   .height  rw 1
  54.   .bpp     rw 1
  55.   .freq    rw 1
  56. }
  57.  
  58. ; constants definition
  59. WSTATE_NORMAL    = 00000000b
  60. WSTATE_MAXIMIZED = 00000001b
  61. WSTATE_MINIMIZED = 00000010b
  62. WSTATE_ROLLEDUP  = 00000100b
  63.  
  64. WSTATE_REDRAW    = 00000001b
  65. WSTATE_WNDDRAWN  = 00000010b
  66.  
  67. WSTYLE_HASCAPTION     = 00010000b
  68. WSTYLE_CLIENTRELATIVE = 00100000b
  69.  
  70. struc TASKDATA
  71. {
  72.   .event_mask  dd ?
  73.   .pid         dd ?
  74.                dw ?
  75.   .state       db ?
  76.                db ?
  77.                dw ?
  78.   .wnd_number  db ?
  79.                db ?
  80.   .mem_start   dd ?
  81.   .counter_sum dd ?
  82.   .counter_add dd ?
  83.   .cpu_usage   dd ?
  84. }
  85. virtual at 0
  86.  TASKDATA TASKDATA
  87. end virtual
  88.  
  89. TSTATE_RUNNING        = 0
  90. TSTATE_RUN_SUSPENDED  = 1
  91. TSTATE_WAIT_SUSPENDED = 2
  92. TSTATE_ZOMBIE         = 3
  93. TSTATE_TERMINATING    = 4
  94. TSTATE_WAITING        = 5
  95. TSTATE_FREE           = 9
  96.  
  97. ; structures definition
  98. struc WDATA {
  99.   .box             BOX
  100.   .cl_workarea     dd ?
  101.   .cl_titlebar     dd ?
  102.   .cl_frames       dd ?
  103.   .reserved        db ?
  104.   .fl_wstate       db ?
  105.   .fl_wdrawn       db ?
  106.   .fl_redraw       db ?
  107.   .sizeof:
  108. }
  109. virtual at 0
  110.  WDATA WDATA
  111. end virtual
  112. label WDATA.fl_wstyle byte at WDATA.cl_workarea + 3
  113.  
  114. struc APPDATA
  115. {
  116.   .app_name        db 11  dup(?)
  117.                    db 5   dup(?)
  118.  
  119.   .fpu_state       dd ?            ;+16
  120.   .ev_count_       dd ? ;unused    ;+20
  121.   .exc_handler     dd ?            ;+24
  122.   .except_mask     dd ?            ;+28
  123.   .pl0_stack       dd ? ;unused    ;+32
  124.   .heap_base       dd ?            ;+36
  125.   .heap_top        dd ?            ;+40
  126.   .cursor          dd ?            ;+44
  127.   .fd_ev           dd ?            ;+48
  128.   .bk_ev           dd ?            ;+52
  129.   .fd_obj          dd ?            ;+56
  130.   .bk_obj          dd ?            ;+60
  131.   .saved_esp       dd ?            ;+64
  132.   .io_map          rd 2            ;+68
  133.   .dbg_state       dd ?            ;+76
  134.   .cur_dir         dd ?            ;+80
  135.   .wait_timeout    dd ?            ;+84
  136.   .saved_esp0      dd ?            ;+88
  137.   .wait_begin      dd ?            ;+92   +++
  138.   .wait_test       dd ?            ;+96   +++
  139.   .wait_param      dd ?            ;+100  +++
  140.   .tls_base        dd ?            ;+104
  141.   .dlls_list_ptr   dd ?            ;+108
  142.                    db 16 dup(?)    ;+112
  143.  
  144.   .wnd_shape       dd ?            ;+128
  145.   .wnd_shape_scale dd ?            ;+132
  146.                    dd ?            ;+136
  147.   .mem_size        dd ?            ;+140
  148.   .saved_box       BOX
  149.   .ipc_start       dd ?
  150.   .ipc_size        dd ?
  151.   .event_mask      dd ?
  152.   .debugger_slot   dd ?
  153.                    dd ?
  154.   .keyboard_mode   db ?
  155.                    db 3   dup(?)
  156.   .dir_table       dd ?
  157.   .dbg_event_mem   dd ?
  158.   .dbg_regs:
  159.   .dbg_regs.dr0    dd ?
  160.   .dbg_regs.dr1    dd ?
  161.   .dbg_regs.dr2    dd ?
  162.   .dbg_regs.dr3    dd ?
  163.   .dbg_regs.dr7    dd ?
  164.   .wnd_caption     dd ?
  165.   .wnd_clientbox   BOX
  166. }
  167. virtual at 0
  168.  APPDATA APPDATA
  169. end virtual
  170.  
  171. ;// mike.dld, 2006-29-01 ]
  172.  
  173. struc MUTEX
  174. {
  175.     .count  rd 1
  176.     .next   rd 1
  177.     .prev   rd 1
  178. }
  179.  
  180. virtual at 0
  181.  MUTEX MUTEX
  182. end virtual
  183.  
  184.  
  185. ; Core functions
  186. include "core/sync.inc"     ; macros for synhronization objects
  187. include "core/sys32.inc"    ; process management
  188. include "core/sched.inc"    ; process scheduling
  189. include "core/syscall.inc"  ; system call
  190. include "core/fpu.inc"      ; all fpu/sse support
  191. include "core/memory.inc"
  192. include "core/heap.inc"     ; kernel and app heap
  193. include "core/malloc.inc"   ; small kernel heap
  194. include "core/taskman.inc"
  195. include "core/dll.inc"
  196. include "core/peload.inc"   ;
  197. include "core/exports.inc"
  198. include "core/string.inc"
  199. include "core/v86.inc"      ; virtual-8086 manager
  200.  
  201. ; GUI stuff
  202. include "gui/window.inc"
  203. include "gui/event.inc"
  204. include "gui/font.inc"
  205. include "gui/button.inc"
  206.  
  207. ; shutdown
  208.  
  209. ; file system
  210.  
  211. include "fs/fs.inc"       ; syscall
  212. include "fs/fat32.inc"    ; read / write for fat32 filesystem
  213. include "fs/ntfs.inc"     ; read / write for ntfs filesystem
  214. include "fs/fat12.inc"    ; read / write for fat12 filesystem
  215. include "blkdev/rd.inc"   ; ramdisk read /write
  216. include "fs/fs_lfn.inc"    ; syscall, version 2
  217. ;include "fs/iso9660.inc"  ; read for iso9660 filesystem CD
  218. include "fs/ext2.inc"     ; read / write for ext2 filesystem
  219.  
  220. ; sound
  221.  
  222. include "sound/playnote.inc"    ; player Note for Speaker PC
  223. ;include "sound/FHT.inc"        ; fast Fourier transform routines
  224.  
  225. ; display
  226.  
  227. ;include "video/graph32.inc"    ; 32bpp graphics
  228. include "video/vesa20.inc"      ; older graphics engine
  229. include "video/cursors.inc"     ; cursors functions
  230.  
  231. ; Network Interface & TCPIP Stack
  232.  
  233. include "network/stack.inc"
  234.  
  235. ;include "drivers/uart.inc"
  236.  
  237.  
  238. ; Mouse pointer
  239.  
  240. include "gui/mouse.inc"
  241.  
  242. ; Window skinning
  243.  
  244. include "gui/skincode.inc"
  245.  
  246. ; Pci functions
  247. include "bus/pci/pci32.inc"
  248. ;include "bus/pci/PCIe.inc"
  249. include "bus/HT.inc"            ; AMD HyperTransport bus control
  250. include "bus/SB/SB.inc"
  251.  
  252. ; Floppy drive controller
  253.  
  254. include "blkdev/fdc.inc"
  255. include "blkdev/flp_drv.inc"
  256.  
  257. ; IDE cache
  258. include "blkdev/ide_cache.inc"
  259.  
  260. ; HD drive controller
  261. include "blkdev/hd_drv.inc"
  262.  
  263. ; CD drive controller
  264.  
  265. ;include "blkdev/cdrom.inc"
  266. ;include "blkdev/cd_drv.inc"
  267.  
  268. ; Character devices
  269.  
  270. include "hid/keyboard.inc"
  271. include "hid/mousedrv.inc"
  272.  
  273. ; setting date,time,clock and alarm-clock
  274.  
  275. include "hid/set_dtc.inc"
  276.  
  277. ;% -include
  278.  
  279. ;parser file names
  280. include "fs/parse_fn.inc"
  281.  
  282. ; work with conf lib
  283. include "core/conf_lib.inc"
  284.  
  285. ; load external lib
  286. include "core/ext_lib.inc"
  287.  
  288. ; list of external functions
  289. include "imports.inc"
  290.  
  291.