| \ definitions needed for interpreter only |
\ definitions needed for interpreter only |
| |
|
| \ Copyright (C) 1995-2000 Free Software Foundation, Inc. |
\ Copyright (C) 1995-2000,2004 Free Software Foundation, Inc. |
| |
|
| \ This file is part of Gforth. |
\ This file is part of Gforth. |
| |
|
| dup 0= if |
dup 0= if |
| false exit |
false exit |
| endif |
endif |
| over c@ >r |
x@+/string 0 s" '" 2rot string-prefix? ; |
| 1 /string s" '" 2swap string-prefix? |
|
| r> 0 rot ; |
|
| |
|
| : s>unumber? ( addr u -- ud flag ) |
: s>unumber? ( addr u -- ud flag ) |
| over c@ '' = if |
over c@ '' = if |
| \ !! not used... |
\ !! not used... |
| [char] $ emit base @ swap hex u. base ! ; |
[char] $ emit base @ swap hex u. base ! ; |
| |
|
| : typewhite ( addr n -- ) \ gforth |
|
| \G Like type, but white space is printed instead of the characters. |
|
| \ bounds u+do |
|
| 0 max bounds ?do |
|
| i c@ #tab = if \ check for tab |
|
| #tab |
|
| else |
|
| bl |
|
| then |
|
| emit |
|
| loop ; |
|
| |
|
| : -trailing ( c_addr u1 -- c_addr u2 ) \ string dash-trailing |
: -trailing ( c_addr u1 -- c_addr u2 ) \ string dash-trailing |
| \G Adjust the string specified by @i{c-addr, u1} to remove all |
\G Adjust the string specified by @i{c-addr, u1} to remove all |
| \G trailing spaces. @i{u2} is the length of the modified string. |
\G trailing spaces. @i{u2} is the length of the modified string. |
| |
|
| : (bootmessage) |
: (bootmessage) |
| ." Gforth " version-string type |
." Gforth " version-string type |
| ." , Copyright (C) 1995-2003 Free Software Foundation, Inc." cr |
." , Copyright (C) 1995-2003,2004 Free Software Foundation, Inc." cr |
| ." Gforth comes with ABSOLUTELY NO WARRANTY; for details type `license'" |
." Gforth comes with ABSOLUTELY NO WARRANTY; for details type `license'" |
| [ has? os [IF] ] |
[ has? os [IF] ] |
| cr ." Type `bye' to exit" |
cr ." Type `bye' to exit" |
| [ has? file [IF] ] |
[ has? file [IF] ] |
| os-cold |
os-cold |
| [ [THEN] ] |
[ [THEN] ] |
| |
set-encoding-fixed-width |
| 'cold |
'cold |
| init8 chainperform |
init8 chainperform |
| [ has? file [IF] ] |
[ has? file [IF] ] |