Subversion Repositories Kolibri OS

Rev

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

  1. $Revision: 465 $
  2. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  3. ;;                                                              ;;
  4. ;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;;
  5. ;; Distributed under terms of the GNU General Public License    ;;
  6. ;;                                                              ;;
  7. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  8.  
  9. ;------------------------------------------------------------------
  10. ; use "iglobal" for inserting initialized global data definitions.
  11. ;------------------------------------------------------------------
  12. macro iglobal {
  13.   IGlobals equ IGlobals,
  14.   macro __IGlobalBlock { }
  15.  
  16. macro iglobal_nested {
  17.   IGlobals equ IGlobals,
  18.   macro __IGlobalBlock \{ }
  19.  
  20. ;-------------------------------------------------------------
  21. ; use 'uglobal' for inserting uninitialized global definitions.
  22. ; even when you define some data values, these variables
  23. ; will be stored as uninitialized data.
  24. ;-------------------------------------------------------------
  25. macro uglobal {
  26.   UGlobals equ UGlobals,
  27.   macro __UGlobalBlock { }
  28.  
  29. macro uglobal_nested {
  30.   UGlobals equ UGlobals,
  31.   macro __UGlobalBlock \{ }
  32.  
  33. endg fix }      ; Use endg for ending iglobal and uglobal blocks.
  34. endg_nested fix \}
  35.  
  36. macro IncludeIGlobals{
  37.   macro IGlobals dummy,[n] \{ __IGlobalBlock
  38.      purge __IGlobalBlock  \}
  39.   match I, IGlobals \{ I \} }
  40.  
  41.  
  42. macro IncludeUGlobals{
  43.   macro UGlobals dummy,[n] \{
  44.     \common
  45.       \local begin, size
  46.       begin = $
  47.       virtual at $
  48.     \forward
  49.       __UGlobalBlock
  50.       purge __UGlobalBlock
  51.     \common
  52.       size = $ - begin
  53.     end virtual
  54.     rb size
  55.   \}
  56.   match U, UGlobals \{ U \} }
  57.  
  58. macro IncludeAllGlobals {
  59.   IncludeIGlobals
  60.   IncludeUGlobals
  61. }
  62.  
  63. iglobal
  64. endg
  65.  
  66. uglobal
  67. endg
  68.