summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2021-09-09 02:47:09 +0200
committerThomas Voss <mail@thomasvoss.com> 2021-09-09 02:47:09 +0200
commit4e8490d7c63ea46f8f720c7d346d658a0c49c7d5 (patch)
tree9ba912a3c7796b14448934bcffa35ee72286ebd6
parent00974c325bfdb24c6027a87ce391cfda0ab58fcb (diff)
Add a comment
-rw-r--r--macros.m47
1 files changed, 5 insertions, 2 deletions
diff --git a/macros.m4 b/macros.m4
index 4f15035..fa2cad7 100644
--- a/macros.m4
+++ b/macros.m4
@@ -1,2 +1,5 @@
-define(`COUNTER', 0)
-define(`ENUM', `.equ $1, define(`COUNTER', incr(COUNTER))COUNTER')
+dnl Macro for easily using enums in assembly. Simply call `ENUM(IDENTIFIER)` and a constant
+dnl with name IDENTIFIER will be defined with the value of 1. Every subsequent use of ENUM()
+dnl will increment the value assigned to the constant by 1.
+define(`__COUNTER', 0)
+define(`ENUM', `.equ $1, define(`__COUNTER', incr(__COUNTER))__COUNTER')