From: "Bonifati" Newsgroups: comp.os.msdos.djgpp Subject: wait for vertical retrace Date: Fri, 4 Jun 1999 20:24:02 +0200 Organization: Centro Servizi Interbusiness Lines: 21 Message-ID: <7j95e8$ajm$1@fe1.cs.interbusiness.it> NNTP-Posting-Host: 212.210.156.32 X-Newsreader: Microsoft Outlook Express 4.72.3110.5 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com i copied this code to wait for the vertical retrace from a book: void Wait_Vertical_Retrace (void) { while ( (inp (0x3da) && 0x8) != 0 ) {}; while ( (inp (0x3da) && 0x8) == 0 ) {}; } my program works without waiting for vertical retrace; when i include it, it fails on run-time (i think it goes in infinite loop into Wait_Vertical_Retrace function). i can't figure out what's wrong with this function. please help me!