Subversion Repositories Kolibri OS

Rev

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

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