Rev | Line | |
---|
[29] | 1 | ; AiR-BOOT (c) Copyright 1998-2008 M. Kiewitz
|
---|
| 2 | ;
|
---|
| 3 | ; This file is part of AiR-BOOT
|
---|
| 4 | ;
|
---|
| 5 | ; AiR-BOOT is free software: you can redistribute it and/or modify it under
|
---|
| 6 | ; the terms of the GNU General Public License as published by the Free
|
---|
| 7 | ; Software Foundation, either version 3 of the License, or (at your option)
|
---|
| 8 | ; any later version.
|
---|
| 9 | ;
|
---|
| 10 | ; AiR-BOOT is distributed in the hope that it will be useful, but WITHOUT ANY
|
---|
| 11 | ; WARRANTY: without even the implied warranty of MERCHANTABILITY or FITNESS
|
---|
| 12 | ; FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
---|
| 13 | ; details.
|
---|
| 14 | ;
|
---|
| 15 | ; You should have received a copy of the GNU General Public License along with
|
---|
| 16 | ; AiR-BOOT. If not, see <http://www.gnu.org/licenses/>.
|
---|
| 17 | ;
|
---|
[8] | 18 | ;---------------------------------------------------------------------------
|
---|
| 19 | ; AiR-BOOT / APM SUPPORT
|
---|
| 20 | ;---------------------------------------------------------------------------
|
---|
| 21 |
|
---|
[51] | 22 | IFDEF MODULE_NAMES
|
---|
[30] | 23 | DB 'APM',0
|
---|
| 24 | ENDIF
|
---|
| 25 |
|
---|
[8] | 26 | ; Here is APM Code to turn off the computer
|
---|
[65] | 27 | ; Does not work on all BIOSes
|
---|
| 28 | ; http://stackoverflow.com/questions/678458/shutdown-the-computer-using-assembly
|
---|
[8] | 29 |
|
---|
| 30 | APM_TurnOffComputer Proc Near Uses ax bx cx
|
---|
[83] | 31 |
|
---|
| 32 | IFDEF AUX_DEBUG
|
---|
[117] | 33 | IF 1
|
---|
[123] | 34 | DBG_TEXT_OUT_AUX '>> System Shutdown <<'
|
---|
[117] | 35 | ENDIF
|
---|
[83] | 36 | ENDIF
|
---|
| 37 |
|
---|
[8] | 38 | mov ax, 5301h
|
---|
| 39 | xor bx, bx
|
---|
| 40 | int 15h
|
---|
| 41 | mov ax, 530Eh
|
---|
| 42 | xor bx, bx
|
---|
| 43 | mov cx, 102h
|
---|
| 44 | int 15h
|
---|
| 45 | mov ax, 5307h
|
---|
| 46 | mov bx, 1
|
---|
| 47 | mov cx, 3
|
---|
| 48 | int 15h
|
---|
| 49 | ret ; We should never return here <g>
|
---|
| 50 | APM_TurnOffComputer EndP
|
---|
Note:
See
TracBrowser
for help on using the repository browser.