small update on progress. Half of complex work is done, core is done. now only left to do is parser (sometimes it can be most complex thing, I hope it wont be) and adding this to OXC.
Syntax will shift form that I planed first, forget C like syntax and start learn assembler
I except example code will look like that:
simple function that multiple argument by 13
set r0 in;
mul r0 13;
ret r0;
muton recolor function:
test commander 1;
ret_neq in; https:// if(commander != 1) return in;
set r0 in;
getcolor r1 r0;
test r1 3;
ret_lt in; https:// if(r1 < 3) return in;
test r1 4;
ret_gt in; https:// if(r1 > 4) return in;
setcolor r0 2; https://changing green '3' and '4' to red '2'
ret r0;
This code is lot of more ugly than previous version but is lot of faster. I archive 50x time speed up compared to previous version with nice syntax.
Now in rough test I archive 4 times slower time than equivalent C++ function. This allow to blit graphic using user defined code.
If someone is interesting in it, and want know what dark magic I used to made it work, this is my test ground in attachment.
ps. is possible to have nice syntax and fast runtime but this will require compiler and I dont want write it