]> git.saurik.com Git - apple/system_cmds.git/blob - nvram.tproj/nvram/Alchemy
system_cmds-258.tar.gz
[apple/system_cmds.git] / nvram.tproj / nvram / Alchemy
1 ##
2 # Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
3 #
4 # @APPLE_LICENSE_HEADER_START@
5 #
6 # "Portions Copyright (c) 1999 Apple Computer, Inc. All Rights
7 # Reserved. This file contains Original Code and/or Modifications of
8 # Original Code as defined in and that are subject to the Apple Public
9 # Source License Version 1.0 (the 'License'). You may not use this file
10 # except in compliance with the License. Please obtain a copy of the
11 # License at http://www.apple.com/publicsource and read it before using
12 # this file.
13 #
14 # The Original Code and all software distributed under the License are
15 # distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
16 # EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
17 # INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
18 # FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
19 # License for the specific language governing rights and limitations
20 # under the License."
21 #
22 # @APPLE_LICENSE_HEADER_END@
23 ##
24 # Version: 1.2.0 Date: 8-17-2000
25 use-nvramrc? true
26 load-base 600000
27 diag-device
28 nvramrc hex\
29 : $D find-device ;\
30 : $E device-end ;\
31 : $L BLpatch ; : $R BRpatch ;\
32 : $X execute ;\
33 : $p 0 to my-self property ;\
34 : $a " /chosen" $D $p $E ;\
35 10 buffer: km\
36 dev kbd\
37 get-key-map km swap move\
38 $E\
39 : ck 0 do swap dup 3 >> km + c@ 1 rot 7 and << and or loop ;\
40 : bootr 0d word count encode-string " machargs" $a\
41 0 0 1 ck if 0 and else dup 1 = if 3d 0 1 else f 3d 0 2 then ck if 40 or then then\
42 40 and if bye else 1e 0 do ['] boot catch drop 1f4 ms loop then bye ;\
43 : myboot boot-command eval ;\
44 dev /packages/mac-parts\
45 : $M -7E9408 $X 8000 alloc-mem 7F00 + 4 -7E9408 $X ;\
46 ' load 268 - ' $M $L\
47 ' load 168 + ' 0 $L\
48 $E\
49 dev ata\
50 d encode-int 2 encode-int encode+ " AAPL,interrupts" $p\
51 $E\
52 dev scsi\
53 : $M ['] open 888 - + ;\
54 : $M1 -E48 $M $X ;\
55 : $M2 begin 1 ms $M1 1 and -1068 $M $X or until $M1 case 0 of -1 endof 1 of 1 -E08 $M $X false endof dup endcase ;\
56 : $M3 -F68 $M f over $X $X ;\
57 : $M4 1 ms ;\
58 2C $M ' 2 $L\
59 -A18 $M ' $M2 $R\
60 -788 $M ' $M3 $L\
61 -768 $M ' $M4 $L\
62 -764 $M ' 1 $L\
63 $E\
64 unselect-dev