Hello World ============ Lets start from the very begining. We assume that you've already unpacked the source code tree. First you need to build the project. -------- $ make -------- Then you need to prepare the environment: ------------------- $ source set_env.sh ------------------- Lets write the first program. The program will do more actions than just a simple greeting. The main idea to show how to work with libraries. Create a file _hello-world.vm_. Open it with your favourite editor and type the following code: --------------------------------------------------------------------- #include #include #include void program() { string w = "world"; int len, s; len = strlen(w); s = rshift(len, 1); printf("Hello %s!\n", w); printf("world len: %d, its right shifted value %d\n", len, s); } --------------------------------------------------------------------- Now we compile the program. ------------------------------------------------------------------------------- $ vmc -e program -I vminclude/ -o hello-world.v hello-world.vm vmlib/string.vo vmlib/bits.vo vmlib/io.vo ------------------------------------------------------------------------------- Where *-e* is a program entry point, *-I* a folder where header files live, *-o* the output file name, then our source file and library files. Lets run our program. ----------------------------------------------------- $ vm-lib-test -e program -p vmlibcall/ hello-world.v ----------------------------------------------------- Where *-e* is the entry point, *-p* a folder with library call implementation files.