In mathematics, 'canonic' means 'simplest' (can't reduce it more).
Main interest of canonic assembler is to allow to write interpreted code.
The Canonic Engines (interpreters) are easy to implement quickly.
You lose speed (10 up to 100 times slower than compiled native code), but you save research & development time, especially when you are trying to design a driver on a recently hacked environment, because you just need... notepad. Micro-codes uploaded in co-processors are NOT slowed down...
Relocation and symbol pre-processing is performed directly from text file.
1 instruction per line
1 character per instruction name
1 operand per instruction
Here is the syntax details (kept voluntarily short) :
It may still evolve (but I doubt). I'm currently studying xbox360 homebrew to see if it needs adjustments (probably some 32 bits aliases for the 128 bits port addresses).
(and when the current 'curse' gets lifted from the PS3 scene, I will examine PS3 homebrew too...)
A very clean "hello world" program would look like this :
//reserve space for 2 labels, 1 local and 1 global
//global register (stores line number in debug mode)
//unified api functions IDs
//code entry point
//activate debug mode 1 from here
//turns off debug mode
A smaller but dirtier version would look like this :
More samples (ogg vorbis decoder, already tested successfully on pc0) and more explanations will come when Minidash v0.1 will be released...
Edited by openxdkman, 28 March 2009 - 10:49 PM.