The MASM Forum Archive 2004 to 2012
Welcome, Guest. Please login or register.
July 10, 2020, 11:52:48 AM

Login with username, password and session length
Search:     Advanced search
128553 Posts in 15254 Topics by 684 Members
Latest Member: mottt
* Home Help Search Login Register
+  The MASM Forum Archive 2004 to 2012
|-+  Miscellaneous Forums
| |-+  16 bit DOS Programming
| | |-+  Codeview or other 16 bit debuggers with windows 7
« previous next »
Pages: [1] 2 Print
Author Topic: Codeview or other 16 bit debuggers with windows 7  (Read 19843 times)
allynm
associate professor
Member
*****
Gender: Male
Posts: 208


Codeview or other 16 bit debuggers with windows 7
« on: April 27, 2011, 09:38:19 PM »

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

Logged
dedndave
Member
*****
Posts: 12523


Re: Codeview or other 16 bit debuggers with windows 7
« Reply #1 on: April 27, 2011, 11:52:22 PM »

without a virtual environment of some kind, win 7 64-bit does not support 16-bit code
Logged
allynm
associate professor
Member
*****
Gender: Male
Posts: 208


Re: Codeview or other 16 bit debuggers with windows 7
« Reply #2 on: April 28, 2011, 12:18:28 AM »

Hi DednDave,

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

Mark
Logged
allynm
associate professor
Member
*****
Gender: Male
Posts: 208


Re: Codeview or other 16 bit debuggers with windows 7
« Reply #3 on: April 28, 2011, 01:06:29 AM »

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
Logged
dedndave
Member
*****
Posts: 12523


Re: Codeview or other 16 bit debuggers with windows 7
« Reply #4 on: April 28, 2011, 02:46:45 AM »

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
Logged
FORTRANS
Member
*****
Gender: Male
Posts: 1147


Imagine


Re: Codeview or other 16 bit debuggers with windows 7
« Reply #5 on: April 28, 2011, 11:28:44 AM »

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.
Logged
allynm
associate professor
Member
*****
Gender: Male
Posts: 208


Re: Codeview or other 16 bit debuggers with windows 7
« Reply #6 on: April 28, 2011, 01:56:22 PM »

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
Logged
dedndave
Member
*****
Posts: 12523


Re: Codeview or other 16 bit debuggers with windows 7
« Reply #7 on: April 28, 2011, 02:01:12 PM »

the symbols have nothing to do with DosBox   Tongue
Logged
allynm
associate professor
Member
*****
Gender: Male
Posts: 208


Re: Codeview or other 16 bit debuggers with windows 7
« Reply #8 on: April 28, 2011, 03:02:48 PM »

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
Logged
clive
Hardcore x86, ARM and MIPS toolsmith
Member
*****
Posts: 1230


Project Looking Glass. Following the white rabbit.


Re: Codeview or other 16 bit debuggers with windows 7
« Reply #9 on: April 28, 2011, 06:24:02 PM »

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.
Logged

It could be a random act of randomness. Those happen a lot as well.
allynm
associate professor
Member
*****
Gender: Male
Posts: 208


Re: Codeview or other 16 bit debuggers with windows 7
« Reply #10 on: April 28, 2011, 07:45:45 PM »

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
Logged
allynm
associate professor
Member
*****
Gender: Male
Posts: 208


Re: Codeview or other 16 bit debuggers with windows 7
« Reply #11 on: April 28, 2011, 07:56:00 PM »

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
Logged
clive
Hardcore x86, ARM and MIPS toolsmith
Member
*****
Posts: 1230


Project Looking Glass. Following the white rabbit.


Re: Codeview or other 16 bit debuggers with windows 7
« Reply #12 on: April 28, 2011, 08:37:15 PM »

CodeView symbol dumping tool.

* dumpcv_412.zip (37.73 KB - downloaded 295 times.)
Logged

It could be a random act of randomness. Those happen a lot as well.
allynm
associate professor
Member
*****
Gender: Male
Posts: 208


Re: Codeview or other 16 bit debuggers with windows 7
« Reply #13 on: April 29, 2011, 12:40:31 PM »

Clive,

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

Regards,

Mark
Logged
allynm
associate professor
Member
*****
Gender: Male
Posts: 208


Re: Codeview or other 16 bit debuggers with windows 7
« Reply #14 on: April 29, 2011, 09:12:50 PM »

Hello Clive,

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

Regards,
Mark
Logged
Pages: [1] 2 Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP The MASM Forum Archive 2004 to 2012 | Powered by SMF 1.0.12.
© 2001-2005, Lewis Media. All Rights Reserved.
Valid XHTML 1.0! Valid CSS!