//__sfr __at(0x10) _pa;
//#define PA _pa
uint8_t b = 0;
void main(void)
{
//Clear 'b' bit in PA sfr register
PA &= (uint8_t)~(1<<b);
//Workaround
// uint8_t tmp = PA;
// tmp &= (uint8_t)~(1<<b);
// PA = tmp;
}
Compiled with sdcc -DPFS154 -mpdk14 -o bug.ihx bug.c gives:
build_PFS154/bug.asm:249: Error: <a> machine specific addressing or addressing mode error
Tested on sdcc 4.0.0 #11528 (Linux) and 4.0.2 #11679 (Linux), pdk13 and pdk14
in asm there is instructionand a, __pa with logic AND's SFR with ACC but there is no instruction in pdk for that, there is only AND between memory and acc (and from data).
full code attached
Fixed in [r11691].