diff --git a/README.md b/README.md index 45b8b3a..e8246b1 100644 --- a/README.md +++ b/README.md @@ -29,17 +29,24 @@ kHtketkltkltkotk tkWtkotkrtkltkdtk!tk:k0-tQ After bootstrapping by `bootstrap.fs`, it looks like this. ``` -$ cat bootstrap.fs - | ./planck +$ ./planck < bootstrap.fs --i386-linux +Ready. ." Hello World!" cr ``` -Other examples. +The option `--i386-linux` is to specify OS and hardware for dynamic +code generation by `bootstrap.fs`. +It is not necessay in case of implementations by other languages. + + +`bootstrap.fs` also takes a file as an input like this. ``` -$ cat bootstrap.fs - | ./planck -123 456 + . cr +$ cat example/fib.fs : fib dup 2 < unless 1- dup recurse swap 1- recurse + then ; -30 fib . cr +38 fib . cr +$ ./planck < bootstrap.fs --i386-linux example/fib.fs +39088169 ``` # Builtin Words diff --git a/example/fib.fs b/example/fib.fs new file mode 100644 index 0000000..ab85e47 --- /dev/null +++ b/example/fib.fs @@ -0,0 +1,2 @@ +: fib dup 2 < unless 1- dup recurse swap 1- recurse + then ; +38 fib . cr diff --git a/helloworld.fs b/example/helloworld.fs similarity index 100% rename from helloworld.fs rename to example/helloworld.fs