#59 Warning message for branching before macros

None
closed
None
1
2012-10-18
2012-08-21
Gál Zsolt
No

I made a big faliure when I extended code with banksel macro, when I ported one of my code from a standard PIC16F to an enchanced core PIC16F device.
Here is a little example about it:

btfss STATUS,C
banksel REG1
clrf REG1

I was very tired and I didn't understand what the problem is with it. If the compiler were giving warning message I could find the problem earlier.

Discussion

  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous - 2012-09-06

    I also don't see any problem (or don't understand where the problem is if it is at all). Probably I'm too tired too ;-)

    MPASM gives the same result as gpasm.

    Gal, can you please give me a hint where the problem is: complete source file and a description of what is going wrong?

    Borut

     
  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous - 2012-09-06

    OK, OK, now I see it: btfss should skip the clrf REG1, not the banksel REG1 instruction.

    So gpasm should check banksel preceded by skip instruction and throw a warning in such case.

    Borut

     
  • Borut Ražem

    Borut Ražem - 2012-09-06
    • status: open --> closed
    • assigned_to: Borut Ražem
     
  • Borut Ražem

    Borut Ražem - 2012-09-06

    Implemented in svn revision #798.

    Borut

     
  • Gál Zsolt

    Gál Zsolt - 2012-09-06

    Thank you!

     


Anonymous

Cancel  Add attachments





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

Sign up for the SourceForge newsletter:





No, thanks