abstracting
[sped.git] / utils.S
diff --git a/utils.S b/utils.S
new file mode 100644 (file)
index 0000000..5c09a23
--- /dev/null
+++ b/utils.S
@@ -0,0 +1,18 @@
+
+%ifndef __UTILS_S__
+%define __UTILS_S__
+
+; gets the nth string ptr in a str array
+; of the form: str_offset buffer, n
+; result is in eax
+%macro str_offset 2
+    mov eax, %2
+    mov ecx, 4
+    mul ecx
+    add eax, DWORD %1
+%endmacro
+
+extern shiftLeft
+extern shiftRight
+
+%endif