Esempio n. 1
0
 public void Ld(I16Type target, short offset, R8Type source)
 {
     if (offset < -128 || offset > 127)
     {
         throw new NotImplementedException($"Index addressing offset {offset} not supported");
     }
     AddInstruction(new Instruction(Opcode.Ld, "(" + target.ToString() + string.Format("{0:+#;-#;+0}", offset) + "), " + source.ToString()));
 }
Esempio n. 2
0
 public static Instruction Or(R8Type target, R8Type source)
 {
     return(new Instruction(Opcode.Or, target.ToString() + ", " + source.ToString()));
 }
Esempio n. 3
0
 public static Instruction LdInd(R16Type target, R8Type source)
 {
     return(new Instruction(Opcode.Ld, "(" + target.ToString() + "), " + source.ToString()));
 }
Esempio n. 4
0
 public static Instruction Ld(I16Type target, short offset, R8Type source)
 {
     return(new Instruction(Opcode.Ld, "(" + target.ToString() + string.Format("{0:+#;-#;+0}", offset) + "), " + source.ToString()));
 }
Esempio n. 5
0
 public static Instruction Ld(R8Type target, I16Type source, short offset)
 {
     return(new Instruction(Opcode.Ld, target.ToString() + ", (" + source.ToString() + string.Format("{0:+#;-#;+0}", offset) + ")"));
 }
Esempio n. 6
0
 public void Ld(R8Type target, R8Type source)
 {
     AddInstruction(new Instruction(Opcode.Ld, target.ToString() + ", " + source.ToString()));
 }
Esempio n. 7
0
 public void Or(R8Type target)
 {
     AddInstruction(new Instruction(Opcode.Or, target.ToString()));
 }
Esempio n. 8
0
 public void LdInd(R16Type target, R8Type source)
 {
     AddInstruction(new Instruction(Opcode.Ld, "(" + target.ToString() + "), " + source.ToString()));
 }