- qemu - Emulator
- nasm - Assembler
- dd if="drive" of=boot.bin bs=512 count=1
- Compile asm to mbr bin: nasm -f bin ???.asm -o ???.bin
- Disassemble bin to asm: ndisasm -b16 -o7C00h ???.bin > ???.asm (can omit flag -07c00h to display assembly from 0x0000 instead of 0x7c00)
- qemu-system-i386 -fda boot.bin -boot a -s -S
- -s and -S pauses qemu allowing you to attach a debugger and also starts a debugging server at localhost:1234.
- Use bochs on linux.
- Follow the link below to setup:
- We chose to use GDB.
- In gdb type:
target remote localhost:1234
- Put a breakpoint after the interrupt call (0x13).
- Don't try to step through the interrupt using "ni".
- Use create_disk.py to extend boot.bin with more sectors so we can test reading and writing.