#56 No ABI register usage documentation for PIC16

open
nobody
5
2010-11-05
2010-11-05
No

It would be really nice if there were a page I could go to in the manual that would tell me which registers are owned by the compiler and should not be poked by my C code, and which registers I control. It's pretty obvious that the compiler owns STATUS, WREG, PRODH/PRODL, BSR, the FSRs, and TBLPTR/TABLAT, but I'm not sure about anything else. Also, the only reason I know these are owned by the compiler is looking at the assembly output. See, the thing is, there's nothing technically stopping me from writing "BSR=2;" in my C code; this actually compiles, but clearly isn't going to be useful, hence the desire for a manual page explaining which registers should be left alone by the programmer.

Discussion


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks