#1196 DJNZ direct, . produces wrong offset

closed-fixed
assembler (26)
5
2013-05-25
2006-09-07
No

The mcs51 assembler generates an offset of -2 instead
of -3 when used with a direct addressed operand and .
as the destination (address of current instruction).

When a label is used all is well. When a register is
used all is well too.

D5 E0 FE 134 djnz acc, .

SDCC 2.6.1 #4362 was used.

Thanks to SiLabs representative for reporting this
bug.

Discussion

  • Maarten Brock

    Maarten Brock - 2006-09-10

    Logged In: YES
    user_id=888171

    Fixed in SDCC 2.6.1 as/mcs51/i51mch.c #4375

     
  • Maarten Brock

    Maarten Brock - 2006-09-10
    • milestone: --> fixed
    • assigned_to: nobody --> maartenbrock
    • status: open --> closed-fixed
     

Log in to post a comment.