From 92356901a3b9303792889f87fa600a48da749242 Mon Sep 17 00:00:00 2001 From: Koichi Nakamura Date: Sat, 2 Jan 2021 13:01:31 +0900 Subject: [PATCH] Update README --- README.md | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index cb83cf2..ad27747 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,37 @@ # PlanckForth: Bootstrapping Forth from Handwritten Executable +This project aims to create a Forth interpreter +by bootstrapping from hand-written tiny ELF binary. + +## How to build + +You can create a binary for x86 linux environment by following steps. +Only `xxd` is needed to build PlanckForth. + ``` $ git clone https://github.com/nineties/planckforth.git $ cd planckforth $ make -$ cat helloworld.fs | ./planck +xxd -r -c 8 planck.xxd > planck +chmod +x planck +``` + +## Hello World + +The hello world program at the beginning looks like this. + +``` +% ./planck +kHtketkltkltkotk tkWtkotkrtkltkdtk!tk:k0-tQ +Hello World! +``` +After bootstrapping by `bootstrapping.fs`, it looks like this. + +``` +$ cat bootstrap.fs - | ./planck +." Hello World!" cr +Hello World! +bye ``` # Builtin Words