XBYTE question

123457»

Comments

  • ozpropdev wrote: »
    cgracey wrote: »
    So, Z = 1 if pins x and y are both low, and C = !C if pin x is high?
    I believe that's what Cluso was looking for.

    Well, that could be done in two instructions:
            test    ina/inb,twobitmask    wz
            testp   onepin                xorc
    

    We need to know, for sure, what is needed.
  • cgracey wrote: »
    Well, that could be done in two instructions:
            test    ina/inb,twobitmask    wz
            testp   onepin                xorc
    

    We need to know, for sure, what is needed.
    Oh yes, the good old faithful TEST instruction.
    I'm way too focused on the new P2 stuff and forgot about the original P1 stuff. :)
  • Sorry, been busy. I need to spend a little more time to rethink if it's possible to replace the 3 instructions, or if it's only possible to replace 2, using a simple instruction. I'd like it to be of general use too.
  • TonyB_TonyB_ Posts: 1,456
    edited 2018-10-23 - 22:00:01
    deleted
Sign In or Register to comment.