From: Charles Brasted Message-Id: <9603150414.AA13892@pilot.physics.adelaide.edu.au> Subject: Suggestion for FAQ and int86 question. To: djgpp AT delorie DOT com Date: Fri, 15 Mar 1996 13:44:28 +0930 (CST) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 1808 I recently posted a question, which had also plagued others, about the new version not finding header files or crt0.o when compiling. The FAQ identifies this problem, however it could perhaps add an additional paragraph to remind people to be wary of stray spaces in the environment settings. 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 in my autoexec.bat file. Stupid I know, but this could be causing some people grief. I recall a warning of some sort somewhere in the documentation, however as this problem manifests itself by the compiler "not finding header files" etc, it might be worth an explicit mention in the FAQ under the section regarding compiler problems. Onto int86, this has had me stumped for a while. I am using a familiar routine to write to the screen, when I use the goto_xy(,) once, it works fine. However, when use the goto_xy routine twice in a row (as in the following code), the screen clears, then the cursor flashes at the point (20,20) then after the delay finishes, it moves to (10,10) and prints both letters! As far as I can see it should print a letter 'c' at 20,20 and a 'd' at 10,10. What gives? I hope someone can help me out, I don't fancy using dosmemput... code begins.. #include #include #include void goto_xy(int x, int y); void pok(int x, int y, char c); void goto_xy(int x, int y) { union REGS r; r.h.ah = 2; r.h.dl = x; r.h.dh = y; r.h.bh = 0; int86(0x10, &r, &r); } void pok(int x, int y, char c) { goto_xy(x,y); putchar(c); } void main(void) { int count; system("cls"); pok(10,10,'c'); delay(10000); pok(20,20,'d'); }