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 8\ * 9\ * Contributors: 10\ * IBM Corporation - initial implementation 11\ ****************************************************************************/ 12create debugstr 255 allot 130 VALUE debuglen 14\ tbl@ d# 1000 * 196e6aa / VALUE TIME1 15\ 0 VALUE TIME2 16 17\ Usage: 42 cp 18: cp ( checkpoint -- ) 19 \ cr depth 2 0.r s" : " type .s cr \ DEBUG 20 \ cr ." time: " tbl@ d# 1000 * 196e6aa / dup TIME1 - dup . cr TIME2 + TO TIME2 TO TIME1 21 bootmsg-cp ; 22 23: (warning) ( id level ptr len -- ) 24 dup TO debuglen 25 debugstr swap move \ copy into buffer 26 0 debuglen debugstr + c! \ terminate '\0' 27 debugstr bootmsg-warning 28; 29 30\ Usage: 42 0 warning" warning-txt" 31: warning" ( id level [text<">] -- ) 32 postpone s" state @ 33 IF 34 ['] (warning) compile, 35 ELSE 36 (warning) 37 THEN 38; immediate 39 40: (debug-cp) ( id level ptr len -- ) 41 dup TO debuglen 42 debugstr swap move \ copy into buffer 43 0 debuglen debugstr + c! \ terminate '\0' 44 debugstr bootmsg-debugcp 45; 46 47\ Usage: 42 0 debug-cp" debug-cp-txt" 48: debug-cp" ( id level [text<">] -- ) 49 postpone s" state @ 50 IF 51 ['] (debug-cp) compile, 52 ELSE 53 (debug-cp) 54 THEN 55; immediate 56 57: (error) ( id ptr len -- ) 58 dup TO debuglen 59 debugstr swap move \ copy into buffer 60 0 debuglen debugstr + c! \ terminate '\0' 61 debugstr bootmsg-error 62; 63 64\ Usage: 42 error" error-txt" 65: error" ( id level [text<">] -- ) 66 postpone s" state @ 67 IF 68 ['] (error) compile, 69 ELSE 70 (error) 71 THEN 72; immediate 73 74bootmsg-nvupdate 75