narenratan / jonesforth_arm64_apl

JonesForth ARM64 with APL symbols

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

JonesForth ARM64 with APL symbols

This is an ARMv8 AArch64 version of Richard W.M. Jones' original x86 JonesForth. I have added a few things including:

  • Defining words
  • Combinators
  • Delimited continuations

Also I have used the APL character set.

The pizza is in the examples dir but by way of garlic bread:

∇ ε ( ⌈⌊ ⊤ - ↑ ∥) ↓ ∇   / Define ε as Euclid's algorithm /          

∇ λ ◁ , ▷ @ ⍎ ∇         / A defining word λ which names anonymous functions /

3 ⊂ ↑ ⊃ ⊂ + ⊃ cat ⍎     / Double three using the cat combinator /

1 2 3 4 ⊂ × ⟦ + - ⊃ ⟧ ⍎ / Capture '+ -' in a delimited continuation with ⟦ ⟧ /

ASCII equivalents for APL-character words are defined in ascii.f (they are the corresponding Forth words where applicable so ascii.f makes a handy glossary).

You can compile and run with

gcc -nostdlib jonesforth.S

cat jonesforth.f - | ./a.out

and run the the examples like

cat jonesforth.f examples/sockets.f - | ./a.out

You may need to

stty iutf8

if your terminal isn't set up to handle utf8 by default.

About

JonesForth ARM64 with APL symbols


Languages

Language:Assembly 88.0%Language:Forth 10.0%Language:Makefile 1.1%Language:C 0.9%