home *** CD-ROM | disk | FTP | other *** search
/ H4CK3R 4 / hacker04 / 04_HACK04.ISO / darwin / darwinx86.iso / usr / share / nvram / PowerSurge < prev    next >
Encoding:
Text File  |  2000-12-14  |  2.9 KB  |  104 lines

  1. ##
  2. # Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
  3. #
  4. # @APPLE_LICENSE_HEADER_START@
  5. # "Portions Copyright (c) 1999 Apple Computer, Inc.  All Rights
  6. # Reserved.  This file contains Original Code and/or Modifications of
  7. # Original Code as defined in and that are subject to the Apple Public
  8. # Source License Version 1.0 (the 'License').  You may not use this file
  9. # except in compliance with the License.  Please obtain a copy of the
  10. # License at http://www.apple.com/publicsource and read it before using
  11. # this file.
  12. # The Original Code and all software distributed under the License are
  13. # distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  14. # EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  15. # INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  16. # FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
  17. # License for the specific language governing rights and limitations
  18. # under the License."
  19. # @APPLE_LICENSE_HEADER_END@
  20. ##
  21. # Version: 1.2.0  Date: 8-17-2000
  22. use-nvramrc? true
  23. load-base 600000
  24. diag-device 
  25. nvramrc hex\
  26. : $C $call-method ;\
  27. : $D find-device ;\
  28. : $E device-end ;\
  29. : $x execute ;\
  30. : $F $D " open" $find drop ;\
  31. : $p 0 to my-self property ;\
  32. : $a " /chosen" $D $p $E ;\
  33. : R BRpatch ; : L BLpatch ;\
  34. : q over + ;\
  35. : g code! ;\
  36. : & get-token drop ;\
  37. 6ED & $x\
  38. 0 value mi\
  39. : mmr " map-range" mi if my-self $C else $call-parent then ;\
  40. 89B & ' mmr R\
  41. : mcm -1 to mi $C 0 to mi ;\
  42. 8CB & 1E na+ ' mcm L\
  43. : maa -1 to mi 1D swap ;\
  44. 8C9 & 5 na+ ' maa L\
  45. 8C9 & 134 + ' 1 L\
  46. 8CD & 184 + 14 q dup @ 6 << 6 >>a -4 and + R\
  47. 8C6 & 7C + ' u< L\
  48. 0 value yn\
  49. : y yn 0= if dup @ to yn then ;\
  50. 8CB & ' y R\
  51. ' y 28 + 8CB & 8 + R\
  52. : z yn ?dup if over ! 0 to yn then ;\
  53. 8CC & ' z R\
  54. ' z 2C + 8CC & 8 + R\
  55. @startvec BC + @ 40820014 over 88 + g 41820010 swap E0 + g\
  56. 0 @startvec 5C + @ 1D8 + g\
  57. dev /packages/mac-parts\
  58. 400000 ' load 14 + g\
  59. : m1 400000 do-unmap ;\
  60. ' load 8 + ' m1 L\
  61. ' load 160 + ' 0 L\
  62. : &r1 4+ dup 8000 alloc-mem 7F00 + swap ! 4+ F8 ;\
  63. ' load 2AC - ' &r1 L\
  64. $E\
  65. 4180FFF0 ' msr! 44 + g\
  66. dev /packages/xcoff-loader\
  67. : p&+ ['] open 600 - + ;\
  68. : p1 { _a _s } _a -1000 and _a _s + over - FFF ;\
  69. 60000000 dup 8 p&+ g C p&+ g\
  70. 18 p&+ ' p1 L\
  71. $E\
  72. " enet" $F dup\
  73. 1D8 - 24 q ['] or L $x\
  74. 248 - @ 6 encode-bytes 2dup\
  75. " local-mac-address" $p\
  76. $E\
  77. " mac-address" $a\
  78. 10 buffer: km\
  79. dev kbd\
  80. get-key-map km swap move\
  81. $E\
  82. : ck 0 do swap dup 3 >> km + c@ 1 rot 7 and << and or loop ;\
  83. : bootr 0d word count encode-string " machargs" $a\
  84. 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\
  85. 40 and if bye else 1e 0 do ['] boot catch drop 1f4 ms loop then bye ;\
  86. : &SI\
  87. " scsi-int" open-dev\
  88. " open" 2 pick 4+ @ find-method drop\
  89. 2c q ['] 2 L 848 -\
  90. 8 q 1C q R\
  91. 88 q 4 q R\
  92. $x " close" rot $C ;\
  93. &SI\
  94. dev /packages/obp-tftp\
  95. : O ['] open + ;\
  96. : M dup 24 - -18E0 O $X 6 move 14 + ;\
  97. 684 O ['] drop L\
  98. -63C O ' M L\
  99. $E\
  100. unselect-dev
  101.