Date: Sun, 17 Mar 1996 16:46:13 +0200 (IST) From: Eli Zaretskii To: Charles Brasted Cc: djgpp AT delorie DOT com Subject: Re: Suggestion for FAQ and int86 question. In-Reply-To: <9603150414.AA13892@pilot.physics.adelaide.edu.au> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Fri, 15 Mar 1996, Charles Brasted wrote: > As far as I can tell, I had let some stray spaces enter between the "set > djgpp" and the rest, which apparently was the source of the problem. For > example I typed > set djgpp = c:\djgpp\djgpp.env > > instead of > set djgpp=c:\djgpp\djgpp.env Actually, the second blank (after the `=' sign) is harmless; it's the one *before* `=' which causes trouble, because it defines a variable called "DJGPP " (with the blank in the name) and thus the DJGPP startup code doesn't find a variable "DJGPP". Thank you for your suggestion, I'll include such a warning in the next version of the FAQ. > void pok(int x, int y, char c) > { > goto_xy(x,y); > putchar(c); > } It is usually bad idea to mix buffered I/O (like `putchar' or `fprintf') with direct screen writes and BIOS interrupts. If you *do* need to call buffered I/O, always call `fflush(stdout)' immediately after to deliver the characters to the screen. But the best (and the correct) way is just to call any of the conio functions that write directly to the screen, like `putch' or `ScreenPutChar'. I didn't try this, but I'd bet that in your case, the characters aren't flushed until the program exits. And of course, this is also in the FAQ (section 9.4), although it doesn't mention `putchar' explicitly...