Hi
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.
Nobody/Anonymous
None
None
Public
|
Date: 2009-11-13 14:59 What does "does not work" mean? |
|
Date: 2009-11-13 12:00 thank you for the input, I must make something wrong as I tried your code |
|
Date: 2009-11-13 10:31 Hi, |
| Field | Old Value | Date | By |
|---|---|---|---|
| status_id | Pending | 2009-11-13 12:00 | z-control |
| close_date | 2009-11-13 10:31 | 2009-11-13 12:00 | z-control |
| status_id | Open | 2009-11-13 10:31 | tecodev |
| close_date | - | 2009-11-13 10:31 | tecodev |
Copyright © 2009 Geeknet, Inc. All rights reserved. Terms of Use