arctic/tools/x86_64dump

11 lines
182 B
Bash
Executable file

#!/bin/bash
tmp="$(mktemp)"
echo '[bits 64]' >"$tmp"
cat >>"$tmp"
if ! nasm "$@" "$tmp" -o /dev/stdout | xxd -p; then
>&2 echo "Failed to assemble: $(cat "$tmp")"
fi
rm "$tmp"