Shop OBEX P1 Docs P2 Docs Learn Events
XBYTE question - Page 7 — Parallax Forums

XBYTE question

123457»

Comments

  • cgraceycgracey Posts: 14,133
    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. :)
  • Cluso99Cluso99 Posts: 18,069
    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: 2,120
    edited 2018-10-23 22:00
    deleted
Sign In or Register to comment.