ARM Instruction Set: Comparative Instructions Assembler input: CMN|CMP|TEQ|TST , Assembler output: High byte as standard Sixth nybble contains comparative subinstruction code and S flag Bits 21-23 (3-bit cardinal) are comparative subinstruction code Bit 20 is S flag Fifth nybble is first register Fourth nybble is 0, or F if P flag specified Bottom three nybbles depend on base instruction grouping If base instruction code is 0 or 1 then: Bit 4 determines whether shift factor is a register or a constant 0 Shift factor is a constant Bits 7-15 (5-bit cardinal) are shift factor Bits 5-6 are barrel shifter subinstruction code 1 Shift factor is a register Third nybble is register containing shift factor Bit 7 is 0 Bits 5-6 are barrel shifter subinstruction code Low nybble is second register If base instruction code is 2 or 3 then: Bottom three nybbles are an immediate constant The following are valid subinstruction codes: Value Base instruction mnemonic 0 TST 1 TEQ 2 CMP 3 CMN