2 REM $NetBSD: TestBoot,v 1.2 2002/02/11 19:02:37 reinoud Exp $
4 REM Copyright (c) 1995 Mark Brinicombe
5 REM All rights reserved
7 REM Redistribution and use in source and binary forms, with or without
8 REM modification, are permitted provided that the following conditions
10 REM 1. Redistributions of source code must retain the above copyright
11 REM notice, this list of conditions and the following disclaimer.
12 REM 2. Redistributions in binary form must reproduce the above copyright
13 REM notice, this list of conditions and the following disclaimer in the
14 REM documentation and/or other materials provided with the distribution.
15 REM 3. All advertising materials mentioning features or use of this software
16 REM must display the following acknowledgement:
17 REM This product includes software developed by Mark Brinicombe.
18 REM 4. The name of the company nor the name of the author may be used to
19 REM endorse or promote products derived from this software without specific
20 REM prior written permission.
22 REM THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
23 REM IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
24 REM OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
25 REM IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
26 REM INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27 REM BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
28 REM OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
29 REM ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
30 REM OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
31 REM THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
34 REM NetBSD kernel project
38 REM Sets the FastBoot flag as required
40 REM Created : 12/05/95
41 REM Last updated : 03/09/95
44 *Set NetBSD$FastBoot 0
46 REM Test for either ALT keys
48 IF (INKEY(-3) <> 0) THEN
50 *Set NetBSD$FastBoot 1
55 REM Get byte 80 from the CMOS RAM. This is a RiscIX byte that we are using.
56 REM bits are as follows :
57 REM bit 0 - configure bootNetBSD
58 REM bit 1 - automatic reboot required.
60 SYS "OS_Byte", 161, 80 TO ,,value%
62 REM Has the user configured a NetBSD boot ?
63 REM If a NetBSD boot has been configured ALT can be used to
64 REM select a RISC OS boot
66 IF (value% AND &01) THEN
67 *Set NetBSD$FastBoot 2
70 REM Did the kernel request a automatic reboot ?
72 IF (value% AND &02) THEN
73 *Set NetBSD$FastBoot 3
75 REM Clear the automatic reboot flag
77 SYS "OS_Byte", 162, 80, value% AND &fd
80 REM If the CMOS bits dictate a reboot then allow ALT to override.
81 IF (value% AND &03) THEN
83 *Set NetBSD$FastBoot 0
88 REM Test for CTRL key - This does a fastconf and will override a reboot
90 IF (INKEY(-2) <> 0) THEN
91 *Set NetBSD$FastBoot 4
96 *If <NetBSD$FastBoot> > 0 then RMLoad <BtNetBSD$Dir>.Banner