VOGONS


First post, by vasya segment

User metadata
Rank Newbie
Rank
Newbie

Well, when trying to debug programs written in assembly and compiled with ml.exe, link16.exe out of hutch's masm32 v10 package, debugger run in dosbox (td, insight) has incorrect values in memory , first 2 bytes in data segment.

P.S.: there's also sort of bug, when switching between active windows and returning to dosbox - it doesnt refresh the window.

os vista enterprise sp1 x64

Reply 1 of 7, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

have tried using the debugger that comes with dosbox ?
(dev forum has dosbox debugger builds)
I don't know why the data comes up wrong. I never experienced it. You are sure you are looking at the data and not at the mcb/psp ?.
For the refresh thing. I don't know. I thought we redrew the screen on exposure (switching back to dosbox window).

Water flows down the stream
How to ask questions the smart way!

Reply 2 of 7, by vasya segment

User metadata
Rank Newbie
Rank
Newbie

I'm sure that I'm looking at the start of data segment and 2 first data bytes always incorrect. (turbo debugger 3 and insight 1.24 debuggers show that same mistake).

Even when I manually change values of those 2 bytes while running a debugger, after executing next assembly command those 2 bytes return their previous values, which dont make any sense (to me).

P.S.: Debugger that comes with dosbox? no, man. But that's great!
PPS
Refresh thing can be simply "fixed" - I just have to scroll the window down minimized, and then open it back. But that's not too "correct".

Reply 3 of 7, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

for the 2 bytes wrong. Try the CVS version of dosbox.
http://builds.tharos-online.de/
We fix small bugs on a daily basis. It might have been fixed already. (If it is a bug)

for dosbox with builtin debugger DOSBox debugger

Water flows down the stream
How to ask questions the smart way!

Reply 6 of 7, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

It sounds like you haven't defined a location for the stack with an .EXE memory model. The linker gives you a warning that there is no stack location; but it's not treated as a hard error. This programming mistake has been incorrectly reported as a DOSBox issue before:

MASM on DOSBOX
Why this happened when I writting asm program?

In one case the code segment is being overwritten by the stack, in the other case it's the data segment; which one gets clobbered depends on which is defined first in the assembler code. I posted a code example for defining the stack location in one of those threads, which may save you the time of looking up the syntax.

Reply 7 of 7, by vasya segment

User metadata
Rank Newbie
Rank
Newbie

ripsaw8080
Yes, you're correct. I haven't used stack. You have encountered already this kind of problem, according to a topic links you posted.

I have to say that I've started already using DOSbox debug edition and I'm not too comfortable with it, so it's good news to me.

The DOSbox debug edition show the correct memory dump.

Thank you and Qbix for quick answering.