Subversion Repositories Kolibri OS

Rev

Rev 162 | Blame | Last modification | View Log | Download | RSS feed

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