someone tried to use the program area of PIC32 to store some data ?
I found an example in the FW32 loader but my ASM is very limited and I have problems with these functions:
- Code: Select all
private inline function mips_intr_disable() as uinteger
// asm volatile ("di %0" : "=r" (status))
dim status as uinteger = 0
asm
di %0 : "=r" (status)
end asm
return status
end function
private inline sub mips_write_c0_register(reg as uinteger, sel as uinteger, value as uinteger)
// asm volatile ( "mtc0 %z0, $%1, %2 \n ehb" : : "r" ((unsigned int) (value)), "K" (reg), "K" (sel))
asm
mtc0 %z0 , $%1, %2 \n ehb : : "r" ((unsigned int) (value)), "K" (reg), "K" (sel)
end asm
end sub
I have many "undeclared (firs use in this function)"
In the generated assembler I find the ASM line as it should be but surely I did not understand how to define interface variables
.. or an alternative system to get the same result : disable the interrupts and then restore them to how they were before.