diff options
Diffstat (limited to 'include/const_macros.inc')
-rw-r--r-- | include/const_macros.inc | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/include/const_macros.inc b/include/const_macros.inc index 5cbdd2a..9ccdd81 100644 --- a/include/const_macros.inc +++ b/include/const_macros.inc @@ -1,43 +1,43 @@ -const_def: macro -if _NARG >= 1 -const_value = \1 -else -const_value = 0 -endc -if _NARG >= 2 -const_inc = \2 -else -const_inc = 1 -endc +macro const_def + if _NARG >= 1 + def const_value = \1 + else + def const_value = 0 + endc + if _NARG >= 2 + def const_inc = \2 + else + def const_inc = 1 + endc endm -const: macro -\1 EQU const_value -const_value = const_value + const_inc +macro const + DEF \1 EQU const_value + def const_value = const_value + const_inc endm -shift_const: macro -\1 EQU (1 << const_value) -const_value = const_value + const_inc +macro shift_const + DEF \1 EQU (1 << const_value) + def const_value = const_value + const_inc endm -const_skip: macro -if _NARG >= 1 -const_value = const_value + const_inc * (\1) -else -const_value = const_value + const_inc -endc +macro const_skip + if _NARG >= 1 + def const_value = const_value + const_inc * (\1) + else + def const_value = const_value + const_inc + endc endm -const_next: macro -if (const_value > 0 && \1 < const_value) || (const_value < 0 && \1 > const_value) -fail "const_next cannot go backwards from {const_value} to \1" -else -const_value = \1 -endc +macro const_next + if (const_value > 0 && \1 < const_value) || (const_value < 0 && \1 > const_value) + fail "const_next cannot go backwards from {const_value} to \1" + else + def const_value = \1 + endc endm -const_dw: macro +macro const_dw const \1 dw \2 endm |