See Introduction

Instruction###

Design######
  1. Code Format

Text Code

//OPCODE r,x,address[,i]
public static final int INSTR_FORMAT_R_X_ADD = 1;
//OPCODE x,address[,i]
public static final int INSTR_FORMAT_X_ADD = 2;
//OPCODE cc,x,address[,i]
public static final int INSTR_FORMAT_CC_X_ADD = 3;
//OPCODE immed
public static final int INSTR_FORMAT_IMMED = 4;
//OPCODE r,immed
public static final int INSTR_FORMAT_R_IMMED = 5;
//OPCODE rx,ry
public static final int INSTR_FORMAT_RX_RY = 6;
//OPCODE rx
public static final int INSTR_FORMAT_RX = 7;
//OPCODE r,devid
public static final int INSTR_FORMAT_R_DEVID = 8;
//OPCODE r,count,L/R,A/L
public static final int INSTR_FORMAT_R_COUNT_LR_AL = 9;

Binary Code

//OPCODE(6),R(2),IX(2),I(1),ADD(7)
public static final int BINARY_STYLE_R_IX_I_ADD = 1;
//OPCODE(6),Rx(2),Ry(2),(8)
public static final int BINARY_STYLE_RX_RY = 2;
//OPCODE(6),(2),R(2),A/L(1),L/R(1),(1),Count(5)
public static final int BINARY_STYLE_R_AL_LR_COUNT = 3;
//OPCODE(6),(2),R(2),(3),DevId(5)
public static final int BINARY_STYLE_R_DEVID = 4;
//OPCODE(6),(2),FR(2),(3),DevId(5) used for floating and vector opetations (PART4)
public static final int BINARY_STYLE_FR_IX_I_ADD = 5;

1.Divide each instruction into circles

for example:

CODE