Home | History | Annotate | Line # | Download | only in !BtNetBSD
      1 REM >testboot
      2 REM $NetBSD: TestBoot,v 1.1.1.1 2002/05/09 20:03:57 jdolecek Exp $
      3 REM
      4 REM Copyright (c) 1995 Mark Brinicombe
      5 REM All rights reserved
      6 REM
      7 REM Redistribution and use in source and binary forms, with or without
      8 REM modification, are permitted provided that the following conditions
      9 REM are met:
     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.
     21 REM
     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
     32 REM DAMAGE.
     33 REM
     34 REM NetBSD kernel project
     35 REM
     36 REM testboot
     37 REM
     38 REM Sets the FastBoot flag as required
     39 REM
     40 REM Created      : 12/05/95
     41 REM Last updated : 03/09/95
     42 REM
     43 
     44 *Set NetBSD$FastBoot 0
     45 
     46 REM Test for either ALT keys
     47 
     48 IF (INKEY(-3) <> 0) THEN
     49   alt% = TRUE
     50   *Set NetBSD$FastBoot 1
     51 ELSE
     52   alt% = FALSE
     53 ENDIF
     54 
     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.
     59 
     60 SYS "OS_Byte", 161, 80 TO ,,value%
     61 
     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
     65 
     66 IF (value% AND &01) THEN
     67   *Set NetBSD$FastBoot 2
     68 ENDIF
     69 
     70 REM Did the kernel request a automatic reboot ?
     71 
     72 IF (value% AND &02) THEN
     73   *Set NetBSD$FastBoot 3
     74  
     75   REM Clear the automatic reboot flag
     76  
     77   SYS "OS_Byte", 162, 80, value% AND &fd
     78 ENDIF
     79 
     80 REM If the CMOS bits dictate a reboot then allow ALT to override.
     81 IF (value% AND &03) THEN
     82   IF (alt% = TRUE) THEN
     83     *Set NetBSD$FastBoot 0
     84   ENDIF
     85 ENDIF
     86 
     87 
     88 REM Test for CTRL key - This does a fastconf and will override a reboot
     89 
     90 IF (INKEY(-2) <> 0) THEN
     91   *Set NetBSD$FastBoot 4
     92 ENDIF
     93 
     94 ON ERROR END
     95 
     96 *If <NetBSD$FastBoot> > 0 then RMLoad <BtNetBSD$Dir>.Banner
     97