mirror of
https://github.com/nineties/planckforth
synced 2024-12-25 21:58:22 +01:00
Update README and example
This commit is contained in:
parent
56cf2ede18
commit
c3471ede08
2 changed files with 7 additions and 11 deletions
16
README.md
16
README.md
|
@ -29,24 +29,20 @@ kHtketkltkltkotk tkWtkotkrtkltkdtk!tk:k0-tQ
|
|||
After bootstrapping by `bootstrap.fs`, it looks like this.
|
||||
|
||||
```
|
||||
$ ./planck < bootstrap.fs --i386-linux
|
||||
$ ./planck < bootstrap.fs
|
||||
PlanckForth (implementation: hand-written i386-linux)
|
||||
Ready.
|
||||
." Hello World!" cr
|
||||
```
|
||||
|
||||
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.
|
||||
`bootstrap.fs` can also takes a file as an input program like this.
|
||||
|
||||
```
|
||||
$ cat example/fib.fs
|
||||
: fib dup 2 < unless 1- dup recurse swap 1- recurse + then ;
|
||||
38 fib . cr
|
||||
$ ./planck < bootstrap.fs --i386-linux example/fib.fs
|
||||
39088169
|
||||
20 fib . cr
|
||||
$ ./planck < bootstrap.fs example/fib.fs
|
||||
6765
|
||||
```
|
||||
|
||||
# Builtin Words
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
: fib dup 2 < unless 1- dup recurse swap 1- recurse + then ;
|
||||
10 fib . cr
|
||||
20 fib . cr
|
||||
|
|
Loading…
Reference in a new issue