Shop OBEX P1 Docs P2 Docs Learn Events
Using WR with a few odd-ball opcodes — Parallax Forums

Using WR with a few odd-ball opcodes

tonyp12tonyp12 Posts: 1,951
edited 2013-04-12 17:05 in Propeller 1
TEST,CMP and JMP are just NR versions of AND,SUB and JMPRET

But these 5 odd-balls don't have a WR parent, what would happened if you did include WR?

110000 000i CMPS
110001 000i CMPSX
110011 000i CMPX
111010 000i TJNZ
111011 000i TJZ

From a previous post about jmp tables, less longs used would be if there was a DJZ
But I don't think a TJZ with WR could emulate that?

Mov index,pointer wz
if_z jmp #loc0
djz index,#loc1 ' there is no djz
djz index,#loc2
djz index,#loc3

Comments

  • kuronekokuroneko Posts: 3,623
    edited 2013-04-12 17:05
    CMPS wr         same as SUBS  | signed borrow instead of signed overflow
    CMPSX wr        same as SUBSX |
    CMPX wr         same as SUBX
    TJNZ wr         |
    TJZ wr          | same behaviour, dst is rewritten (useful for counter p/resets)
    
Sign In or Register to comment.