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 \ ****************************************************************************/
12 create debugstr 255 allot
14 \ tbl@ d# 1000 * 196e6aa / VALUE TIME1
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
23 : (warning) ( id level ptr len -- )
25 debugstr swap move \ copy into buffer
26 0 debuglen debugstr + c! \ terminate '\0'
27 debugstr bootmsg-warning
30 \ Usage: 42 0 warning" warning-txt"
31 : warning" ( id level [text<">] -- )
34 ['] (warning) compile,
40 : (debug-cp) ( id level ptr len -- )
42 debugstr swap move \ copy into buffer
43 0 debuglen debugstr + c! \ terminate '\0'
44 debugstr bootmsg-debugcp
47 \ Usage: 42 0 debug-cp" debug-cp-txt"
48 : debug-cp" ( id level [text<">] -- )
51 ['] (debug-cp) compile,
57 : (error) ( id ptr len -- )
59 debugstr swap move \ copy into buffer
60 0 debuglen debugstr + c! \ terminate '\0'
61 debugstr bootmsg-error
64 \ Usage: 42 error" error-txt"
65 : error" ( id level [text<">] -- )