Board index » delphi » Turning the screen off

Turning the screen off

This is a multi-part message in MIME format.
--------------B06E7F5F38019435C4D84855
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hi!
I've tried to write a program that will turn the screen off (like
windows). Unfortunately I can only make the screen go black. If there a
way to turn the screen off so that its actually off.
                                                        Andrey
--------------B06E7F5F38019435C4D84855
Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Andrey Glouchovtsev
Content-Disposition: attachment; filename="vcard.vcf"

begin:          vcard
fn:             Andrey Glouchovtsev
n:              Glouchovtsev;Andrey
email;internet: a...@fast.net
tel;home:       (610) 520 0971
x-mozilla-cpt:  ;0
x-mozilla-html: TRUE
end:            vcard

--------------B06E7F5F38019435C4D84855--

 

Re:Turning the screen off


Covered in

 117975 Jul 12 1997 ftp://garbo.uwasa.fi/pc/link/tsfaqp.zip
 tsfaqp.zip Common Turbo Pascal Questions and Timo's answers

   All the best, Timo

....................................................................
Prof. Timo Salmi   Co-moderator of news:comp.archives.msdos.announce
Moderating at ftp:// & http://garbo.uwasa.fi archives  193.166.120.5
Department of Accounting and Business Finance  ; University of Vaasa
mailto:t...@uwasa.fi <http://www.uwasa.fi/~ts/>  ; FIN-65101,  Finland

Spam foiling in effect.  My email filter autoresponder will return a
required email password to users not yet in the privileges database.

Re:Turning the screen off


Andrey <a...@fast.net> wrote in article <342F1DE7.3A137...@fast.net>...

Quote
> Hi!
> I've tried to write a program that will turn the screen off (like
> windows). Unfortunately I can only make the screen go black. If there a
> way to turn the screen off so that its actually off.
>                                                    Andrey

You would have to use  the APM (advanced power management) facility of your
computer, As for as I know this is'nt easy to program from scrach. I can
get hold of some TPUs for pascal 6 that allow you to do all kinds of neat
things whith APM like turning the screen or the hard drive off.

If youre interested, email me at mit...@acenet.co.za and I'll get you the
stuff.

Hope you're helped.
Simeon

Re:Turning the screen off


Quote
Andrey wrote:

> Hi!
> I've tried to write a program that will turn the screen off (like
> windows). Unfortunately I can only make the screen go black. If there a
> way to turn the screen off so that its actually off.
>                                                         Andrey

Int 10h, AX=4f10h, BL=00h to test for capabilities, int 10h, AX=4f10h,
BL=01h to set power state.  Details can be found in Ralf Brown's
Interrupt List, and the VESA VBE/PM specification if you happen to have
it.

--
Scott Earnest        | We now return you to our regularly |
set...@ix.netcom.com | scheduled chaos and mayhem. . . .  |

Re:Turning the screen off


Quote
"Simeon Miteff" <miteff*NOSPAM*@*SPAMNO*acenet.co.za> wrote:
>You would have to use  the APM (advanced power management) facility of your
>computer, As for as I know this is'nt easy to program from scrach.

Isn't it just a simple matter of using either an interrupt or the IN
opcode?  I don't remember which ones, but I don't think it's very
difficult.

-Chris
Remove "junkmail" in my return address to reply.

Re:Turning the screen off


Quote
>Subject: Re: Turning the screen off
>From: ck...@junkmailnetnitco.net (Chris Kern)
>Date: Sun, Oct 5, 1997 23:09 EDT
>Message-id: <619kfl$kb...@hyperion.nitco.com>

>"Simeon Miteff" <miteff*NOSPAM*@*SPAMNO*acenet.co.za> wrote:

>>You would have to use  the APM (advanced power management) facility of your
>>computer, As for as I know this is'nt easy to program from scrach.

>Isn't it just a simple matter of using either an interrupt or the IN
>opcode?  I don't remember which ones, but I don't think it's very
>difficult.

Would someone repost the code for that?  By the way, I doubt very much that you
 would use IN by itself, because that would just read stuff from the
 monitor/graphics card.

Re:Turning the screen off


Quote
CBongChan wrote:
> >"Simeon Miteff" <miteff*NOSPAM*@*SPAMNO*acenet.co.za> wrote:

