Menu

#3065 [pdk14/pdk13] Logic AND a SFR, Error: <a> machine specific addressing or addressing

closed-fixed
None
PDK
5
2020-06-24
2020-06-22
kaweksl
No
//__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

1 Attachments

Discussion

  • Philipp Klaus Krause

    • status: open --> closed-fixed
    • assigned_to: Philipp Klaus Krause
     
  • Philipp Klaus Krause

    Fixed in [r11691].

     

Log in to post a comment.

MongoDB Logo MongoDB