42 www.ubicom.com IP2022 Data Sheet subc w,fr W = fr - C - W Subtract carry,W from fr into W 1 0100 100f ffff ffff   C, DC, Z swap fr fr = fr3:0 || fr7:4 Swap high,low nibbles of fr into fr 1 0011 101f ffff ffff None swap w,fr W = fr3:0 || fr7:4 Swap high,low nibbles of fr into
W
1 0011 100f ffff ffff None test fr if fr = 0 then Z = 1
else Z = 0
Test fr for zero and update Z 1 0010 001f ffff ffff Z Table 4-3  Arithmetic and Shift Instructions (continued) Assembler Syntax Pseudocode Definition Description Cycles Opcode    Flags
Affected
Table 4-4  Bit Operation Instructions Assembler Syntax Pseudocode Definition Description Cycles Opcode    Flags
Affected
clrb fr,bit fr,bit = 0 Clear bit in fr 1 1000 bbbf ffff ffff None sb fr,bit if fr,bit = 1 then skip    Test bit in fr then skip if set    1 or
2 (skip)
1011 bbbf ffff ffff None setb fr,bit fr,bit = 1 Set bit in fr 1 1001 bbbf ffff ffff None snb fr,bit if fr,bit = 0 then skip    Test bit in fr then skip if clear    1 or
2 (skip)
1010 bbbf ffff ffff None Table 4-5  Data Movement Instructions Assembler Syntax Pseudocode Definition Description Cycles Opcode    Flags
Affected
mov fr,w fr = W Move W into fr 1 0000 001f ffff ffff None mov w,fr W = fr Move fr into W 1 0010 000f ffff ffff Z mov w,#lit8 W = lit8 Move literal into W 1 0111 1100 kkkk kkkk None push fr (SP) = fr, then
SP = SP - 1
Move fr onto top of stack 1 0100 010f ffff ffff None push #lit8 (SP) = lit8, then
SP = SP - 1
Move literal onto top of stack 1 0111 0100 kkkk kkkk None pop fr fr = (SP + 1), then
SP = SP + 1
Move top of stack + 1 into fr 1 0100 011f ffff ffff None