Subversion Repositories Kolibri OS

Rev

Details | Last modification | View Log | RSS feed

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