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 ?

  • I can't find anything about the debug mode on the wiki page. The only place where I found any info was this post on VOGONS.
    – ScumCoder
    Aug 7, 2014 at 15:30
  • 3
    DOSBox may be heavily documented and open source. But, i think "How do i accomplish (X) in (Y)", where (Y) is a reverse engineering tool, is a valid question even if (Y) is heavily documented and open source. Aug 7, 2014 at 15:43
  • 1
    @GuntramBlohm: Fair enough; I've retracted my close-vote and my previous comments. Thanks for presenting a reasonable argument. Aug 7, 2014 at 16:54

1 Answer 1


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.

  • 1
    Whoa, thank you SO much. I didn't read your answer in time and out of despair made an ugly patch to the DOSbox source which does exactly the same.
    – ScumCoder
    Aug 10, 2014 at 11:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.