IGB VM is an execution enviroment for IGB Binary.
The instruction set is explained here.
Floating point values are supported, but they are limited to only 3 digits.
This is done by using an integer as if it was shifted by 3 digits to the right:
1.234
is stored as1234
0.001
is stored as1
Since the number is shifted by 3 digits to the right, the maxium value is 2147483 . 647, not 2147483647.
There's how the operations are handled with such system:
+
works normally;3.3 + 1.2 == 4.5
3300 + 1200 == 4500
-
works normally;3.3 - 1.2 == 2.1
3300 - 1200 == 2100
*
the first/second number has to be divided by 1000;
3.3 * 1.2 == 3.96
(3300 * 1200)/1000 == 3960
/
the first number has to be multiplied by 1000, therefore is limited to 2147.483647;
3.3 / 1.2 == 2.75
3300*1000 / 1200 == 2750
- '%' works normally;
3.3 % 1.2 == 0.9
3300 % 1200 == 900
There are 2 screen types:
rgb
which has 16777216 colors16c
which has 16 colors (see a list of them here)
To set a pixel, you need to set the pixel cache first.
It's like picking a color, then drawing.
This way is much faster then setting the color every time.
Licensed under GNU GPLv3 or later