Article View: comp.os.msdos.programmer
Article #6928Hercules graphics with Turbo C and Debugger
From: Jari.Karjala
Date: Mon, 27 May 1991 11:46
Date: Mon, 27 May 1991 11:46
22 lines
1569 bytes
1569 bytes
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?_<L?
--_%6:6:7)+"World! \n",1)&&(O=I=l=_=r=0,T+=o/2))O=I*2*O+h,I=l+T-r;}
Technical Details
Message-ID:
<JARI.KARJALA.91May27134636@superman.hut.fi>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!uupsi!sunic!news.funet.fi!funic!nntp.hut.fi!nntp!Jari.KarjalaShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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: <JARI.KARJALA.91May27134636@superman.hut.fi> 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