Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID

Categories

We have migrated to a new platform! Please note that you will need to reset your password to log in (your credentials are still in-tact though). Please contact lee@programmersheaven.com if you have questions.
Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Turning off the power?

SorrowSorrow Posts: 20Member
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.

Comments

  • AessaAessa Posts: 35Member
    : 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>>>>


  • BlackWolfBlackWolf Posts: 7Member
    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;

  • JaywalkJaywalk Posts: 105Member
    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;
    :


  • BlackWolfBlackWolf Posts: 7Member
    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;
    : :
    :
    :


  • SorrowSorrow Posts: 20Member
    Thank you very much,
    Sorrow.

  • JaywalkJaywalk Posts: 105Member
    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?

Sign In or Register to comment.