示例#1
0
 /// <summary>
 /// Use this function to define an interrupt you can call using the i command
 /// </summary>
 /// <param name="f">The Interrupt to be executed</param>
 /// <param name="where">Number to be given</param>
 public void DefineInterrupt(Action f, int where)
 {
     for (var i = 0; RegisterInterrupt.Count <= where; i++)
     {
         if (RegisterInterrupt.Count < i)
         {
             RegisterInterrupt.Add(EmptyInterrupt);
         }
     }
     RegisterInterrupt[where] = f;
 }
示例#2
0
 private void Interrupt(int i)
 {
     RegisterInterrupt[GetNFrom(i + 2)]();
 }