Skip to content

Instantly share code, notes, and snippets.

@syuu1228
Last active December 20, 2015 14:39
Show Gist options
  • Save syuu1228/6148732 to your computer and use it in GitHub Desktop.
Save syuu1228/6148732 to your computer and use it in GitHub Desktop.
echo "main:" > test.S
echo "inb \$0x50, %al" >> test.S
as -o test.o test.S
objcopy -I elf64-x86-64-freebsd -O binary test.o test.bin
sudo bhyveload -m 256 -S test.bin:0x7c00 test
sudo bhyve -m 256 -e test
# bhyve says "Unhandled inb 0x0050", because there's no inb 0x50 handler.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment