1. Edit procedure check exception 12 (overflow stack)
[kolibrios.git] / programs / kglobals.inc
blob25bcd789251dc79274bcb539c64a4f0ff8937eed
1 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2 ;;                                                              ;;
3 ;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;;
4 ;; Distributed under terms of the GNU General Public License    ;;
5 ;;                                                              ;;
6 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
8 ;------------------------------------------------------------------
9 ; use "iglobal" for inserting initialized global data definitions.
10 ;------------------------------------------------------------------
11 macro iglobal {
12   IGlobals equ IGlobals,
13   macro __IGlobalBlock { }
15 macro iglobal_nested {
16   IGlobals equ IGlobals,
17   macro __IGlobalBlock \{ }
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 { }
28 macro uglobal_nested {
29   UGlobals equ UGlobals,
30   macro __UGlobalBlock \{ }
32 endg fix }      ; Use endg for ending iglobal and uglobal blocks.
33 endg_nested fix \}
35 macro IncludeIGlobals{
36   macro IGlobals dummy,[n] \{ __IGlobalBlock
37      purge __IGlobalBlock  \}
38   match I, IGlobals \{ I \} }
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 \} }
57 macro IncludeAllGlobals {
58   IncludeIGlobals
59   IncludeUGlobals
62 iglobal
63 endg
65 uglobal
66 endg