]> rethought.computer Git - sorel-lang.git/commitdiff
remove unused examples
authorBryan English <bryan@rethought.computer>
Fri, 10 Apr 2026 20:58:36 +0000 (16:58 -0400)
committerBryan English <bryan@rethought.computer>
Fri, 10 Apr 2026 20:58:45 +0000 (16:58 -0400)
examples/alloc.sorel [deleted file]
examples/fib.sorel [deleted file]
examples/full-fib/compile.sh [deleted file]
examples/full-fib/fib.rel [deleted file]
examples/full-fib/putn.c [deleted file]
examples/put2.sorel [deleted file]
examples/syscalls.sorel [deleted file]

diff --git a/examples/alloc.sorel b/examples/alloc.sorel
deleted file mode 100644 (file)
index ab014eb..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-\ vim: filetype=forth
-
-: mmap 9 sys6 ;
-
-: PROT_READ 1 ;
-: PROT_WRITE 2 ;
-: MAP_PRIVATE 2 ;
-: MAP_ANONYMOUS 32 ;
-
-: ALLOC_PROT PROT_READ PROT_WRITE | ;
-: ALLOC_MAP MAP_PRIVATE MAP_ANONYMOUS | ;
-
-: alloc 0 swap ALLOC_PROT ALLOC_MAP -1:i16 0 mmap ;
-
-1024 alloc
-putn
-swap
-putn
diff --git a/examples/fib.sorel b/examples/fib.sorel
deleted file mode 100644 (file)
index ef22ee9..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-\ vim: filetype=forth
-
-import "./put2.rel"
-
-: fib 
-    dup 1 > if
-        dup 1 - fib
-        swap 2 - fib
-        +
-    endif
-;
-
-0 fib putn
-1 fib putn
-2 fib putn
-3 fib putn
-4 fib putn
-5 fib putn
-6 fib putn
-7 fib putn
-8 fib putn
-9 fib putn
-10 fib putn
-
-5 fib 6 fib put2
diff --git a/examples/full-fib/compile.sh b/examples/full-fib/compile.sh
deleted file mode 100644 (file)
index 6ef003e..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-../target/debug/sorelc fib.sorel
-riscv64-unknown-linux-gnu-as -o fib.o fib.asm
-riscv64-unknown-linux-gnu-cc -O1 -no-pie -o test.out fib.o putn.c -nostartfiles 
-./test.out
diff --git a/examples/full-fib/fib.rel b/examples/full-fib/fib.rel
deleted file mode 100644 (file)
index 2407f15..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-\ foo bar
-: fib
-    dup
-    1
-    >
-    if
-        dup
-        1 - fib
-        swap
-        2
-        -
-        fib
-        +
-    endif
-;
-
-0 fib putn drop
-1 fib putn drop
-2 fib putn drop
-3 fib putn drop
-4 fib putn drop
-5 fib putn drop
-6 fib putn drop
-7 fib putn drop
diff --git a/examples/full-fib/putn.c b/examples/full-fib/putn.c
deleted file mode 100644 (file)
index 201050c..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-#include <stdio.h>
-
-extern unsigned long data_stack_end;
-register unsigned long * stack_pointer asm("s2");
-
-void putn() {
-  unsigned long * stack_index = &data_stack_end;
-  printf("stack: ");
-  while (stack_index != stack_pointer) {
-         printf("%ld ", *stack_index);
-    stack_index -= 1;
-  }
-       printf("%ld\n", *stack_pointer);
-}
-
-
diff --git a/examples/put2.sorel b/examples/put2.sorel
deleted file mode 100644 (file)
index 4f756c2..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-\ vim: filetype=forth
-
-: put2 putn putn ; 
-
-: foobar dup dup ;
-
-export put2
diff --git a/examples/syscalls.sorel b/examples/syscalls.sorel
deleted file mode 100644 (file)
index 9d7b88c..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-\ vim: filetype=forth
-
-: getpid
-  39 sys0
-  drop
-;
-
-getpid putn