Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#23 Default arguments are a severe source of bugs

None
open
None
5
2014-11-06
2005-05-10
gib
No

Traditional syntax of pic 18 instructions allows
the third or second argument of an instruction
to be optional.

ex: movf f,d
is equivalent to movf f,d,1

This is a severe source of errors because it is
very "easy" to forget an argument. If the third
argument is missing, a wrong bank is selected,
and if the second one is missing, the banking
code is interpreted as an address.

I suggest to add an option to gpasm which
report all missing arguments.
(ex: -s, for Strict Syntax)

Discussion

  • Implemented in the svn #1109 version.

    New gpasm option: -S [0|1|2], --strict [0|1|2]
          Set the strict level of the recommended instruction-parameters
          (W or F and A or B).
    

    Károly

     


Anonymous


Cancel   Add attachments