From ecc350ca5c2eb50be8309c5f14f8bf0d87db9a02 Mon Sep 17 00:00:00 2001 From: Moon Flower Date: Mon, 12 Oct 2026 08:46:23 +0330 Subject: a --- docs/history/07-zygote/code/examples/asmain.s | 9 +++++++++ docs/history/07-zygote/code/examples/echo.s | 1 + docs/history/07-zygote/code/examples/fact.s | 3 +++ docs/history/07-zygote/code/examples/hello.s | 2 ++ docs/history/07-zygote/code/examples/sm.s | 3 +++ 5 files changed, 18 insertions(+) create mode 100644 docs/history/07-zygote/code/examples/asmain.s create mode 100644 docs/history/07-zygote/code/examples/echo.s create mode 100644 docs/history/07-zygote/code/examples/fact.s create mode 100644 docs/history/07-zygote/code/examples/hello.s create mode 100644 docs/history/07-zygote/code/examples/sm.s (limited to 'docs/history/07-zygote/code/examples') diff --git a/docs/history/07-zygote/code/examples/asmain.s b/docs/history/07-zygote/code/examples/asmain.s new file mode 100644 index 0000000..96d9658 --- /dev/null +++ b/docs/history/07-zygote/code/examples/asmain.s @@ -0,0 +1,9 @@ +:;standalone:_source_on_Q,_binary_on_G +4000 a.q ! +:m.rd ? m.ch z 0 a.q @ ! m.go j +:m.ch , a.q @ ! a.q @ 1 + a.q ! m.rd j +:m.go 4000 a.src ! 40000 a.dst ! 0 a.org ! 50000 a.lab ! a.run c 0 a.j ! +:m.out a.j @ a.n @ < m.end z + 40000 a.j @ + @ 0 $ . 0 $ 8 > . 0 $ 16 > . 24 > . + a.j @ 1 + a.j ! m.out j +:m.end q diff --git a/docs/history/07-zygote/code/examples/echo.s b/docs/history/07-zygote/code/examples/echo.s new file mode 100644 index 0000000..002935d --- /dev/null +++ b/docs/history/07-zygote/code/examples/echo.s @@ -0,0 +1 @@ +:l ? x z q :x , . l j diff --git a/docs/history/07-zygote/code/examples/fact.s b/docs/history/07-zygote/code/examples/fact.s new file mode 100644 index 0000000..21f6e32 --- /dev/null +++ b/docs/history/07-zygote/code/examples/fact.s @@ -0,0 +1,3 @@ +10 fa c pb c 10 . q +:fa 0 $ 2 < fb z _ 1 r :fb 0 $ 1 - fa c * r +:pb 0 $ 1 > 0 $ p1 z pb c pd j :p1 _ :pd 1 & 48 + . r diff --git a/docs/history/07-zygote/code/examples/hello.s b/docs/history/07-zygote/code/examples/hello.s new file mode 100644 index 0000000..e5baf1a --- /dev/null +++ b/docs/history/07-zygote/code/examples/hello.s @@ -0,0 +1,2 @@ +s :l 0 $ @ 0 $ e z . 1 + l j :e q +:s "hello, #32 "world! #10 #0 diff --git a/docs/history/07-zygote/code/examples/sm.s b/docs/history/07-zygote/code/examples/sm.s new file mode 100644 index 0000000..954886e --- /dev/null +++ b/docs/history/07-zygote/code/examples/sm.s @@ -0,0 +1,3 @@ +133 x ! :x 65 . 10 . +fn c 133 fn ! fn c 131 fn ! fn c 10 . q +:fn 65 . r -- cgit v1.2.3