Пример #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()));
 }
Пример #2
0
 public static Instruction Or(R8Type target, R8Type source)
 {
     return(new Instruction(Opcode.Or, target.ToString() + ", " + source.ToString()));
 }
Пример #3
0
 public static Instruction LdInd(R16Type target, R8Type source)
 {
     return(new Instruction(Opcode.Ld, "(" + target.ToString() + "), " + source.ToString()));
 }
Пример #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()));
 }
Пример #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) + ")"));
 }
Пример #6
0
 public void Ld(R8Type target, R8Type source)
 {
     AddInstruction(new Instruction(Opcode.Ld, target.ToString() + ", " + source.ToString()));
 }
Пример #7
0
 public void Or(R8Type target)
 {
     AddInstruction(new Instruction(Opcode.Or, target.ToString()));
 }
Пример #8
0
 public void LdInd(R16Type target, R8Type source)
 {
     AddInstruction(new Instruction(Opcode.Ld, "(" + target.ToString() + "), " + source.ToString()));
 }