Conle has posted an entry in the Neoflash 2010 Coding Contest:

Heres the full details posted:

This is going to be my NEO Comp retro submission.
Excuse me for the very large post but there are a few things i will have to cover.


...Lets start


--------------------------------------------------------------------------------

About GeneScript

GeneScript or "Genesis Script" or "GS" is an interpreted scripting language like LUA/Python with compiler and virtual machine but has C-Like syntax and does not require entry point function.

The language supports almost all C operators( + , - , / , * ,% , & , ^ , ! , != , == , = ,|| ,| ,&& , >> , <<, > , < , >= , <= )
and also the expression parser does precedence and supports parentheses( 3 * 3 * 3 , is different than (3*3)*3
just like in C).

The expression parser supports constants , native constants ,hex constants ,float consts, variables ,constant native types , script functions,
native function , native types just like in C.

The language comes with 4 base types : string , pointer ,integer(unsigned instruction set to be compatible with pointer), float(Exclusive opcodes are generated for floats)
and the SDK allows to register custom types and native functions(one of the most powerful features of this scripting language).

One note about the pointer , is that it uses the unsigned 32bit math instructions
and then just grabs the result off of it.

Arrays are supported , but only for int/float types and since there is no garbage collector yet(There is , just disabled)
you have to statically set their size with a constant. A good thing is , that arrays are very fast.Each access
is just 2 operations(Virtually!!).

Objects(Classes) are not yet implemented.

Regarding strings , you can't use them in arrays yet or in overloaded expressions since i will have to finish the garbage collector
first and then write a special library that will do the job.For now they're just constant objects.

To control the flow you can use if statements and while loops.Returns from functions are also allowed
but you can't use yet continue/break statements due to a small bug in the scope handling that i haven't fixed yet
so i just disabled them.

The language does support functions and can have as many arguments you like , but they can only be base types.
In the feature i will make a native library that will be using the pointer type for allocations and referencing.

This was one of the features i implemented recently , so in functions that register variables on the stack
there might be a few bugs but functions that don't take arguments and don't return anything are fine.

The scope management is not yet that great so you might see the compiler complain for stuff that shouldn't.
So for this reason always put your while/ifs in a unique scope { } and force-protect your code ,
also in expressions it is suggested to use parentheses since this enables the parentheses-balance code
and always knows where to stop.

One of the most powerful characteristics of this scripting language , is the native function support.
Not only they are very fast since they're referenced by an index value instead hashmaps+loops but they make your life easier.

Take a look at the script code i've written to display the neo logo , and then the script asks you
to press a few buttons and you can see all the action on the screen.All this code executes directly
the native functions and the logic is as usual handled by the virtual machine.


The compiler
The compiler is the "heart" of the scripting language.
Currently it is a pc application(linux 64bit,linux32bit,windows 32bit) but at some point
when the C++ support on n64 reach a descent level i will combine the compiler with the SDK + VM(On pc the vm goes with
the compiler as a set already and even allows realtime access to exported symbols).

The compiler's job:
It translates all the code into instructions(opcodes) and then does some possible optimizations.

For example , it can detect cases like "int/float/pointer n = 0;" and can generate single instructions
instead 2.

The compiler also reports at the end of the compilation the memory usage of the virtual machine
and allows you to specify stack optimizations.

In total there are 3 stack optimizations : Level0 : Sets the relocation info to defaults , Level1 :
Sets the relocation info to the average predicted , Level2:Forces the Virtual machine to fully reserve
all the relocation info needed at once(This is a huge performance boost!!).

It also handles the stack nearly perfect and makes sure that the program will never leave any of the stacks
with unwanted data.

The instructions are long-aligned and the format is so easy to interpret that makes dynamic recompilation
piece of cake!


The virtual machine

Another important thing is the virtual machine.Without it the object code is useless.

The virtual machine reads the bytecode , handles the flow , controls all registers and does all the logic.

There are about 110opcodes that the VM can handle , and about 15main registers that are used.
For everything else a stack is used and handled in the way that the compiler specifies.

