Pascal

Moderators: None (Apply to moderate this forum)
Number of threads: 4095
Number of posts: 14004

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Turning off the power? Posted by Sorrow on 13 Jul 2001 at 3:24 AM
Hi there.

Just one simple question: is there any way to turn off the power in those new computers? I know that you can select "Shut down" and they turn off automaticly. How to do this, but not in Windows, but in DOS (Pascal, C or asm).

Thanks,

Sorrow.

Report
Re: Turning off the power? Posted by Aessa on 8 Sept 2001 at 10:52 AM
: Hi there.
:
: Just one simple question: is there any way to turn off the power in those new computers? I know that you can select "Shut down" and they turn off automaticly. How to do this, but not in Windows, but in DOS (Pascal, C or asm).
:
: Thanks,
:
: Sorrow.
:

I want to know 2. maybe there is a asm routine for the new BOISs somewhere. If you have any good sites>>>>


Report
Re: Turning off the power? Posted by BlackWolf on 27 Sept 2001 at 4:03 AM
INT 15,42 - Request System Power Off (convertible only)

AH = 42h
AL = 00 to use system profile
= 01 to force suspend regardless of profile



Try this:

..
..
asm
mov ah, $42
mov al, 1
int $15
end;

Report
Re: Turning off the power? Posted by Jaywalk on 27 Sept 2001 at 10:09 PM
Lovely. But what exactly will happen if you set AL=0?
: INT 15,42 - Request System Power Off (convertible only)
:
: AH = 42h
: AL = 00 to use system profile
: = 01 to force suspend regardless of profile
:
:
:
: Try this:
:
: ..
: ..
: asm
: mov ah, $42
: mov al, 1
: int $15
: end;
:


Report
Re: Turning off the power? Posted by BlackWolf on 28 Sept 2001 at 12:17 AM
I think it uses the current profile, that you can set via bios (sleep, instant power off etc..). If you use AL=01 the machine turn off directly.

Sorry for my bad english...


: Lovely. But what exactly will happen if you set AL=0?
: : INT 15,42 - Request System Power Off (convertible only)
: :
: : AH = 42h
: : AL = 00 to use system profile
: : = 01 to force suspend regardless of profile
: :
: :
: :
: : Try this:
: :
: : ..
: : ..
: : asm
: : mov ah, $42
: : mov al, 1
: : int $15
: : end;
: :
:
:


Report
Thank you Posted by Sorrow on 28 Sept 2001 at 3:31 AM
Thank you very much,
Sorrow.

Report
Re: Turning off the power? Posted by Jaywalk on 1 Oct 2001 at 9:59 AM
I have a computer for which this works. Since it can be turned of by software, and pressing the power button does not necessarily turn the computer off, I can assume that there is an IRQ attached to the power button, and an interrupt vector to that IRQ. Anyone know what the IRQ and interrupt vector are?




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.