I am comming from CCS and GNUAVR, and I am missing some background about how to manipulate bit-level registers or variables.
Typically, the pic has the ASM functions such as BCF, BSF, BTFSC, BTFSS.
I currently only see a solution to read a full byte (register or variable) to set or clear or test a bit, for set or clear write it back to the right place.
Also I would like to not only set or clear a given bit, ie RA1 or RA2, but make this variable.
Ie, I want to have a routine that sets or clears a bit 1,2,3,4... in a raw.
In GNUAVR, I know the _BV function, in CCS, you find BIT_SET(reg+var/reg,bit), BIT_CLEAR(reg+var,bit), BIT_TEST(reg+var,bit).
is this a missing function in SDCC ?
Thanks for any help.
Log in to post a comment.