1 \ *****************************************************************************
2 \ * Copyright (c) 2004, 2008 IBM Corporation
3 \ * All rights reserved.
4 \ * This program and the accompanying materials
5 \ * are made available under the terms of the BSD License
6 \ * which accompanies this distribution, and is available at
7 \ * http://www.opensource.org/licenses/bsd-license.php
10 \ * IBM Corporation - initial implementation
11 \ ****************************************************************************/
13 \ Words to write to nvram log
15 defer nvramlog-write-byte
17 : .nvramlog-write-byte ( byte -- )
18 #if defined(DISABLE_NVRAM) || defined(RTAS_NVRAM)
25 ' .nvramlog-write-byte to nvramlog-write-byte
27 : nvramlog-write-string ( str len -- )
30 nvramlog-write-byte char+ LOOP
35 : nvramlog-write-number ( number format -- )
36 0 swap <# 0 ?DO # LOOP #>
37 nvramlog-write-string ;
39 : nvramlog-write-string-cr ( str len -- )
41 a nvramlog-write-byte d nvramlog-write-byte ;
43 \ as long as dual-emit is enabled
44 \ the string is written into NVRAM as well!!
45 : log-string ( str len -- ) type ;