8

What can I do to reverse engineer a DOS .COM file? As far as debugging goes, I've looked DEBUG and DEBUGX from the creators of FreeDOS, as well as the default DEBUG command that comes with Windows. Sure, I can probably work with them and eventually figure out what I'm doing, but I feel like the process would end up being longer than necessary. Is there a better tool I can use?

If there are no "better" tools than DEBUG or DEBUGX, then what can I use to work with output from these two tools? My main goal is to create something that mimics the .COM program, but in a more manageable format (as far as code goes).

1
  • suggested by broadway: d86
    – Ange
    Apr 19, 2013 at 16:47

3 Answers 3

7

I personally use DosBox debugger, which is quite complete, with a SoftICE-like interface.

Otherwise you can go for DOS debuggers like Turbo Debugger or CodeView.

1
  • Cool, I'll try all of them out. I'll get back to you with a response on what worked best for me. So far CodeView looks very promising
    – JMcAfreak
    Apr 19, 2013 at 16:39
5

As an alternative to Ange's answer I would like to offer idados. I've had good experiences with it when trying to reverse engineer a program and the accompanying file format. It also makes use of DOSBox. But if you have a proper IDA Pro license it is - I think - slightly more convenient.

6
  • Hmmm... I might look into that when I have the money to get an IDA Pro license. Thanks for the tip.
    – JMcAfreak
    Apr 18, 2013 at 22:13
  • @JMcAfreak: it is why I have added this last sentence. I think the SDK wasn't included the last time in the IDA Freeware version and plugins were also (not full or not at all?) supported. But since I have the full version I don't check it too often.
    – 0xC0000022L
    Apr 18, 2013 at 22:22
  • IDA free doesn't support SDK afaik - there was an unofficial patch for that, which I haven't tested.
    – Ange
    Apr 19, 2013 at 6:32
  • I wish I could select two accepted answers! :P Both seem like really good options. Currently I'm using the stuff suggested by @Ange (I'm trying each one out), but I'll definitely look into this!
    – JMcAfreak
    Apr 22, 2013 at 15:53
  • accept @0xC0000022L's then, since it enhances mine (I haven't tried idados personally)
    – Ange
    Apr 22, 2013 at 16:42
0

My answer is a little late; newcomer to this site. The Decompiler project was initiated in order to decompile MS-DOS EXE and COM binaries. The project has both a command-line and a GUI tool:

https://sourceforge.net/projects/decompiler/

Use the following command with the command-line tool to decompile COM programs:

decompile --default-to ms-dos-com myprog.com

In the GUI, use the menu command File > Open as... to open the COM file and specify a start address like 0800:0100.

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.