Regarding the n64 port of the virtual machine ...it is really fast and carefuly coded , so you get
all the performance you could get from an interpreted approach.


Native runtime libraries(Or Native functions of the N64 port)
Currently the RTL is at a descent level.

There are functions that allows you to render text , display and load images from the SD,
read the controllers , get the system ticks and render geometric shapes.

There are also functions to print integer and float types on screen.

At some point i will improve them , but you can do many things with it already.Even a mini game is very possible.


How to write code
Its simple , but i'll have to say that you must know how to program in order
to use this scripting language.

Also , as far as the N64 port goes , first try to learn the basics of C and libragon(The library
used by the native library set) before you try anything.

After that , the syntax is pretty much like C.

Look at the code of the demo that displays the NEOFLASH LOGO and asks for some input:
(This code is pure script and runs on n64 as instructions)

Code: [Select]
//Genescript scripting language demo.//Demo : Native functions(libs) + Script functions test//Filename : test1.gsc//Some global variablesint previous = 0;int running = 1;void show_neo_logo(){ int id; int ctx; id = gslgfx_gen_texture("/genescript/neologo.jpg"); if((id == 0)) { gslconsole_printS("..."); gslconsole_printS("Unable to load : /genescript/neologo.jpg"); while(1){} }// ctx = gslgfx_lock(1); //pass 0 to ctx and the vm will pick one gslgfx_render_sprite(0,id,0,0);// gslgfx_unlock(ctx); gsltiming_delay(500); ctx = gslgfx_lock(1); gslgfx_fill_screen(ctx,0); gslgfx_unlock(ctx);}//setup consolevoid init(){ gslconsole_init(); gslconsole_set_render_mode(1); gslconsole_printS("....\n\nGeneScript demo."); gslconsole_printS("Press A,B,Z buttons to print the event.\nPress START to end the script\n");}void shutdown(){ gslconsole_close();}void event_loop(){ int btn; btn = gslctrl_read_buttons(0); if( (btn ^ previous)) { previous = btn; int a = gslctrl_button_pressed_A(btn); if(a) { gslconsole_printS("A Pressed...\n"); return; } int b = gslctrl_button_pressed_B(btn); if(b) { gslconsole_printS("B Pressed...\n"); return; } int z = gslctrl_button_pressed_Z(btn); if(z) { gslconsole_printS("Z Pressed...\n"); return; } int s = gslctrl_button_pressed_START(btn); if(s) { gslconsole_printS("END Pressed...\n"); running = 0; } }}//show neo logoshow_neo_logo();init();//main loopwhile(running > 0){ event_loop();}shutdown();
How to compile and run scripts
Extract the package,then
Copy "n64_vm/GenescriptVM.v64" and the directory "genescript"(in "n64_vm/") on top of your SDC.

Compile the code using the compiler:
genecompX86 scriptfile optimization_level

For example to compile script.gsc with optimization level2 do this :
genecompX86 script.gsc 2

Now place the resulting "script.gsobj" in the directory "genescript"
and run "GenescriptVM.v64" from the menu.



NEOCompo demos
There's currently one demo in the "genescript" directory
so just follow "How to compile and run scripts" and run the vm.


Assembly
For those who wonder how the compiled code looks like here is something that will answer your questions.

Input file : playgound.gsc (Pure GeneScript script file)


Code: [Select]
//Genescript scripting language demo.//Demo : Playgroundint array[8];float fArray[8];void init(){ gslconsole_init();}void shutdown(){ gslconsole_close();}void say_hello(){ gslconsole_printS("Hello...\n...World!\n");}void do_ifs(){ int value = 0; if(value > 10) { value = value * 10 /2; value = value & 1; }}void do_loop(){ int i = 0; while(i < 5) { array[i] = 0; i = (i + 1); if(i >= 2) { return; } }}//Call somethinginit();say_hello();do_loop();do_ifs();shu tdown();
Once compiled , it will look like this(This is a Compiler + VM SDK cycle dump)

