aboutsummaryrefslogtreecommitdiff
path: root/include/assert.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/assert.h')
-rw-r--r--include/assert.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/assert.h b/include/assert.h
new file mode 100644
index 000000000..c36679f8f
--- /dev/null
+++ b/include/assert.h
@@ -0,0 +1,21 @@
+#ifndef __ASSERT_H__
+#define __ASSERT_H__
+
+#include <stdio.h>
+
+static __inline void __assert(int Cond)
+{
+#ifdef _DEBUG
+ if (!Cond)
+ {
+ printf("assertion occured.\n");
+ __asm int 3;
+ while (1);
+ }
+#endif
+}
+
+#define assert(Cond) __assert((int)(Cond))
+
+#endif
+ \ No newline at end of file