linux-8086.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: "Marc-François LUCCA-DANIAU" <mfld.fr@gmail.com>
Cc: ELKS <Linux-8086@vger.kernel.org>
Subject: Re: New feature: a "poweroff" command
Date: Thu, 26 May 2016 13:21:45 +0100	[thread overview]
Message-ID: <20160526132145.2a246c68@www.etchedpixels.co.uk> (raw)
In-Reply-To: <CACpuWU=_fpXOhhGJWWJTr19UAnVTQMT-e80z3Thap2KOc+aKAw@mail.gmail.com>

> This is why, in such situation, if Jody's adds invocation of the BIOS
> 15h in ELKS, it should be surrounded by a configuration option,
> otherwise I would have to add an INT 15h handler in the Flash to
> return CF=1.

That ought to be the behaviour of any even ancient PC class system when
given an INT15 it doesn't know. The APM specification also has some
fairly robust checks to cope with cases it doesn't.

You call the interrupt with

AH = 53 AL = 0
BX = 0

and it's only assumed present if the return is

Carry clear
AH  > 0
BH = 'P'
BL = 'M'

so should never be fooled

INT15 returning carry set should also be very safe even on ancient DOS
systems as the INT15 multiplexor is used by DOS itself from at least DOS
3.0 and other OS expect INT 15 0x80 and friends going back to PC/XT.

Alan


      parent reply	other threads:[~2016-05-26 12:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-26  1:51 New feature: a "poweroff" command Jody Bruchon
     [not found] ` <CACpuWUkhdKqRvae7NiY9rDTMzpnv_Qxaftp3FpPcBEDsfppWLw@mail.gmail.com>
2016-05-26  9:31   ` Fwd: " Marc-François LUCCA-DANIAU
     [not found]     ` <CAMKR1yvd_Ce+ARQbt1yQbZbLjBp039c=b1KH-C6_8GP8TzQRHg@mail.gmail.com>
     [not found]       ` <CACpuWU=KnPFMTo5QR9c+WYVsKuziVOpNtqY+ae99h2tt=iP_uQ@mail.gmail.com>
2016-05-26 12:02         ` Fwd: " Marc-François LUCCA-DANIAU
2016-05-26 12:12           ` Jody Bruchon
2016-05-26 12:21           ` Alan Cox [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160526132145.2a246c68@www.etchedpixels.co.uk \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=Linux-8086@vger.kernel.org \
    --cc=mfld.fr@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).