PRB: Debugging High Resolution EGA or VGA Graphics with CodeView (23308)



The information in this article applies to:

  • Microsoft CodeView for MS-DOS 2.2
  • Microsoft CodeView for MS-DOS 3.0
  • Microsoft CodeView for MS-DOS 3.11
  • Microsoft CodeView for MS-DOS 3.14
  • Microsoft CodeView for MS-DOS 4.0
  • Microsoft CodeView for MS-DOS 4.01
  • Microsoft CodeView for MS-DOS 4.05
  • Microsoft CodeView for MS-DOS 4.1
  • Microsoft CodeView for OS/2 2.2
  • Microsoft CodeView for OS/2 3.0
  • Microsoft CodeView for OS/2 3.11
  • Microsoft CodeView for OS/2 3.12
  • Microsoft CodeView for OS/2 3.5

This article was previously published under Q23308

SYMPTOMS

Debug a program that does EGA, VGA, or SVGA graphics. When you continue from a breakpoint after the program has painted the screen, the screen appears differently than before the breakpoint; all colors seemingly have been turned to black. The program is using the EGA in 640x350, 16-color mode.

CAUSE

This behavior is partly related to the size of the buffer that CodeView creates for storing screen information. If you are running on a CGA, EGA, or VGA board, this buffer is 16K by default. If you are running on a monochrome board, this buffer is 4K by default. As you are finding, 16K is not enough memory for a color image using 640x350 resolution (the maximum resolution supported is 640x200), hence the loss of color after the breakpoint.

RESOLUTION

The best way to work around this limitation is to use a dual-monitor setup for debugging applications that run in a high resolution graphics mode. Invoke CodeView with the /2 switch and the CodeView display will appear on the secondary monitor while the program's graphical output will remain on the main monitor. Because the output is going to a different screen, CodeView won't have to worry about changing the video modes or the buffering.

Modification Type:MajorLast Reviewed:10/23/2003
Keywords:kb16bitonly KB23308