See http://esolangs.org/wiki/HQ9 for more on HQ9+.
See Interpreter, Compiler, JIT for more on translation techniques.
- H: Print "hello, world"
- Q: Print the program's source code
- 9: Print the lyrics to "99 Bottles of Beer"
- +: Increment the accumulator
- Compile the interpreter:
gcc -ansi -pedantic -Wall interpreter.c -o HQ9+
- Interpret a HQ9+ program:
./HQ9+ ../main.hq9+
- Compile the compiler:
gcc -ansi -pedantic -Wall compiler.c -o HQ9+
- Compile and assemble a HQ9+ program:
./HQ9+ ../main.hq9+ | gcc -no-pie -nostartfiles -o program -xassembler -
- Start the program:
./program
- Compile the jit compiler:
gcc jit.c vector.c -o HQ9+
- Jit a program:
./HQ9+ ../main.hq9+