Skip to content

Latest commit

 

History

History
46 lines (34 loc) · 1.76 KB

README.md

File metadata and controls

46 lines (34 loc) · 1.76 KB

IGB VM is an execution enviroment for IGB Binary.

The instruction set is explained here.

Floating points values

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 as 1234
  • 0.001 is stored as 1

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

Screen types

There are 2 screen types:

  • rgb which has 16777216 colors
  • 16c which has 16 colors (see a list of them here)

Pixel cache

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.

Take a screenshot using F2




Dependencies:

License

Licensed under GNU GPLv3 or later