Fa

Fa is a rys-like language written by Ari. It looks similar to assembly

hello world
include 'std/lstd.fa' "Hello World!" ro #puts %EXIT_SUCCESS #exit

Hello name
include 'std/std.fa' include 'std/mem/gmem.fa'

macro NAME_LEN 256 end

fun main [ str str int ] eo   %NAME_LEN #malloc as name       -- Allocate NAME_LEN buffer

"Enter your name: " ro %STDOUT %fputs                         -- fputs("...", stdout) => null

%NAME_LEN @name deref %STDIN %SYS_read sys 4                -- read(STDIN, *name, NAME_LEN) => 

copy 2 grt if       "Empty names are not allowed" ro %error end

"Your name is " ro %STDOUT %fputs                         -- fputs("...", stdout) => null

1 swap sub @name deref %puts                          -- puts(string) => null

%NAME_LEN @name deref #mfree 1 drop                  -- free(name) => null

%EXIT_SUCCESS %exit end


 * 1) main

Online interpreter
usernamee made an online interpreter for fa. It can be accessed here.

Source code
fa's source code is on GitHub, in this repository.