Shop OBEX P1 Docs P2 Docs Learn Events
Assembler question: order of registers in AND — Parallax Forums

Assembler question: order of registers in AND

sanandaksanandak Posts: 18
edited 2007-05-14 19:51 in Propeller 1
I am reading an input pin and this works:
and Pin, ina nr, wc




but this doesn't:
and ina, Pin nr, wc




I know one can't modify ina, but the nr flag should prevent that, right?

It works, but I'm where else could this be an issue?

Thanks,
S

Comments

  • Lord SteveLord Steve Posts: 206
    edited 2007-05-10 19:28
    The Propeller hardware does not permit INA being in the destination field of the instruction.· It's a instruction set architecture implementation issue, not an effects flag issue.
  • sanandaksanandak Posts: 18
    edited 2007-05-10 19:43
    Thanks... I missed that in the documentation.
    Sincerely,
    Sridhar.
  • rokickirokicki Posts: 1,000
    edited 2007-05-11 18:16
    Which is why the assembler should warn about this; this happens again and again and will continue to bite people and cause
    them frustration that is easily avoided. Give the shadow registers different names (like INA_SHADOW or something) and
    let's nip these problems in the bud.
  • Lord SteveLord Steve Posts: 206
    edited 2007-05-14 16:07
    Actually, that's true.··Is there·reason the assembler can't detect incorrect usage of INA and friends?· Helpful tools are...uh...helpful.
  • Mike GreenMike Green Posts: 23,101
    edited 2007-05-14 16:46
    This has come up before. Apparently the assembler doesn't have provisions for warning messages, only "fatal" error messages and, occasionally, the shadow registers are useful. Personally, I would love to see a variety of enhancements to the compiler/assembler including this type of warning and some kind of provision for macro processing like an option or preference that supplies the path and name of a command line program to do preprocessing on each object as it's compiled. The command line program would be executed with the name of the input file and a temporary file to be used for the actual program to be compiled once the "pre-processor" is done. An error return from the preprocessor would abort the compilation.
  • rjo_rjo_ Posts: 1,825
    edited 2007-05-14 19:51
    Mike & rokicki,

    I think the guys at Parallax have some real tight time constraints... and any time taken to do this would be time taken away from other more pressing matters.
    I have a feeling that all of the feedback is being heard, noted and queued, and I would be willing to bet you a fried Prop that these issues will be addressed in the next formal release of new hardware[noparse]:)[/noparse]
    I'm having trouble searching things.... I know that the issue of searching has been addressed but when I do a search to find it... I can't.

    You guys are the best.

    Rich
Sign In or Register to comment.