DOSbox compiled with --enable-debug=heavy option becomes a powerful reversing tool. Anytime I feel like checking the disassembly and memory state I just hit Alt+Pause.But, what if I want to see the very first instructions of the program ? How do I start the application so that it immediately enters debug mode before even starting execution ?
How to start a DOS application in DOSbox in debug mode?
disassembly;debugging;dos
If you build with --enable-debug[=heavy] and run the program via debug.com, it automatically breaks on the first instruction. See the DOS_Execute function in src/dos/dos_execute.cpp and DEBUG_CheckExecuteBreakpoint in src/debug/debug.cpp.