Each instruction consists of one or more bit fields. Most important are opcode and format, which have variable length and identifies the certain instruction and its format, i.e. location of other bit fields in it. Those other fields, in turn, have constant length and encode various aspects of the instruction orthogonally, or independently of each other. Those fields are:
- b − 1-bit field. In instructions than can work with variable-sized operands, this field’s value signifies word (0) or byte (1) operand size,
- mode − 2-bit field, which sets memory addressing mode. Its values are 0 for indirect mode, 1 for offset mode, 2 for post-increment mode, and 3 for pre-decrement mode,
- mem − 4-bit field, which selects a common-purpose register to address memory in conjunction with mode field,
- reg − 4-bit field, which selects a common-purpose register as an operand,
- cond − 4-bit
condition field, that used in SKIP instruction,
Value Mnemonic Description Flags 0b0000 Q (Z) Equal (zero) Z == 1 0b0001 NQ (NZ) Not equal (not zero) Z == 0 0b0010 C Carry flag is set C == 1 0b0011 NC Carry flag is clear C == 0 0b0100 NEG Negative N == 1 0b0101 POS Positive N == 0 0b0110 V Overflow detected V == 1 0b0111 NV Overflow not detected V == 0 0b1000 HI Unsigned greater than C == 1 & Z == 0 0b1001 LS Unsigned less than or equal C == 0 | Z == 1 0b1010 GTE Signed greater than or equal N == V 0b1011 L Signed less than N ≠ V 0b1100 GT Signed greater than Z == 0 & N == V 0b1101 LE Signed less than or equal Z == 1 | N ≠ V 0b1110 O Odd P == 1 0b1111 E Even P == 0 - offset − 10-bit field, that used in short relative jump as a signed number of words.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.