#1222 Incorrect test

closed
nobody
5
2006-10-27
2006-10-25
Rafał
No

if (ir_pos != serial_pos)
is translared to
mov a,_ir_pos
jz
I just come back to assembler.

Discussion

  • Frieder Ferlemann

    • status: open --> pending
     
  • Frieder Ferlemann

    Logged In: YES
    user_id=589052

    you most likely forgot to use the keyword "volatile" for the
    variable
    serial_pos? And serial_pos is probably changed within an IRQ
    routine?

    If not declared as volatile SDCC is correct to assume that
    serial_pos never deviates from its startup value (zero).

    I set this report to pending, please respond (with compiler
    version etc)
    to this report if using volatile does not fix your problem.

     
  • Rafał

    Rafał - 2006-10-26
    • status: pending --> open
     
  • Rafał

    Rafał - 2006-10-26

    Logged In: YES
    user_id=1627673

    Volatile is fixing problem.

     
  • Frieder Ferlemann

    Logged In: YES
    user_id=589052

    thanks for reporting back:)

     
  • Frieder Ferlemann

    • status: open --> closed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks