Reputation: 4883
I'm trying to figure out how I can use nasm to quickly get the hex for x86 operations.
I've tried things like
> echo "mov ax, 1" | nasm
> nasm < echo "mov ax, 1"
Neither work, but you get the idea of what I'm trying to do... Any ideas?
Upvotes: 0
Views: 356
Reputation: 58487
I'm sure there's a more elegant way, but this ought to work (you could make a script out of it):
echo "mov ax,1" > temp.asm && nasm -f bin -o temp.com temp.asm && ndisasm temp.com
Upvotes: 1