Skip to main content
correct filename of FreeDOS debug.com, code fence it, lDebug is "small L Debug"
Source Link
  • @ecm's IDebuglDebug, based on debug.exedebug.com from FreeDOS.
  • Turbo Debugger is widely recommended, and maybe can be found for free
  • debug.exe/debug.com in MS-DOS or FreeDOS is an option, although classic MS-DOS DEBUG is pretty terrible to actually program in, not having labels, only numeric addresses for jump targets and so on!
  • @ecm's IDebug, based on debug.exe from FreeDOS.
  • Turbo Debugger is widely recommended, and maybe can be found for free
  • debug.exe/debug.com in MS-DOS or FreeDOS is an option, although classic MS-DOS DEBUG is pretty terrible to actually program in, not having labels, only numeric addresses for jump targets and so on!
  • @ecm's lDebug, based on debug.com from FreeDOS.
  • Turbo Debugger is widely recommended, and maybe can be found for free
  • debug.exe/debug.com in MS-DOS or FreeDOS is an option, although classic MS-DOS DEBUG is pretty terrible to actually program in, not having labels, only numeric addresses for jump targets and so on!
FreeDOS debug was apparently always called debug.com
Source Link
Peter Cordes
  • 380.2k
  • 53
  • 758
  • 1k
  • @ecm's IDebug, based on debug.exe from FreeDOS.
  • Turbo Debugger is widely recommended, and maybe can be found for free
  • debug.exe/debug.com in MS-DOS or FreeDOS is an option, although classic MS-DOS debug.exeDEBUG is pretty terrible to actually program in, not having labels, only numeric addresses for jump targets and so on!
  • @ecm's IDebug, based on debug.exe from FreeDOS.
  • Turbo Debugger is widely recommended, and maybe can be found for free
  • debug.exe in MS-DOS or FreeDOS is an option, although classic MS-DOS debug.exe is pretty terrible to actually program in, not having labels, only numeric addresses for jump targets and so on!
  • @ecm's IDebug, based on debug.exe from FreeDOS.
  • Turbo Debugger is widely recommended, and maybe can be found for free
  • debug.exe/debug.com in MS-DOS or FreeDOS is an option, although classic MS-DOS DEBUG is pretty terrible to actually program in, not having labels, only numeric addresses for jump targets and so on!
Link some debuggers; added 197 characters in body
Source Link
Peter Cordes
  • 380.2k
  • 53
  • 758
  • 1k

Debuggers

###Related Tags:Single-stepping in a debugger and looking at registers is essential. Trying to write a program without one is like trying to build a robot blindfolded. It's very much worth the time to learn to use one. For 32/64-bit mode under a modern OS, see the debugging section at the bottom of the x86 tag wiki.

Under DOS:

  • @ecm's IDebug, based on debug.exe from FreeDOS.
  • Turbo Debugger is widely recommended, and maybe can be found for free
  • debug.exe in MS-DOS or FreeDOS is an option, although classic MS-DOS debug.exe is pretty terrible to actually program in, not having labels, only numeric addresses for jump targets and so on!

Full system (for bootloaders, or maybe DOS programs)

  • Bochs is usually the gold standard, with a built-in debugger that's aware of segmentation. Manual. Note that it's an optional config feature; some builds might not come with it enabled. It's great for debugging the switch to 32-bit protected mode, and 64-bit mode. It can parse and dump your GDT and page tables, to help you spot mistakes in what you put there, and it knows what mode the CPU is in so it will disassemble in the right mode to match execution, helping you catch mistakes where code was assembled for the wrong bitness.
  • QEMU: can act as a remote for GDB. GDB doesn't know about segmentation so this isn't ideal for real mode or during the switch to protected mode.
  • DOSBox: There's a DOSBox-X fork with a built-in debugger, and the mainline DOSBox apparently also has a debugger built-in. (Curses-based text UI)

Related Tags:

###Related Tags:


Debuggers

Single-stepping in a debugger and looking at registers is essential. Trying to write a program without one is like trying to build a robot blindfolded. It's very much worth the time to learn to use one. For 32/64-bit mode under a modern OS, see the debugging section at the bottom of the x86 tag wiki.

Under DOS:

  • @ecm's IDebug, based on debug.exe from FreeDOS.
  • Turbo Debugger is widely recommended, and maybe can be found for free
  • debug.exe in MS-DOS or FreeDOS is an option, although classic MS-DOS debug.exe is pretty terrible to actually program in, not having labels, only numeric addresses for jump targets and so on!

Full system (for bootloaders, or maybe DOS programs)

  • Bochs is usually the gold standard, with a built-in debugger that's aware of segmentation. Manual. Note that it's an optional config feature; some builds might not come with it enabled. It's great for debugging the switch to 32-bit protected mode, and 64-bit mode. It can parse and dump your GDT and page tables, to help you spot mistakes in what you put there, and it knows what mode the CPU is in so it will disassemble in the right mode to match execution, helping you catch mistakes where code was assembled for the wrong bitness.
  • QEMU: can act as a remote for GDB. GDB doesn't know about segmentation so this isn't ideal for real mode or during the switch to protected mode.
  • DOSBox: There's a DOSBox-X fork with a built-in debugger, and the mainline DOSBox apparently also has a debugger built-in. (Curses-based text UI)

Related Tags:

emu8086 tutorial; update ECM's NASM appendix link
Source Link
Peter Cordes
  • 380.2k
  • 53
  • 758
  • 1k
Loading
Link @ecm's fork of the NASM appendix
Source Link
Peter Cordes
  • 380.2k
  • 53
  • 758
  • 1k
Loading
https
Source Link
Cœur
  • 39.1k
  • 25
  • 207
  • 283
Loading
Link Michael Petch's guide + working example
Source Link
Peter Cordes
  • 380.2k
  • 53
  • 758
  • 1k
Loading
added 2240 characters in body; added 399 characters in body
Source Link
Cody Gray
  • 246.3k
  • 53
  • 514
  • 591
Loading
Link
Loading