Added new comparison operators: ifz, ifnz, ifeq, ifne, ifge, ifgt, ifle,
[voodoo-lang.git] / README
blob2226ac00e1b9074fa5cd0ee44088272818ec14c1
1                The Voodoo Programming Language
3 Introduction
4 ============
6 Voodoo is a programming language designed to be a thin abstraction
7 layer over the CPU's native instruction set. It provides functionality
8 to read and write memory, perform arithmetic, define and call
9 functions, and not much more. In particular, Voodoo has no concept of
10 types, let alone type safety. Voodoo is as dangerous as it is
11 powerful.
13 The Voodoo programming language is described in more detail in doc/language.html.
15 Usage
16 =====
18 The directory src contains an executable, voodooc, as well as a number
19 of Ruby modules. The program can be run from the src directory itself,
20 or from any other directory if the src directory is added to the
21 environment variables PATH and RUBYLIB. It works with Ruby 1.8.5, and
22 may also work with earlier and later versions.
24 The below example compiles and runs the hello program from the test
25 directory, after adding the src directory to PATH and RUBYLIB:
27 $ export PATH="$PATH:$PWD/src"
28 $ export RUBYLIB="$RUBYLIB:$PWD/src"
29 $ voodooc -o /tmp/hello.asm test/hello.voo
30 $ nasm -f elf /tmp/hello.asm
31 $ cc /tmp/hello.o -o /tmp/hello
32 $ /tmp/hello
33 Hello, world!
35 Note that the C compiler is used for the linking step; this is so that
36 the C library and any necessary files to handle a main function are
37 linked in. This is not the only way to get a working executable.
38 Voodoo programs can use other libraries than the C library, or even no
39 library at all. Linking with the C library is just used as a
40 convenient way to get a working puts function.