> >>You would have to use  the APM (advanced power management) facility of your
> >>computer, As for as I know this is'nt easy to program from scrach.

> [...]

> Would someone repost the code for that?  By the way, I doubt very much that you
>  would use IN by itself, because that would just read stuff from the
>  monitor/graphics card.

AFAIK, no actual code was posted, but I did post some basic information
about using the VESA DPM functions.  Code?  I can do that.  Tested to
function properly.

---begin---VESA_DPM.PAS---begin---VESA_DPM.PAS---begin---
unit VESA_DPM;

{
 VESA_DPM.PAS -- v0.1

 VESA Display Power Management functions

 Written by Scott Earnest (set...@ix.netcom.com), Copyright 1997.

 Provides some simple functions for VESA VBE display power management.

 Things to do:
 -

Quote
}

interface

{These will be set by DPM_Available() function}
const
  DPM_Version : byte = 0;
  DPM_Capabilities : byte = 0;

{Constants for DPM capabilities}
const
  DPMC_STANDBY    = $01;
  DPMC_SUSPEND    = $02;
  DPMC_OFF        = $04;
  DPMC_REDUCED_ON = $08; {for flat screens}

{Constants for DPM modes}
const
  DPM_VIDEO_ON   = $00;
  DPM_STANDBY    = $01;
  DPM_SUSPEND    = $02;
  DPM_OFF        = $04;
  DPM_REDUCED_ON = $08; {for flat screens}
  DPM_MODE_ERROR = $ff; {for indicating mode error}

function DPM_Available : boolean;
function DPM_setstate (state : byte) : boolean;
function DPM_getstate : byte;

implementation

function DPM_Available : boolean; assembler;

asm
  mov   ax,4f10h
  mov   bl,00h
  xor   di,di
  mov   es,di
  int   10h
  cmp   al,4fh
  je    @DPM_OK
@No_DPM:
  xor   al,al
  jmp   @Done
@DPM_OK:
  mov   [DPM_Version],bh
  mov   [DPM_Capabilities],bl
  mov   al,01h
@Done:
end;

function DPM_setstate (state : byte) : boolean; assembler;

asm
  mov   ax,4f10h
  mov   bl,01h
  mov   bh,[state]
  int   10h
  or    ah,ah
  jz    @DPM_OK
@Bad_DPM:
  xor   al,al
  jmp   @Done
@DPM_OK:
  mov   al,01h
@Done:
end;

function DPM_getstate : byte; assembler;

asm
  mov   ax,4f10h
  mov   bl,02h
  int   10h
  or    ah,ah
  jz    @DPM_OK
@Bad_DPM:
  mov   al,DPM_MODE_ERROR
  jmp   @Done
@DPM_OK:
  mov   al,bh
@Done:
end;

end.
----end----VESA_DPM.PAS----end----VESA_DPM.PAS----end----

--
Scott Earnest        | We now return you to our regularly |
set...@ix.netcom.com | scheduled chaos and mayhem. . . .  |

Re:Turning the screen off


On 6 Oct 1997 20:38:34 GMT, cbongc...@aol.com (CBongChan) wrote:

Quote
>Would someone repost the code for.....

www.dejanews.com

is a great place for finding things that have ben discussed
previously.

Tom

--
http://www.arunet.co.uk/tkboyd/offers.htm
Freeware, shareware for IBM type pcs. Ideas for parents, teachers

Re:Turning the screen off


Quote
cbongc...@aol.com (CBongChan) wrote:
>Would someone repost the code for that?  By the way, I doubt very much that you
> would use IN by itself, because that would just read stuff from the
> monitor/graphics card.

I meant OUT :)

-Chris
Remove "junkmail" in my return address to reply.

Re:Turning the screen off


Quote
>Hi!
>I've tried to write a program that will turn the screen off (like
>windows). Unfortunately I can only make the screen go black. If there a
>way to turn the screen off so that its actually off.
> Andrey

This isn't the topic, I know, but anyway:

Where can i find units, docs and specs for modern PC technology (SB
WaveTable, APM, FlashRam, 24-bit color, ...)?
I've only got old units for programming devices from the 80's. ;)

Other Threads