piclist 2001\02\16\093306a >
Thread: is there a way to name bits the same for C and asm?
www.piclist.com/techref/microchip/languages.htm?key=asm
flavicon
face BY : mikespam_OUT@whitewing.co.uk



In Hitech C, has anyone found a neat way to name a port + bit
combination such that the SAME name can be used with C and inline
assembler? i.e.
adc_cs=1;
#asm
...
bsf adc_cs
#endasm

Obviously I can define the port in 2 ways, one for each usage, but
that's a bit untidy....
e.g. for assembler #define adc_cs_a  _PORTB,4
for C
#define  adc_cs_c RB4

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


<6maq8tsopihh0obeeh4rnrh49vue4n4vt7@4ax.com> quoted-printable

See also: www.piclist.com/techref/microchip/languages.htm?key=asm
Reply You must be a member of the piclist mailing list (not only a www.piclist.com member) to post to the piclist. This form requires JavaScript and a browser/email client that can handle form mailto: posts.
Subject (change) is there a way to name bits the same for C and asm?

month overview.

new search...