Hi all, i need a help to move my first pass into this world of programming. I use a Cortex-M0 and my question is: how can I access to register R0-R12.. in language C? it's possible? I would save a variable into one register. Thanks bye.
Maybe you should start by telling why you need to store a variable into one of the registers?
The registers are hard to access from C for the simple reason that a C programmer isn't normally expected to be able to make direct use of processor registers.
unsigned char register blah; will use a register for 'blah'
Maybe you should start by telling why you need to store a variable into one of the registers? the usual reason is 'hand optimizing' for speed
Erik
Check your compiler documentation for what effect the 'register' storage-class specifier actually has, if any.
and is usually misguided - especially from a beginner