From: "Rafal Maj" Newsgroups: comp.os.msdos.djgpp Subject: Odp: Turning off monitor ? Date: Sat, 26 May 2001 16:35:40 +0200 Organization: Academic Computer Center CYFRONET AGH Lines: 46 Message-ID: <9eof0d$6tg$1@info.cyf-kr.edu.pl> References: <3 DOT 0 DOT 1 DOT 32 DOT 20010523120828 DOT 006b3ad4 AT wingate> <3B0D50EC DOT 80EBC0A9 AT cyberoptics DOT com> NNTP-Posting-Host: d-94-53-20.cyfronet.krakow.pl X-Trace: info.cyf-kr.edu.pl 990887758 7088 149.156.1.180 (26 May 2001 14:35:58 GMT) X-Complaints-To: news AT cyf-kr DOT edu DOT pl NNTP-Posting-Date: Sat, 26 May 2001 14:35:58 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2615.200 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com :( Tih doesn't work either in DOSbox or in plain DOS : #include #include int main() { __dpmi_regs r; r.x.ax = 0x4F10; r.x.bx = 0x01 + 4<<8; __dpmi_int (0x10, &r); // mode: 0=on, 1=standby, 2=suspend, 4=off. delay(6000); //... } Please help Raf256 Użytkownik Eric Rudd w wiadomooci do grup dyskusyjnych napisał:3B0D50EC DOT 80EBC0A9 AT cyberoptics DOT com... > "Nimrod A. Abing" wrote: > > >Hi, > > >does somebody have idea how to turn off monitor (set it to sleep mode) from > > >DJGPP program (and then turn it on ?) > I haven't tried to do it from DJGPP, but here is a code fragment from a Borland > C++ app I use: > _AX = 0x4F10; > _BL = 0x01; > _BH = mode; > geninterrupt(0x10); > mode: 0=on, 1=standby, 2=suspend, 4=off. It's probably straightforward to > translate this to DJGPP-compatible calls. I got the info from Ralf Brown's > interrupt list: > http://www.ctyme.com/rbrown.htm > You should be aware that some interesting things can happen if you attempt to use > alt-tab to switch back to Windows while the monitor is sleeping. Hope this > helps. > -Eric Rudd > rudd AT cyberoptics DOT com