Nikki0
nikki0 is a program that runs on the naravm 0.1 as a “human readable”
layer over the binary format nara vmfile. It was written in paper, then copied over byte by byte
with bvi into the binary nara vmfile.
An example program:
00 00 00 38
02 02 01 01 02
02 02 02 02 02
02
it:
- ignores whitespace
- lexes numbers with form
[0-9]+and prints each of them to stdout as au8 - just prints any other byte as-is
To run it:
- Download the Nara VM v0.0.5
- Download
nikki0 - Write your program to
/home/fernando/program.bin- this path is hardcoded - Run
nikki0withnaravm-0.0.5 - The output will be written to stdout
nikki0_1.txt - nikki0.1
Written in nikki0, it changes things:
- ignores whitespace
- lexes hex numbers like
[0-9a-fA-F]+and prints to stdout asu8 - lexes strings: inside double quotes any byte is just printed:
"hello123" - fails on any other char
An example program:
00 00 00 65 ; blob len
"nikki1" ; @0-6, len=6
"<entrypoint>" ; @6-18, len=12
; --------------------------------------------------
; nikki1::<entrypoint>
; -------------------------------------------------{
00 00 00 01 ; function name pool idx
00 00 00 4A ; function len
20 00 04 ; :
05 2A 31 ; : 2A = argv arr
2C 0B 2A 00 ; : 0B = argc
To run it:
- Download the Nara VM v0.0.5
- Download
nikki0.1 - Write your program to
/home/fernando/program.bin- this path is hardcoded - Run
nikki0.1withnaravm-0.0.5 - The output will be written to stdout