Howdy, Stranger!

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

Categories

Turning off the power?

SorrowSorrow Member Posts: 20
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 Member Posts: 35
    : 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 Member Posts: 7
    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 Member Posts: 105
    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 Member Posts: 7
    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 Member Posts: 20
    Thank you very much,
    Sorrow.

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