IRIS/IRIS++ | Game Development Programming Language


Top Top | Previous Prev | Next Next


Known Limitations





Maximum amount of number that can be added to a register

Cannot add more than 2147483647 (size of 32 bit int)


Compiler hangs up when adding range within 32 bit integer

The compiler automatically generates fragments of multiplication code that makes up the resulting value. For instance, 2147483647 is made up of the following code:


REG $0
ATR 255
MLT 255
MLT 255
MLT 129
SUM 255
SUM 255
SUM 255
.
.
.

However, this will result in summing 255 for 33279 times, hanging up the compiler. Even if compiled, the execution of the binary will be very slow. A work around to this problem is to write the optimization code manually:


// 2147483647 = 255 * 255 * 255 * 129 + 8486272
// First, we will forget about 8486272 and just do the multiplications
REG $0
ATR 255
MLT 255
MLT 255
MLT 129

// Now, make 8486272 = 255 * 255 * 130 + 33022, but leave out 33022
REG $1
ATR 255
MLT 255
MLT 130

// Now, make 33022 = 255 * 129 + 127
REG $2
ATR 255
MLT 129
SUM 127

// Now, add all together
REG $0
SUM $1
SUM $2

// Displays 2147483647
PTX $0

Maximum lines of code

When compiled to the smallest tokens of code (use the -i option when compiling to output the intermediate code), all of that code must not exceed more than 65280. This is because the JMP instruction can only handle up to jumping to the byte position of 255 * 255 + 255.


Limitations in using #include directive

Source code that are included using the #include directives are limited with use of IRIS++ statements (i.e. if, do, function, etc). Therefore, you must write the external library code in IRIS. Also, JMS and JMP instructions cannot reference the parent source code (The code that defines the #include directive). You cannot also use JMP or JMS instructions in your library code.