source: trunk/bootcode/special/apm.asm@ 83

Last change on this file since 83 was 83, checked in by Ben Rietbroek, 8 years ago

Show shutdown message (debugging) [v1.1.1-testing]

CAUTION:
This is a testbuild !
AirBoot uses the BIOS to access disks and a small coding error can trash
partition tables or other vital disk structures. You are advised to make
backups of TRACK0 and EBRs before using this testbuild. More info at:
https://rousseaux.github.io/netlabs.air-boot/pdf/AirBoot-v1.1.0-manual.pdf

File size: 1.7 KB
Line 
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;
18;---------------------------------------------------------------------------
19; AiR-BOOT / APM SUPPORT
20;---------------------------------------------------------------------------
21
22IFDEF MODULE_NAMES
23DB 'APM',0
24ENDIF
25
26; Here is APM Code to turn off the computer
27; Does not work on all BIOSes
28; http://stackoverflow.com/questions/678458/shutdown-the-computer-using-assembly
29
30APM_TurnOffComputer Proc Near Uses ax bx cx
31
32IFDEF AUX_DEBUG
33 pusha
34 mov si, offset $+5
35 jmp @F
36 db 10,'>> System Shutdown <<',10,0
37@@: call AuxIO_Print
38 popa
39ENDIF
40
41 mov ax, 5301h
42 xor bx, bx
43 int 15h
44 mov ax, 530Eh
45 xor bx, bx
46 mov cx, 102h
47 int 15h
48 mov ax, 5307h
49 mov bx, 1
50 mov cx, 3
51 int 15h
52 ret ; We should never return here <g>
53APM_TurnOffComputer EndP
Note: See TracBrowser for help on using the repository browser.