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.234is stored as12340.001is 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.53300 + 1200 == 4500-works normally;3.3 - 1.2 == 2.13300 - 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.753300*1000 / 1200 == 2750- '%' works normally;
3.3 % 1.2 == 0.93300 % 1200 == 900
There are 2 screen types:
rgbwhich has 16777216 colors16cwhich 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