FUZE_C Compiler (pixels)
-
FUZE_C Compiler is a C-like language written in Fuze. Commands are as follows:
var -> declaring variables let -> assigning a value to a variable if -> based on the condition will allow user to jump via GOTO/GOSUB do while -> this is a do while loop. goto -> jump to a label. gosub -> jump to a label and store current IP/PC to the stack. return -> pop stored IP/PC from the stack and return.
Var Arithmetic:
all variables are pointers and can be referenced or indexed.
ex:let foo = 0; //This is a normal variable which is automatically //stored at RAM[16 + n] let *foo = 5; //This is using the variable as a pointer. //In short RAM[RAM[16+n]] let foo[0] = 5; //Does the same as the above example
Pixels:
pixels are accessed at RAM[16384], so you can use a variable to write to that address.
ex:var VRAM; let VRAM = 16384; let VRAM[0] = 65535; //Draws 16 pixels in a straight line //at the top left of the screen.
Controls:
Controls are checked at RAM[24576].I hope you have fun with this little language.
example code:var player, player.ptr; var i,j; //for negative -1 var n; //constrols var dPad; let dPad = 24576; let n = 65535; let i = 0; let j = 0; let player = 16384; let player.ptr = 5000; //where the pixel data will be do{ let player.ptr[i] = n; let i = i + 1; }while(i<16) let i = 0; //draw pixel data do{ let player[j] = player.ptr[i]; let i = i + 1; let j = j + 32; if(j=512) {gosub @reset} //check input from D-Pad do{let *dPad = *dPad;}while(*dPad=0) }while(1) @reset let j = 0; let i = 0; //move character to the right let player = player + 1; return
Share Code: 4LB63MND9K (pending)
-
I know only C# and Fuze right now lol... never worked with C