summary refs log tree commit diff
path: root/home/.local/bin/nasd
blob: 60241395c8dbf5d1f6de4f82826f1a18c4057f80 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh
set -eu

dir=$(mktemp -d)
trap 'rm -r "$dir"' EXIT

echo 'bits 64' >"${dir}/input"
for ins; do
	printf '%s\n' "$ins" >>"${dir}/input"
done
[ $# -eq 0 ] && cat >>"${dir}/input"

nasm -o "${dir}/output" "${dir}/input"
ndisasm -b 64 "${dir}/output"