Skip to content

evanlin96069/ika

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🦑 ika

A simple programming language that compiles into x86 assembly.

Build

make

Currently, Windows build is not supported yet.

Usage

Usage: ikac [options] file
Options:
  -E               Preprocess only; do not compile, assemble or link.
  -S               Compile only; do not assemble or link.
  -o <file>        Place the output into <file>.
  -?               Display this information.

Examples

Hello world

"Hello world!\n";

Fibonacci

// Fibonacci sequence using recursion

fn fib(n) {
    if (n <= 1) {
        return n;
    }
    return fib(n - 1) + fib(n - 2);
}

fn main() {
    var i = 0;
    while (i < 10) : (i += 1) {
        "%d\n", fib(i);
    }
}

main();

See more examples in the examples folder.

Documentation

See the ika Language Documentation

About

A simple programming language

Topics

Resources

License

Stars

Watchers

Forks