(Note : Those jumps on top actually jump the function section to protect them
from the vm since there is no entry point.
)

Code: [Select]
Genescript compilerCopyright conleon , 2010 - 2011Usage : scriptfile optlevel(0 ~ 2)Program flow memory usage prediction [FULL CYCLE] : ISP 0x6 FSP 0x0 PSP 0x1 RSP 0x0Program flow memory usage prediction [AVERAGE] : ISP 0x0 FSP 0x0 PSP 0x0 RSP 0x0Level '2' optimization in progress...0x0:NOP (A 0,B 0,C -780713992,FA -66370764800.000000,FB 0.000000,FC 0.000000,PA 0x7f28526ec7d1,PB 0x7f2800000001,MEM 0x1b4e190,MBA (nil),MBB 0x7f28526c1420,RSP 0,FSP 0,ISP 0,PSP 0,RLC 72)0x4:ZEROREGS (A 0,B 0,C -780713992,FA -66370764800.000000,FB 0.000000,FC 0.000000,PA 0x7f28526ec7d1,PB 0x7f2800000001,MEM 0x1b4e190,MBA (nil),MBB 0x7f28526c1420,RSP 0,FSP 0,ISP 0,PSP 0,RLC 72)0x8:JMP (A 0,B 0,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA (nil),PB (nil),MEM 0x1b4e190,MBA (nil),MBB (nil),RSP 0,FSP 0,ISP 0,PSP 0,RLC 72)0x1c:NOP (A 0,B 0,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA (nil),PB (nil),MEM 0x1b4e190,MBA (nil),MBB (nil),RSP 0,FSP 0,ISP 0,PSP 0,RLC 72)0x20:JMP (A 0,B 0,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA (nil),PB (nil),MEM 0x1b4e190,MBA (nil),MBB (nil),RSP 0,FSP 0,ISP 0,PSP 0,RLC 72)0x34:NOP (A 0,B 0,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA (nil),PB (nil),MEM 0x1b4e190,MBA (nil),MBB (nil),RSP 0,FSP 0,ISP 0,PSP 0,RLC 72)0x38:JMP (A 0,B 0,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA (nil),PB (nil),MEM 0x1b4e190,MBA (nil),MBB (nil),RSP 0,FSP 0,ISP 0,PSP 0,RLC 72)0x6c:NOP (A 0,B 0,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA (nil),PB (nil),MEM 0x1b4e190,MBA (nil),MBB (nil),RSP 0,FSP 0,ISP 0,PSP 0,RLC 72)0x70:JMP (A 0,B 0,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA (nil),PB (nil),MEM 0x1b4e190,MBA (nil),MBB (nil),RSP 0,FSP 0,ISP 0,PSP 0,RLC 72)0x108:NOP (A 0,B 0,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA (nil),PB (nil),MEM 0x1b4e190,MBA (nil),MBB (nil),RSP 0,FSP 0,ISP 0,PSP 0,RLC 72)0x10c:JMP (A 0,B 0,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA (nil),PB (nil),MEM 0x1b4e190,MBA (nil),MBB (nil),RSP 0,FSP 0,ISP 0,PSP 0,RLC 72)0x1d0:NOP (A 0,B 0,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA (nil),PB (nil),MEM 0x1b4e190,MBA (nil),MBB (nil),RSP 0,FSP 0,ISP 0,PSP 0,RLC 72)0x1d4:CALL (A 0,B 0,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA (nil),PB (nil),MEM 0x1b4e190,MBA (nil),MBB (nil),RSP 0,FSP 0,ISP 0,PSP 0,RLC 72)0x10:NATCALL (A 0,B 0,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA (nil),PB (nil),MEM 0x1b4e190,MBA (nil),MBB (nil),RSP 1,FSP 0,ISP 0,PSP 0,RLC 72)0x18:RET (A 0,B 0,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA (nil),PB (nil),MEM 0x1b4e190,MBA (nil),MBB (nil),RSP 1,FSP 0,ISP 0,PSP 0,RLC 72)0x1dc:CALL (A 0,B 0,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA (nil),PB (nil),MEM 0x1b4e190,MBA (nil),MBB (nil),RSP 0,FSP 0,ISP 0,PSP 0,RLC 72)0x40:PLDOBJ (A 0,B 0,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA (nil),PB (nil),MEM 0x1b4e190,MBA (nil),MBB (nil),RSP 1,FSP 0,ISP 0,PSP 0,RLC 72)0x5c:PARGPUSH (A 0,B 0,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA 0x1b51118,PB (nil),MEM 0x1b4e190,MBA (nil),MBB (nil),RSP 1,FSP 0,ISP 0,PSP 0,RLC 72)0x60:NATCALL (A 0,B 0,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA 0x1b51118,PB (nil),MEM 0x1b4e190,MBA (nil),MBB (nil),RSP 1,FSP 0,ISP 0,PSP 1,RLC 72)0x68:RET (A 0,B 0,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA 0x1b51118,PB (nil),MEM 0x1b4e190,MBA (nil),MBB (nil),RSP 1,FSP 0,ISP 0,PSP 1,RLC 72)0x1e4:CALL (A 0,B 0,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA 0x1b51118,PB (nil),MEM 0x1b4e190,MBA (nil),MBB (nil),RSP 0,FSP 0,ISP 0,PSP 1,RLC 72)0x114:ZERO (A 0,B 0,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA 0x1b51118,PB (nil),MEM 0x1b4e190,MBA (nil),MBB (nil),RSP 1,FSP 0,ISP 0,PSP 1,RLC 72)0x118:ST (A 0,B 0,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA 0x1b51118,PB (nil),MEM 0x1b4e190,MBA (nil),MBB (nil),RSP 1,FSP 0,ISP 0,PSP 1,RLC 72)0x120:NOP (A 0,B 0,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA 0x1b51118,PB (nil),MEM 0x1b4e190,MBA (nil),MBB (nil),RSP 1,FSP 0,ISP 0,PSP 1,RLC 72)0x124:LD (A 0,B 0,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA 0x1b51118,PB (nil),MEM 0x1b4e190,MBA (nil),MBB (nil),RSP 1,FSP 0,ISP 0,PSP 1,RLC 72)0x12c:PUSH (A 0,B 0,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA 0x1b51118,PB (nil),MEM 0x1b4e190,MBA (nil),MBB (nil),RSP 1,FSP 0,ISP 0,PSP 1,RLC 72)0x130:LDIMM (A 0,B 0,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA 0x1b51118,PB (nil),MEM 0x1b4e190,MBA (nil),MBB (nil),RSP 1,FSP 0,ISP 1,PSP 1,RLC 72)0x138:POP (A 5,B 0,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA 0x1b51118,PB (nil),MEM 0x1b4e190,MBA (nil),MBB (nil),RSP 1,FSP 0,ISP 1,PSP 1,RLC 72)0x13c:LT (A 5,B 0,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA 0x1b51118,PB (nil),MEM 0x1b4e190,MBA (nil),MBB (nil),RSP 1,FSP 0,ISP 0,PSP 1,RLC 72)0x140:JMP_IF_NOT (A 1,B 0,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA 0x1b51118,PB (nil),MEM 0x1b4e190,MBA (nil),MBB (nil),RSP 1,FSP 0,ISP 0,PSP 1,RLC 72)0x148:LD (A 1,B 0,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA 0x1b51118,PB (nil),MEM 0x1b4e190,MBA (nil),MBB (nil),RSP 1,FSP 0,ISP 0,PSP 1,RLC 72)0x150:MEMMOVE (A 0,B 0,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA 0x1b51118,PB (nil),MEM 0x1b4e190,MBA (nil),MBB (nil),RSP 1,FSP 0,ISP 0,PSP 1,RLC 72)0x15c:STMEMA (A 0,B 0,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA 0x1b51118,PB (nil),MEM 0x1b4e190,MBA 0x1b4e190,MBB (nil),RSP 1,FSP 0,ISP 0,PSP 1,RLC 72)0x160:ZERO (A 0,B 0,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA 0x1b51118,PB (nil),MEM 0x1b4e190,MBA 0x1b4e190,MBB (nil),RSP 1,FSP 0,ISP 0,PSP 1,RLC 72)0x164:ST (A 0,B 0,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA 0x1b51118,PB (nil),MEM 0x1b4e190,MBA 0x1b4e190,MBB (nil),RSP 1,FSP 0,ISP 0,PSP 1,RLC 72)0x16c:LD (A 0,B 0,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA 0x1b51118,PB (nil),MEM 0x1b4e190,MBA 0x1b4e190,MBB (nil),RSP 1,FSP 0,ISP 0,PSP 1,RLC 72)0x174:PUSH (A 0,B 0,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA 0x1b51118,PB (nil),MEM 0x1b4e190,MBA 0x1b4e190,MBB (nil),RSP 1,FSP 0,ISP 0,PSP 1,RLC 72)0x178:LDIMM (A 0,B 0,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA 0x1b51118,PB (nil),MEM 0x1b4e190,MBA 0x1b4e190,MBB (nil),RSP 1,FSP 0,ISP 1,PSP 1,RLC 72)0x180:POP (A 1,B 0,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA 0x1b51118,PB (nil),MEM 0x1b4e190,MBA 0x1b4e190,MBB (nil),RSP 1,FSP 0,ISP 1,PSP 1,RLC 72)0x184:ADD (A 1,B 0,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA 0x1b51118,PB (nil),MEM 0x1b4e190,MBA 0x1b4e190,MBB (nil),RSP 1,FSP 0,ISP 0,PSP 1,RLC 72)0x188:ST (A 1,B 0,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA 0x1b51118,PB (nil),MEM 0x1b4e190,MBA 0x1b4e190,MBB (nil),RSP 1,FSP 0,ISP 0,PSP 1,RLC 72)0x190:LD (A 1,B 0,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA 0x1b51118,PB (nil),MEM 0x1b4e190,MBA 0x1b4e190,MBB (nil),RSP 1,FSP 0,ISP 0,PSP 1,RLC 72)0x198:PUSH (A 1,B 0,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA 0x1b51118,PB (nil),MEM 0x1b4e190,MBA 0x1b4e190,MBB (nil),RSP 1,FSP 0,ISP 0,PSP 1,RLC 72)0x19c:LDIMM (A 1,B 0,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA 0x1b51118,PB (nil),MEM 0x1b4e190,MBA 0x1b4e190,MBB (nil),RSP 1,FSP 0,ISP 1,PSP 1,RLC 72)0x1a4:POP (A 2,B 0,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA 0x1b51118,PB (nil),MEM 0x1b4e190,MBA 0x1b4e190,MBB (nil),RSP 1,FSP 0,ISP 1,PSP 1,RLC 72)0x1a8:GTE (A 2,B 1,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA 0x1b51118,PB (nil),MEM 0x1b4e190,MBA 0x1b4e190,MBB (nil),RSP 1,FSP 0,ISP 0,PSP 1,RLC 72)0x1ac:JMP_IF_NOT (A 0,B 1,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA 0x1b51118,PB (nil),MEM 0x1b4e190,MBA 0x1b4e190,MBB (nil),RSP 1,FSP 0,ISP 0,PSP 1,RLC 72)0x1b4:RET (A 0,B 1,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA 0x1b51118,PB (nil),MEM 0x1b4e190,MBA 0x1b4e190,MBB (nil),RSP 1,FSP 0,ISP 0,PSP 1,RLC 72)0x1ec:CALL (A 0,B 1,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA 0x1b51118,PB (nil),MEM 0x1b4e190,MBA 0x1b4e190,MBB (nil),RSP 0,FSP 0,ISP 0,PSP 1,RLC 72)0x78:ZERO (A 0,B 1,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA 0x1b51118,PB (nil),MEM 0x1b4e190,MBA 0x1b4e190,MBB (nil),RSP 1,FSP 0,ISP 0,PSP 1,RLC 72)0x7c:ST (A 0,B 1,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA 0x1b51118,PB (nil),MEM 0x1b4e190,MBA 0x1b4e190,MBB (nil),RSP 1,FSP 0,ISP 0,PSP 1,RLC 72)0x84:LD (A 0,B 1,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA 0x1b51118,PB (nil),MEM 0x1b4e190,MBA 0x1b4e190,MBB (nil),RSP 1,FSP 0,ISP 0,PSP 1,RLC 72)0x8c:PUSH (A 0,B 1,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA 0x1b51118,PB (nil),MEM 0x1b4e190,MBA 0x1b4e190,MBB (nil),RSP 1,FSP 0,ISP 0,PSP 1,RLC 72)0x90:LDIMM (A 0,B 1,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA 0x1b51118,PB (nil),MEM 0x1b4e190,MBA 0x1b4e190,MBB (nil),RSP 1,FSP 0,ISP 1,PSP 1,RLC 72)0x98:POP (A 10,B 1,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA 0x1b51118,PB (nil),MEM 0x1b4e190,MBA 0x1b4e190,MBB (nil),RSP 1,FSP 0,ISP 1,PSP 1,RLC 72)0x9c:GT (A 10,B 0,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA 0x1b51118,PB (nil),MEM 0x1b4e190,MBA 0x1b4e190,MBB (nil),RSP 1,FSP 0,ISP 0,PSP 1,RLC 72)0xa0:JMP_IF_NOT (A 0,B 0,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA 0x1b51118,PB (nil),MEM 0x1b4e190,MBA 0x1b4e190,MBB (nil),RSP 1,FSP 0,ISP 0,PSP 1,RLC 72)0xa8:LD (A 0,B 0,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA 0x1b51118,PB (nil),MEM 0x1b4e190,MBA 0x1b4e190,MBB (nil),RSP 1,FSP 0,ISP 0,PSP 1,RLC 72)0xb0:PUSH (A 0,B 0,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA 0x1b51118,PB (nil),MEM 0x1b4e190,MBA 0x1b4e190,MBB (nil),RSP 1,FSP 0,ISP 0,PSP 1,RLC 72)0xb4:LDIMM (A 0,B 0,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA 0x1b51118,PB (nil),MEM 0x1b4e190,MBA 0x1b4e190,MBB (nil),RSP 1,FSP 0,ISP 1,PSP 1,RLC 72)0xbc:LDIMM (A 10,B 0,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA 0x1b51118,PB (nil),MEM 0x1b4e190,MBA 0x1b4e190,MBB (nil),RSP 1,FSP 0,ISP 1,PSP 1,RLC 72)0xc4:POP (A 2,B 0,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA 0x1b51118,PB (nil),MEM 0x1b4e190,MBA 0x1b4e190,MBB (nil),RSP 1,FSP 0,ISP 1,PSP 1,RLC 72)0xc8IV (A 2,B 0,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA 0x1b51118,PB (nil),MEM 0x1b4e190,MBA 0x1b4e190,MBB (nil),RSP 1,FSP 0,ISP 0,PSP 1,RLC 72)0xcc:POP (A 0,B 0,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA 0x1b51118,PB (nil),MEM 0x1b4e190,MBA 0x1b4e190,MBB (nil),RSP 1,FSP 0,ISP 0,PSP 1,RLC 72)0xd0:MUL (A 0,B 0,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA 0x1b51118,PB (nil),MEM 0x1b4e190,MBA 0x1b4e190,MBB (nil),RSP 1,FSP 0,ISP 0,PSP 1,RLC 72)0xd4:ST (A 0,B 0,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA 0x1b51118,PB (nil),MEM 0x1b4e190,MBA 0x1b4e190,MBB (nil),RSP 1,FSP 0,ISP 0,PSP 1,RLC 72)0xdc:LD (A 0,B 0,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA 0x1b51118,PB (nil),MEM 0x1b4e190,MBA 0x1b4e190,MBB (nil),RSP 1,FSP 0,ISP 0,PSP 1,RLC 72)0xe4:PUSH (A 0,B 0,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA 0x1b51118,PB (nil),MEM 0x1b4e190,MBA 0x1b4e190,MBB (nil),RSP 1,FSP 0,ISP 0,PSP 1,RLC 72)0xe8:LDIMM (A 0,B 0,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA 0x1b51118,PB (nil),MEM 0x1b4e190,MBA 0x1b4e190,MBB (nil),RSP 1,FSP 0,ISP 1,PSP 1,RLC 72)0xf0:POP (A 1,B 0,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA 0x1b51118,PB (nil),MEM 0x1b4e190,MBA 0x1b4e190,MBB (nil),RSP 1,FSP 0,ISP 1,PSP 1,RLC 72)0xf4:LAND (A 1,B 0,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA 0x1b51118,PB (nil),MEM 0x1b4e190,MBA 0x1b4e190,MBB (nil),RSP 1,FSP 0,ISP 0,PSP 1,RLC 72)0xf8:ST (A 0,B 0,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA 0x1b51118,PB (nil),MEM 0x1b4e190,MBA 0x1b4e190,MBB (nil),RSP 1,FSP 0,ISP 0,PSP 1,RLC 72)0x100:NOP (A 0,B 0,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA 0x1b51118,PB (nil),MEM 0x1b4e190,MBA 0x1b4e190,MBB (nil),RSP 1,FSP 0,ISP 0,PSP 1,RLC 72)0x104:RET (A 0,B 0,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA 0x1b51118,PB (nil),MEM 0x1b4e190,MBA 0x1b4e190,MBB (nil),RSP 1,FSP 0,ISP 0,PSP 1,RLC 72)0x1f4:CALL (A 0,B 0,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA 0x1b51118,PB (nil),MEM 0x1b4e190,MBA 0x1b4e190,MBB (nil),RSP 0,FSP 0,ISP 0,PSP 1,RLC 72)0x28:NATCALL (A 0,B 0,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA 0x1b51118,PB (nil),MEM 0x1b4e190,MBA 0x1b4e190,MBB (nil),RSP 1,FSP 0,ISP 0,PSP 1,RLC 72)0x30:RET (A 0,B 0,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA 0x1b51118,PB (nil),MEM 0x1b4e190,MBA 0x1b4e190,MBB (nil),RSP 1,FSP 0,ISP 0,PSP 1,RLC 72)0x1fc:NOP (A 0,B 0,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA 0x1b51118,PB (nil),MEM 0x1b4e190,MBA 0x1b4e190,MBB (nil),RSP 0,FSP 0,ISP 0,PSP 1,RLC 72)0x200:NOP (A 0,B 0,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA 0x1b51118,PB (nil),MEM 0x1b4e190,MBA 0x1b4e190,MBB (nil),RSP 0,FSP 0,ISP 0,PSP 1,RLC 72)0x204:QUIT (A 0,B 0,C 0,FA 0.000000,FB 0.000000,FC 0.000000,PA 0x1b51118,PB (nil),MEM 0x1b4e190,MBA 0x1b4e190,MBB (nil),RSP 0,FSP 0,ISP 0,PSP 1,RLC 72)

Source code
The project is not yet opensource but will when the language gets more mature so please don't ask for SDK, though
a few people will have access to the code and i will also send a copy to Dr.Neo right now.


Special thanks
I would like to thank the following people since they deserve some credits:

Jack Crenshaw - For the book "Let's Build a Compiler".Its *very* outdated but was an interesting read.
ChillyWilly - N64Myth init code , SD access , Libdragon updates
Shaun Taylor - The main author of libdragon which is used by the runtime libs : http://www.dragonminded.com/?loc=n64dev/libdragon

http://www.neoflash.com/forum/index....ic,6292.0.html