Sorry, I thought you had something more substantial when I suggested making a thread about it. Yes, that hack does work, but it's a hack: The MIPS ABI is rather clear about register names being prepended with $.
Can you point out where that is as I can't find any MIPS manuals that use $ in register names.
They are pretty unclear on the assembler syntax too as they always list the syntax with rs/rt/rd. However there are a couple of samples in the manual, which don't use $
SW R2, (r3) # uncached store
NOP # NOP 1
NOP # NOP 2
NOP # NOP 3
NOP # NOP 4
NOP # NOP 5
NOP # NOP 6
NOP # NOP 7
SW R2, (R3) # uncached store
They stopped using the at/v0 etc names for registers by the r4400 manual. They aren't listed at all anywhere.
Two of the CPU general purpose registers have assigned functions:
• r0 is hardwired to a value of zero, and can be used as the target register for any instruction whose result is to be discarded. r0 can also be used as a source when a zero value is needed.
• r31 is the link register used by Jump and Link instructions. It should not be used by other instructions.
The CPU has three special purpose registers:
• PC — Program Counter register
• HI — Multiply and Divide register higher result
• LO — Multiply and Divide register lower result