[comp.windows.ms] DOS PIF

kevin@msa3b.UUCP (Kevin P. Kleinfelter) (11/09/90)

I copied _DEFAULT.PIF to DOS.PIF, ran the PIF editor and made the
program = COMMAND.COM and checked the WINDOWED option.

When I run DOS.PIF, I get DOS in a window, but DIR occasionally
gives duplicate lines. The disk is NOT corrupted, the display from
DIR IS corrupted.  What is wrong with my PIF?

(Windows 3.0, IBM PS/2 Model 80, 80386 processor, executed via "WIN".)
-- 
Kevin Kleinfelter @ Dun and Bradstreet Software, Inc (404) 239-2347
{emory,gatech}!nanovx!msa3b!kevin

Soon to become {emory,gatech}!nanovx!dbses0!kevin  (But not yet!)

spolsky-joel@cs.yale.edu (Joel Spolsky) (11/11/90)

In article <1438@msa3b.UUCP> kevin@msa3b.UUCP (Kevin P. Kleinfelter) writes:
>I copied _DEFAULT.PIF to DOS.PIF, ran the PIF editor and made the
>program = COMMAND.COM and checked the WINDOWED option.
>
>When I run DOS.PIF, I get DOS in a window, but DIR occasionally
>gives duplicate lines. The disk is NOT corrupted, the display from
>DIR IS corrupted.  What is wrong with my PIF?

Nothing. This is natural. This happens because almost all DOS programs
write directly to the video memory. So windows, when it wants to
window a DOS program, reads that memory several times a second in
order to decide what to display in its window. While it is doing this,
the DOS program is interrupted. Now, if it happens to be interrupted
while the program that is running is in the middle of a vertical
scroll, you will get a temporary "doubled lines" effect (because
vertical scrolling works by copying one line at a time up.) This
effect should go away the next time a video scan is done.

This is especially likely to occur when you are doing a dir on a
floppy drive, because the floppy control bios seizes control of the
entire computer, not letting Windows a chance to refresh the display,
which means you may be stuck with the double lines in scrolling for a
bit longer. They do go away don't they?

This also explains the "jerkiness" of DOS boxes on slower hardware. 

Joel Spolsky
spolsky@cs.yale.edu                                     Silence = Death