Author Topic: help with debug.exe  (Read 6600 times)

Offline jalisco

  • Jr. Member
  • *
  • Posts: 6
help with debug.exe
« on: July 07, 2013, 11:34:06 AM »
I tried google, but I thought since my problem is more nasm/assembler related, I can get rid of all the superfluous results.

When I type:
c:\nasm\debug filename.asm
File not found
-


So, I am allowed to enter the debugger, but it is claiming there is no file. The file, "filename.asm" exists in the folder nasm. I double and tripled checked that.

I get this error quite a bit, with different files. But, some do work as expect.

Strange behavior.

Thanks for reading.

Offline avcaballero

  • Full Member
  • **
  • Posts: 132
  • Country: es
    • Abre los Ojos al Ensamblador
Re: help with debug.exe
« Reply #1 on: July 07, 2013, 11:44:29 AM »
Maybe you want compile "filename.asm" with debug, you should try "debug < filename.asm". Besides, maybe this one can helps you:

http://www.abreojosensamblador.net/Productos/AOE/html/Pags/ApC.html

Offline jalisco

  • Jr. Member
  • *
  • Posts: 6
Re: help with debug.exe
« Reply #2 on: July 09, 2013, 04:27:37 PM »
Hi,

thanks for the link, I will check that our shortly.

I found through my searching that debug is limited in it's debugging of non-DOS (.com) compiled programs. That was probably part of my problem.

modified:
fortunately, I speak a little bit of spanish =)

modified 2:
When i try to debug the program with the above mentioned <
debug < filename.asm

I run into a "write fault error writing device PRN" and aborting or retrying just gives me an endless stream of the messages. Finally, my program is starting to almost work as expected, other than I can't debug it.

But, having read up on it a little, apparently, debug is limited with non-DOS programs. I am writing in 16-bit nasm, so it should work, but it's more complex then just a few lines - i hazard to say (it's complex for me) =)
« Last Edit: July 09, 2013, 05:16:47 PM by jalisco »

Offline avcaballero

  • Full Member
  • **
  • Posts: 132
  • Country: es
    • Abre los Ojos al Ensamblador
Re: help with debug.exe
« Reply #3 on: July 10, 2013, 06:24:59 AM »
With your nickname I thought that you would be a Spanish speaker... Never mind, fortunatelly I speak English a bit :), the link I provided you was already translated to English:

http://www.abreojosensamblador.net/Productos/AOE/html/Pags_en/ApC.html

Even more, I can provide you the example that I put there. You should understand that you are dealing with debug, hence you should use its commands, not only asm code, that's why there are something funny things in the attached file. You have a summary of debug commands in a table in the above link.

Well, download the file where you want, cmd to it and write down:
Code: [Select]
> debug < Hola.txt
You will see what debug does with it, and the most important, you will see that "mundo.com" will appear, even more: you can execute it:

Code: [Select]
> mundo
Hola, mundo!

As far as I know, debug not only work with 16 bit com files, but also with 16 bits exe files. You are creating a com file that is easier than an exe file...

Regards.

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: help with debug.exe
« Reply #4 on: July 10, 2013, 03:46:09 PM »
Unless your file is in "debug syntax", "debug filename.exe" (after assembling "filename.asm" to "filename.obj" and linking to "filename.exe")  may work better. As I recall. debug  will step through an .exe (a 16-bit .exe!), but you can't save your changes as you can with a .com.

Best,
Frank

P.S. I used to like David Lindauer's GRDB as a brighter alternative to DEBUG...