Menu

ROTATE bug

2015-01-23
2015-01-26
  • Peter Stone

    Peter Stone - 2015-01-23

    There appears to be a bug with the Rotate command.

    If you try to Rotate ALongVariable Right Simple it appears that the rotate picks up the carry bit and stuffs it in the most significant bit.

    I have found you need to clear the carry flag before the rotate for it to work correctly.
    Use STATUS.C = 0.

    Peter.

     
  • Anobium

    Anobium - 2015-01-25

    Thank you.

    What chip type? What version/date of the compiler please?

     
  • Peter Stone

    Peter Stone - 2015-01-26

    PIC18F26F80.
    Version 0.9 3/8/14

     
  • Hugh Considine

    Hugh Considine - 2015-01-26

    Found the problem, the carry bit wasn't being saved properly for long variables. Hopefully this is now fixed in SVN, and I've also uploaded a new build of the compiler exe to http://gcbasic.sourceforge.net/newfiles/gcbasic.exe

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.