aboutsummaryrefslogtreecommitdiff
path: root/j1/toolchain/strings.fs
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2019-10-30 20:04:56 +0100
committerDimitri Sokolyuk <demon@dim13.org>2019-10-30 20:04:56 +0100
commita76977af62010a392c16010c367185e61e856ffe (patch)
tree56cf4177d5bc0e3ead781d1c60818c13b1df0f3c /j1/toolchain/strings.fs
parentc0165d167d7cb40d80028bcf7a4a6b160b5a7e83 (diff)
mv to docs
Diffstat (limited to 'j1/toolchain/strings.fs')
-rw-r--r--j1/toolchain/strings.fs25
1 files changed, 0 insertions, 25 deletions
diff --git a/j1/toolchain/strings.fs b/j1/toolchain/strings.fs
deleted file mode 100644
index cbd9b0e..0000000
--- a/j1/toolchain/strings.fs
+++ /dev/null
@@ -1,25 +0,0 @@
-( Strings JCB 11:57 05/18/12)
-
-: >str ( c-addr u -- str ) \ a new u char string from c-addr
- dup cell+ allocate throw dup >r
- 2dup ! cell+ \ write size into first cell
- ( c-addr u saddr )
- swap cmove r>
-;
-: str@ dup cell+ swap @ ;
-: str! ( str c-addr -- c-addr' ) \ copy str to c-addr
- >r str@ r>
- 2dup + >r swap
- cmove r>
-;
-: +str ( str2 str1 -- str3 )
- over @ over @ + cell+ allocate throw >r
- over @ over @ + r@ !
- r@ cell+ str! str! drop r>
-;
-
-: example
- s" sailor" >str
- s" hello" >str
- +str str@ type
-;