Codeview or other 16 bit debuggers with windows 7

Started by allynm, April 27, 2011, 09:38:19 PM

Previous topic - Next topic

allynm

Hello everyone,

I foolishly believed that Codeview could debug 16 bit code running under Win 7 simply because it worked under XP SP 3.  It doesn't.  In a previous post to this forum, Clive suggested that it might not.  I can report that it doesn't. period.  The codeview window opens, but it does not respond to keyboard/mouse input.

There is no information I could find at MSDN library on this matter.  Someone else here might have better info of course than I do.

Assuming that my claim is correct, could someone suggest a debugger for 16 bit code that would work under Win 7?  Or is this simply hopeless?

Thanks,

Mark Allyn


dedndave

without a virtual environment of some kind, win 7 64-bit does not support 16-bit code

allynm

Hi DednDave,

That seems definitive.  It is indeed hopeless.  Oh, well....Thanks.

Mark

allynm

Hi Dedndave,

But, what bothers me about this is that the 16 bit program I wrote assembles just fine with ml /c /omf /Zi /Fl segtst.asm and moreover it links without any problem with link16 /map /codeview segtst.obj,,,c:\stdlib\stdlib\lib\stdlib.lib.

...and it runs

...and if I execute c:\debug segtst.exe the ancient old debug pgm runs like a top.  All of this under Win 7.

Honestly, I could use a bit of a tutorial on why codeview won't work except in what you call a "virtual environment".  Hope I'm not being a pest.

Regards,
Mark

dedndave

oh - maybe you are using win7 32-bit
anyways, codeview may not work properly because of the way it sets breakpoints
or it is in some other way violating modern protection mechanisms
like - trying to access data at 40:0, or revectoring interrupts, etc

FORTRANS

Hi.

   You could try a virtual environment such as DOSBOX, VirtualPC,
or Bochs to run your debugging session.  Those may emulate a
real mode better than Windows 7.

HTH,

Steve N.

allynm

Steve,

I'm completely unfamiliar with DosBox.  Their home page doesn't mention compatibility with Win 7, but assuming it does run on Win 7, would it know what to do with the debugging symbols generated by link16 and ml?  Or are these symbols transparent to DoxBox?  I suppose if it is truly a Dos emulator it would have to know what to do with the debug information....someone had to debug the games that were originally written for Dos.  maybe I'm answering my own question.

Thanks for the tip.  It certainly might be the solution. 

Regards,
Mark

dedndave

the symbols have nothing to do with DosBox   :P

allynm

Hi Dedndave,

Thanks for confirming my guess. 

According to DosBox's ReadMe there is no particular danger in using their product.  Hope they're right cause I'm going to give it a try later today.

Regards,
Mark

clive

The CodeView symbols just sit behind the executable, the normal DOS loader doesn't even see them or load them, they are effectively out-of-band data in the executable format.

Now the classic DOS CodeView debugger uses a number of 80286 era protected mode type tricks to act more like a DOS extender as I recall, and hide outside of regular DOS's memory space. The OS/2 one might be worth a look, but with all these things your linker is probably generating the most modern version of the symbol format, and assorted older versions of CodeView are probably not going to be able to parse them. Using an older 16-bit linker might help with that, but you're wading into about 25-years worth of old crap that Microsoft wants to move beyond.

I'm surprised Dave hasn't thrown SYMDEB at you, it might at least run, and you'd create .SYM files from .MAP files with MAPSYM.
It could be a random act of randomness. Those happen a lot as well.

allynm

Hi Clive, Dave, Steve

I can confirm that DosBox works fine on Win7.  Their home page does not explicitly state this, but a quick test showed that it runs  a little 16 bit app without a problem.

I'm not entirely clear on how to run Codeview under DosBox.  The version of CodeView I am using came with a distribution of MASM 6.15 in the /bin file.  I'll play around with this some more.

The version of link16 that I am using is the same one as distributed with Masm32.  I do not know offhand its version number.

Thanks for clarifying the location of the debug symbols.  I thought it was strange when no .pdb or .dbg file was generated.  I know I am reprising stuff that happened many years ago and that can be done much more efficiently now.  But, I got interested in memory segmentation and one thing led to another...a slippery slope.

I'll let you know how things turn out with codeview.

Regards,
Mark

allynm

Clive, Dave, and Steve,

Well, Codeview does indeed work fine on DosBox under Win 7.  I haven't tested all the codeview features, but so far everything behaves as one would wish.

I suppose I should now invest in a bunch of 16 bit games...

Thanks to all.

Mark

clive

CodeView symbol dumping tool.
It could be a random act of randomness. Those happen a lot as well.

allynm

Clive,

Thanks for the file.  I'll try it out. 

Regards,

Mark

allynm

Hello Clive,

I dumped codeview using your program.  Is there a primer on how to read the tables? 

Regards,
Mark