Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!uupsi!sunic!news.funet.fi!funic!nntp.hut.fi!nntp!Jari.Karjala From: Jari.Karjala@niksula.hut.fi Newsgroups: comp.os.msdos.programmer Subject: Hercules graphics with Turbo C and Debugger Message-ID: Date: 27 May 91 11:46:36 GMT Sender: usenet@nntp.hut.fi (Usenet pseudouser id) Reply-To: Jari.Karjala@hut.fi Distribution: comp Organization: Helsinki University of Technology, Finland Lines: 22 Nntp-Posting-Host: superman.hut.fi I have a C/ASM program which sets the Hercules graphics card into the graphics mode, writes a few bytes to screen and then returns to text mode. When I set the graphics mode through BGI's initgraph() function, I can singlestep through the following code with Turbo Debugger and the graphics/text screen is flipped correctly. But if I replace the initgraph() with my own function to set the graphics mode (and don't link with graphics.lib), TD no longer notices the mode change and thinks it is still in text mode (and of course the result is not very usable). The question is: what does initgraph do to tell TD that now we are in graphics mode? Or is there some hidden function in the BGI library which is used by the debugger? -- /*--- Jari.Karjala@hut.fi -- The World is Just a Huge Fractal ---*/ float O,I,o=0.075,h=1.5,T= -2,r,l;main(){int _=0,L=80,s=3200;for(;s %L|| (h-=o,T= -2),s;(4-(r=O*O)<(l=I*I)|++_==L)&&write(1,(--s%L?_