From: Speed Newsgroups: comp.os.msdos.djgpp Subject: Re: Vertical retrace Date: Tue, 02 Dec 1997 19:30:42 -0800 Organization: Erol's Internet Services Lines: 25 Message-ID: <3484D262.EC190867@remove-this.linux.dpilink.com> References: <3480FFFC DOT DAEC5D62 AT geocities DOT com> NNTP-Posting-Host: 207.96.74.133 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit CC: carrac AT geocities DOT com To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk I'll make this short... there are other variations (like waiting until the retrace is in progress). This waits for the start of the vertical retrace period: void Wait_Retrace() { while (inportb(0x3DA) & 0x8) { // do nothing if retrace is in progress } while (!(inportb(0x3DA) & 0x8)) { // do nothing - wait for start of retrace period } return; } In English: when a vertical retrace is in progress, bit 3 of Input Status Register 1 (port 3DAh) is set. Of course you could easily do this in assembly or as a macro, to avoid the function overhead. - Mark Craig Rennie wrote: > > How exactly do i wait for the vertical retrace? > I cant find anything on it anywhere, except for Borland, which i have > but it compiles grafix stuff slower than DJGPP.