Subversion Repositories Kolibri OS

Rev

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

  1. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2. ;;                                                            ;;
  3. ;; KERNEL32.INC                                               ;;
  4. ;;                                                            ;;
  5. ;; Included 32 bit kernel files for MenuetOS                  ;;
  6. ;;                                                            ;;
  7. ;; This file is kept separate as it will be easier to         ;;
  8. ;; maintain and compile with an automated SETUP program       ;;
  9. ;; in the future.                                             ;;
  10. ;;                                                            ;;
  11. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  12.  
  13. ; structure definition helper
  14. macro struct name, [arg]
  15.  {
  16.   common
  17.    name@struct fix name
  18.    struc name arg {
  19.  }
  20.  
  21. macro struct_helper name
  22.  {
  23.    virtual at 0
  24.    name name
  25.    sizeof.#name = $ - name
  26.    name equ sizeof.#name
  27.    end virtual
  28.  }
  29.  
  30. ends fix } struct_helper name@struct
  31.  
  32. ;// mike.dld, 2006-29-01 [
  33.  
  34. ; macros definition
  35. macro diff16 title,l1,l2
  36. {
  37.   local s,d
  38.   s = l2-l1
  39.   display title,': 0x'
  40.   repeat 8
  41.     d = 48 + s shr ((8-%) shl 2) and $0F
  42.     if d > 57
  43.       d = d + 65-57-1
  44.     end if
  45.     display d
  46.   end repeat
  47.   display 13,10
  48. }
  49.  
  50. struc db [a] { common . db a
  51.   if ~used .
  52.     display 'not used db: ',`.,13,10
  53.   end if }
  54. struc dw [a] { common . dw a
  55.   if ~used .
  56.     display 'not used dw: ',`.,13,10
  57.   end if }
  58. struc dd [a] { common . dd a
  59.   if ~used .
  60.     display 'not used dd: ',`.,13,10
  61.   end if }
  62. struc dp [a] { common . dp a
  63.   if ~used .
  64.     display 'not used dp: ',`.,13,10
  65.   end if }
  66. struc dq [a] { common . dq a
  67.   if ~used .
  68.     display 'not used dq: ',`.,13,10
  69.   end if }
  70. struc dt [a] { common . dt a
  71.   if ~used .
  72.     display 'not used dt: ',`.,13,10
  73.   end if }
  74.  
  75. ; constants definition
  76. WSTATE_NORMAL    = 00000000b
  77. WSTATE_MAXIMIZED = 00000001b
  78. WSTATE_MINIMIZED = 00000010b
  79. WSTATE_ROLLEDUP  = 00000100b
  80.  
  81. ; structures definition
  82. struc WDATA {
  83.   .left        dd ?
  84.   .top         dd ?
  85.   .width       dd ?
  86.   .height      dd ?
  87.   .cl_workarea dd ?
  88.   .cl_titlebar dd ?
  89.   .cl_frames   dd ?
  90.   .reserved    db ?
  91.   .fl_wstate   db ?
  92.   .fl_wdrawn   db ?
  93.   .fl_redraw   db ?
  94. }
  95. virtual at 0
  96.  WDATA WDATA
  97. end virtual
  98. label WDATA.fl_wstyle byte at 0x13 ; WDATA.cl_workarea+3
  99.  
  100. struc RECT {
  101.   .left   dd ?
  102.   .top    dd ?
  103.   .right  dd ?
  104.   .bottom dd ?
  105. }
  106. virtual at 0
  107.  RECT RECT
  108. end virtual
  109.  
  110. struc BOX {
  111.   .left   dd ?
  112.   .top    dd ?
  113.   .width  dd ?
  114.   .height dd ?
  115. }
  116. virtual at 0
  117.  BOX BOX
  118. end virtual
  119.  
  120. ;// mike.dld, 2006-29-01 ]
  121.  
  122.  
  123. ; Core functions
  124. include "core/sync.inc"
  125. include "core/sys32.inc"    ; process management
  126. include "core/sched.inc"    ; process scheduling
  127. include "core/syscall.inc"  ; system call
  128. include "core/mem.inc"      ; high-level memory management
  129. include "core/newproce.inc" ;new process management
  130. include "core/physmem.inc"  ; access to physical memory for applications
  131. include "core/sync.inc"     ; macros for synhronization objects
  132.  
  133. ; GUI stuff
  134. include "gui/window.inc"
  135. include "gui/event.inc"
  136. include "gui/font.inc"
  137. include "gui/button.inc"
  138.  
  139. ; shutdown
  140.  
  141. include "boot/shutdown.inc" ; shutdown or restart
  142.  
  143. ; file system
  144.  
  145. include "fs/fs.inc"       ; syscall
  146. include "fs/fat32.inc"    ; read / write for fat32 filesystem
  147. include "fs/fat12.inc"    ; read / write for fat12 filesystem
  148. include "blkdev/rd.inc"       ; ramdisk read /write
  149.  
  150. ; sound
  151.  
  152. include "sound/sb16.inc"     ; playback for Sound Blaster 16
  153. include "sound/playnote.inc" ; player Note for Speaker PC
  154.  
  155. ; display
  156.  
  157. include "video/vesa12.inc"   ; Vesa 1.2 functions
  158. include "video/vesa20.inc"   ; Vesa 2.0 functions
  159. include "video/vga.inc"      ; VGA 16 color functions
  160.  
  161. ; Network Interface & TCPIP Stack
  162.  
  163. include "network/stack.inc"
  164.  
  165. ; Mouse pointer
  166.  
  167. include "gui/mouse.inc"
  168.  
  169. ; Window skinning
  170.  
  171. include "gui/skincode.inc"
  172.  
  173. ; Pci functions
  174.  
  175. include "bus/pci/pci32.inc"
  176.  
  177. ; Floppy drive controller
  178.  
  179. include "blkdev/fdc.inc"
  180. include "blkdev/flp_drv.inc"
  181.  
  182. ; CD drive controller
  183.  
  184. include "blkdev/cdrom.inc"
  185.  
  186. ; Character devices
  187.  
  188. include "hid/keyboard.inc"
  189. include "hid/mousedrv.inc"
  190.  
  191. ; setting date,time,clock and alarm-clock
  192.  
  193. include "hid/set_dtc.inc"
  194.  
  195. ;% -include
  196.