2010-01-23 19:01:24 +03:00
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
;; ;;
|
2012-03-13 20:51:57 +04:00
|
|
|
;; Copyright (C) KolibriOS team 2004-2012. All rights reserved. ;;
|
2010-01-23 19:01:24 +03:00
|
|
|
;; Distributed under terms of the GNU General Public License ;;
|
|
|
|
;; ;;
|
|
|
|
;; KERNEL32.INC ;;
|
|
|
|
;; ;;
|
|
|
|
;; Included 32 bit kernel files for MenuetOS ;;
|
|
|
|
;; ;;
|
|
|
|
;; This file is kept separate as it will be easier to ;;
|
|
|
|
;; maintain and compile with an automated SETUP program ;;
|
|
|
|
;; in the future. ;;
|
|
|
|
;; ;;
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
|
|
|
$Revision$
|
|
|
|
|
2012-02-22 19:46:09 +04:00
|
|
|
struct POINT
|
|
|
|
x dd ?
|
|
|
|
y dd ?
|
|
|
|
ends
|
|
|
|
|
|
|
|
struct RECT
|
|
|
|
left dd ?
|
|
|
|
top dd ?
|
|
|
|
right dd ?
|
|
|
|
bottom dd ?
|
|
|
|
ends
|
|
|
|
|
|
|
|
struct BOX
|
|
|
|
left dd ?
|
|
|
|
top dd ?
|
|
|
|
width dd ?
|
|
|
|
height dd ?
|
|
|
|
ends
|
|
|
|
|
|
|
|
struct DISPMODE
|
|
|
|
width dw ?
|
|
|
|
height dw ?
|
|
|
|
bpp dw ?
|
|
|
|
freq dw ?
|
|
|
|
ends
|
2010-01-23 19:01:24 +03:00
|
|
|
|
|
|
|
; constants definition
|
|
|
|
WSTATE_NORMAL = 00000000b
|
|
|
|
WSTATE_MAXIMIZED = 00000001b
|
|
|
|
WSTATE_MINIMIZED = 00000010b
|
|
|
|
WSTATE_ROLLEDUP = 00000100b
|
|
|
|
|
|
|
|
WSTATE_REDRAW = 00000001b
|
|
|
|
WSTATE_WNDDRAWN = 00000010b
|
|
|
|
|
|
|
|
WSTYLE_HASCAPTION = 00010000b
|
|
|
|
WSTYLE_CLIENTRELATIVE = 00100000b
|
|
|
|
|
2012-02-22 19:46:09 +04:00
|
|
|
struct TASKDATA
|
|
|
|
event_mask dd ?
|
|
|
|
pid dd ?
|
|
|
|
dw ?
|
|
|
|
state db ?
|
|
|
|
db ?
|
|
|
|
dw ?
|
|
|
|
wnd_number db ?
|
|
|
|
db ?
|
|
|
|
mem_start dd ?
|
|
|
|
counter_sum dd ?
|
|
|
|
counter_add dd ?
|
|
|
|
cpu_usage dd ?
|
|
|
|
ends
|
2010-01-05 04:28:11 +03:00
|
|
|
|
|
|
|
TSTATE_RUNNING = 0
|
|
|
|
TSTATE_RUN_SUSPENDED = 1
|
|
|
|
TSTATE_WAIT_SUSPENDED = 2
|
|
|
|
TSTATE_ZOMBIE = 3
|
|
|
|
TSTATE_TERMINATING = 4
|
|
|
|
TSTATE_WAITING = 5
|
|
|
|
TSTATE_FREE = 9
|
2010-01-23 19:01:24 +03:00
|
|
|
|
|
|
|
; structures definition
|
2012-02-22 19:46:09 +04:00
|
|
|
struct WDATA
|
|
|
|
box BOX
|
|
|
|
cl_workarea dd ?
|
|
|
|
cl_titlebar dd ?
|
|
|
|
cl_frames dd ?
|
|
|
|
reserved db ?
|
|
|
|
fl_wstate db ?
|
|
|
|
fl_wdrawn db ?
|
|
|
|
fl_redraw db ?
|
|
|
|
ends
|
|
|
|
|
2010-01-23 19:01:24 +03:00
|
|
|
label WDATA.fl_wstyle byte at WDATA.cl_workarea + 3
|
|
|
|
|
2012-02-22 19:46:09 +04:00
|
|
|
struct DBG_REGS
|
|
|
|
dr0 dd ?
|
|
|
|
dr1 dd ?
|
|
|
|
dr2 dd ?
|
|
|
|
dr3 dd ?
|
|
|
|
dr7 dd ?
|
|
|
|
ends
|
|
|
|
|
|
|
|
struct APPDATA
|
|
|
|
app_name rb 11
|
|
|
|
rb 5
|
|
|
|
|
|
|
|
fpu_state dd ? ;+16
|
|
|
|
ev_count_ dd ? ;unused ;+20
|
|
|
|
exc_handler dd ? ;+24
|
|
|
|
except_mask dd ? ;+28
|
|
|
|
pl0_stack dd ? ;+32
|
|
|
|
heap_base dd ? ;+36
|
|
|
|
heap_top dd ? ;+40
|
|
|
|
cursor dd ? ;+44
|
|
|
|
fd_ev dd ? ;+48
|
|
|
|
bk_ev dd ? ;+52
|
|
|
|
fd_obj dd ? ;+56
|
|
|
|
bk_obj dd ? ;+60
|
|
|
|
saved_esp dd ? ;+64
|
|
|
|
io_map rd 2 ;+68
|
|
|
|
dbg_state dd ? ;+76
|
|
|
|
cur_dir dd ? ;+80
|
|
|
|
wait_timeout dd ? ;+84
|
|
|
|
saved_esp0 dd ? ;+88
|
|
|
|
wait_begin dd ? ;+92 +++
|
|
|
|
wait_test dd ? ;+96 +++
|
|
|
|
wait_param dd ? ;+100 +++
|
|
|
|
tls_base dd ? ;+104
|
|
|
|
dlls_list_ptr dd ? ;+108
|
2012-02-26 08:10:05 +04:00
|
|
|
event_filter dd ? ;+112
|
2013-05-27 20:49:46 +04:00
|
|
|
draw_bgr_x dd ? ;+116
|
|
|
|
draw_bgr_y dd ? ;+120
|
|
|
|
dd ? ;+124
|
2012-02-22 19:46:09 +04:00
|
|
|
|
|
|
|
wnd_shape dd ? ;+128
|
|
|
|
wnd_shape_scale dd ? ;+132
|
|
|
|
dd ? ;+136
|
|
|
|
mem_size dd ? ;+140
|
2013-05-27 13:02:35 +04:00
|
|
|
saved_box BOX ;+144
|
|
|
|
ipc_start dd ? ;+160
|
|
|
|
ipc_size dd ? ;+164
|
|
|
|
event_mask dd ? ;+168
|
|
|
|
debugger_slot dd ? ;+172
|
|
|
|
terminate_protection dd ? ;+176
|
|
|
|
keyboard_mode db ? ;+180
|
2012-02-22 19:46:09 +04:00
|
|
|
rb 3
|
2013-05-27 13:02:35 +04:00
|
|
|
dir_table dd ? ;+184
|
|
|
|
dbg_event_mem dd ? ;+188
|
|
|
|
dbg_regs DBG_REGS ;+192
|
|
|
|
wnd_caption dd ? ;+212
|
|
|
|
wnd_clientbox BOX ;+216
|
|
|
|
priority dd ? ;+232
|
|
|
|
in_schedule LHEAD ;+236
|
2012-02-22 19:46:09 +04:00
|
|
|
|
|
|
|
ends
|
2010-01-23 19:01:24 +03:00
|
|
|
|
|
|
|
|
|
|
|
; Core functions
|
|
|
|
include "core/sync.inc" ; macros for synhronization objects
|
|
|
|
include "core/sys32.inc" ; process management
|
|
|
|
include "core/sched.inc" ; process scheduling
|
|
|
|
include "core/syscall.inc" ; system call
|
|
|
|
include "core/fpu.inc" ; all fpu/sse support
|
|
|
|
include "core/memory.inc"
|
|
|
|
include "core/heap.inc" ; kernel and app heap
|
|
|
|
include "core/malloc.inc" ; small kernel heap
|
|
|
|
include "core/taskman.inc"
|
|
|
|
include "core/dll.inc"
|
|
|
|
include "core/peload.inc" ;
|
|
|
|
include "core/exports.inc"
|
|
|
|
include "core/string.inc"
|
|
|
|
include "core/v86.inc" ; virtual-8086 manager
|
2011-08-24 15:01:37 +04:00
|
|
|
include "core/irq.inc" ; irq handling functions
|
2011-09-22 20:44:10 +04:00
|
|
|
include "core/apic.inc" ; Interrupt Controller functions
|
2011-08-26 15:51:56 +04:00
|
|
|
include "core/timers.inc"
|
2013-11-10 08:10:03 +04:00
|
|
|
include "core/clipboard.inc" ; custom clipboard
|
2010-01-23 19:01:24 +03:00
|
|
|
|
|
|
|
; GUI stuff
|
|
|
|
include "gui/window.inc"
|
|
|
|
include "gui/event.inc"
|
|
|
|
include "gui/font.inc"
|
|
|
|
include "gui/button.inc"
|
|
|
|
|
|
|
|
; shutdown
|
|
|
|
|
|
|
|
; file system
|
|
|
|
|
2011-08-31 20:26:51 +04:00
|
|
|
include "blkdev/disk.inc" ; support for plug-n-play disks
|
|
|
|
include "blkdev/disk_cache.inc" ; caching for plug-n-play disks
|
2010-01-23 19:01:24 +03:00
|
|
|
include "blkdev/rd.inc" ; ramdisk read /write
|
2013-11-21 20:07:16 +04:00
|
|
|
include "fs/fat.inc" ; read / write for fat filesystem
|
|
|
|
include "fs/ntfs.inc" ; read / write for ntfs filesystem
|
2010-01-23 19:01:24 +03:00
|
|
|
include "fs/fs_lfn.inc" ; syscall, version 2
|
2010-01-23 18:24:03 +03:00
|
|
|
include "fs/iso9660.inc" ; read for iso9660 filesystem CD
|
2013-09-28 14:43:18 +04:00
|
|
|
include "fs/ext2/ext2.asm" ; read / write for ext2 filesystem
|
2013-09-18 01:28:18 +04:00
|
|
|
include "fs/xfs.asm" ; read / write for xfs filesystem
|
2010-01-23 19:01:24 +03:00
|
|
|
|
|
|
|
; sound
|
|
|
|
|
|
|
|
include "sound/playnote.inc" ; player Note for Speaker PC
|
|
|
|
|
|
|
|
; display
|
|
|
|
|
2012-02-26 04:26:08 +04:00
|
|
|
;include "video/vesa12.inc" ; Vesa 1.2 functions
|
2010-01-23 19:01:24 +03:00
|
|
|
include "video/vesa20.inc" ; Vesa 2.0 functions
|
2011-03-01 09:08:11 +03:00
|
|
|
include "video/blitter.inc" ;
|
2010-01-23 19:01:24 +03:00
|
|
|
include "video/vga.inc" ; VGA 16 color functions
|
|
|
|
include "video/cursors.inc" ; cursors functions
|
2010-01-23 18:24:03 +03:00
|
|
|
|
2010-01-23 19:01:24 +03:00
|
|
|
; Network Interface & TCPIP Stack
|
|
|
|
|
|
|
|
include "network/stack.inc"
|
|
|
|
|
|
|
|
;include "drivers/uart.inc"
|
|
|
|
|
|
|
|
|
|
|
|
; Mouse pointer
|
|
|
|
|
|
|
|
include "gui/mouse.inc"
|
|
|
|
|
|
|
|
; Window skinning
|
|
|
|
|
|
|
|
include "gui/skincode.inc"
|
|
|
|
|
|
|
|
; Pci functions
|
|
|
|
|
|
|
|
include "bus/pci/pci32.inc"
|
|
|
|
|
2013-05-18 03:53:28 +04:00
|
|
|
; USB functions
|
|
|
|
include "bus/usb/init.inc"
|
|
|
|
|
2010-01-23 19:01:24 +03:00
|
|
|
; Floppy drive controller
|
|
|
|
|
|
|
|
include "blkdev/fdc.inc"
|
|
|
|
include "blkdev/flp_drv.inc"
|
|
|
|
|
|
|
|
; IDE cache
|
|
|
|
include "blkdev/ide_cache.inc"
|
|
|
|
|
|
|
|
; HD drive controller
|
|
|
|
include "blkdev/hd_drv.inc"
|
2013-12-30 15:42:20 +04:00
|
|
|
; Access through BIOS
|
|
|
|
include "blkdev/bd_drv.inc"
|
2010-01-23 19:01:24 +03:00
|
|
|
|
|
|
|
; CD drive controller
|
|
|
|
|
|
|
|
include "blkdev/cdrom.inc"
|
|
|
|
include "blkdev/cd_drv.inc"
|
|
|
|
|
|
|
|
; Character devices
|
|
|
|
|
|
|
|
include "hid/keyboard.inc"
|
|
|
|
include "hid/mousedrv.inc"
|
|
|
|
|
|
|
|
; setting date,time,clock and alarm-clock
|
|
|
|
|
|
|
|
include "hid/set_dtc.inc"
|
|
|
|
|
|
|
|
;% -include
|
|
|
|
|
|
|
|
;parser file names
|
|
|
|
include "fs/parse_fn.inc"
|
|
|
|
|
|
|
|
; work with conf lib
|
|
|
|
include "core/conf_lib.inc"
|
|
|
|
|
|
|
|
; load external lib
|
|
|
|
include "core/ext_lib.inc"
|
|
|
|
|
|
|
|
; list of external functions
|
|
|
|
include "imports.inc"
|