aboutsummaryrefslogtreecommitdiff
path: root/assemble.sh
diff options
context:
space:
mode:
Diffstat (limited to 'assemble.sh')
-rwxr-xr-xassemble.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/assemble.sh b/assemble.sh
new file mode 100755
index 0000000..90f945f
--- /dev/null
+++ b/assemble.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+# NOTE: Only for macOS (intel)
+
+if [ -z "$1" ]
+then
+ echo "Usage: $0 <path to nasm file>"
+ exit 1
+fi
+
+set -xe
+
+nasm -f macho64 -o $1.o $1
+ld -lSystem $1.o