The first, and easier is asm tags, ex.
asm("HAITHURR:;");
An example which would be
That would load what's in 08cf0500 offset 1c, subtract 1(ffff), and store itCode:asm("lui $t0, 0x08cf;" "lw $t1, 0x0500($t0);" "beq $t1, $zero, endOfAsmCrap;" "nop;" "lw $t2, 0x001c($t1);" "addiu $t2, $t2, 0xffff;" "sw $t2, 0x001c($t2);");
Now, the real deal, is a .S file(not sure of the exact syntax, but who gives a rats ass).
Now, how you would call these:Code:.set noreorder #add an address .global addAddress .ent addAddress addAddress: lw $t0, 0x0000($a0) addu $t0, $t0, $a1 sw $t0, 0x0000($a0) jr $ra add $v0, $t0, $zero #this returns it, but it's not necessarily needed .end addAddress #convert dec and return as float .global cvtFloat .ent cvtFloat cvtFloat: mtc1 $a0, $f0 cvt.w.s $f0, $f0 mfc1 $t0, $f0 jr $ra add $v0, $t0, $zero #moves whats in t0(the converted) to the return var .end cvtFloat
Hope that helped some.Code:addAddress(address, value); buffer = cvtFloat(buffer);
Oh yeah, this is a codinghs ONLY tut, it is to stay here, and here only.