simon987 / Much-Assembly-Required

Assembly programming game
GNU General Public License v3.0
930 stars 87 forks source link

Missing aliases for Jcc instruction family #190

Open kevinramharak opened 5 years ago

kevinramharak commented 5 years ago

Most instructions at http://www.ousob.com/ng/iapx86/ng10482.php are implemented. (as far as i can see only parity is missing which is fine). The listed aliases how ever are still missing. With #189 these instructions can be implemented without much effort.

All that needs to be done is to check which of the instructions are implemented and what aliases should be added to the MAR instruction set.

Bonus points for updating the wiki Instruction Set

kevinramharak commented 5 years ago

@simon987 Im looking at the code and notice that some instructions rely on the IP in the CPU. Are you planning on abstracting that out of the CPU? Since some instructions now rely on a CPU parameter.

Keeping this list for bookkeeping

JnzInstruction.java:   public static final int OPCODE = 13;
Jne

JzInstruction.java:    public static final int OPCODE = 14;
Je

JgInstruction.java:    public static final int OPCODE = 15;
Jnle

JgeInstruction.java:   public static final int OPCODE = 16;
Jnl

JlInstruction.java:    public static final int OPCODE = 17;
Jnge

JleInstruction.java:   public static final int OPCODE = 18;
Jng

JsInstruction.java:    public static final int OPCODE = 26;

JnsInstruction.java:   public static final int OPCODE = 27;

JncInstruction.java:   private static final int OPCODE = 34;
Jae
Jnb

JcInstruction.java:    private static final int OPCODE = 33;
Jb
Jnae

JoInstruction.java:    private static final int OPCODE = 36;

JnoInstruction.java:   private static final int OPCODE = 37;

JaInstruction.java:    public static final int OPCODE = 46;
Jnbe

JnaInstruction.java:   public static final int OPCODE = 47;
Jbe