//Function for an simple kioutput
        void HDDKi()
        {
            CNibble nibble = inputNumbers[inputNumbers.Count - 1];

            inputNumbers.RemoveAt(inputNumbers.Count - 1);
            outputNumbers.Add(nibble);
        }
        //Send a number to the GPU
        public void sendNumber()
        {
            CNibble outputNumber = outputNumbers[outputNumbers.Count - 1];

            outputNumbers.RemoveAt(outputNumbers.Count - 1);
            outputNumber.setDestination("GPU");
            GPU.GetComponent <CGPUConnection>().insertNumber(outputNumber);
        }
        //Get an number from the inputstack
        public CNibble getNumber()
        {
            CNibble nibble = new CNibble();

            nibble = inputNumbers[inputNumbers.Count - 1];
            inputNumbers.RemoveAt(inputNumbers.Count - 1);
            return(nibble);
        }
        //Sends a number to the HDD
        public void sendNumber()
        {
            CNibble cNibble      = new CNibble();
            string  outputNumber = "";

            outputNumber = outputNumbers[outputNumbers.Count - 1];
            outputNumbers.RemoveAt(outputNumbers.Count - 1);
            cNibble.setString(outputNumber);
            cNibble.setDestination("HDD");
            HDD.GetComponent <CHDDConnection>().insertNumber(cNibble);
        }
Exemple #5
0
 //Insert number to the inputstack
 public void insertNumber(CNibble _value)
 {
     inputNumbers.Add(_value);
 }
 //Insert number to the outputstack
 public void setNumber(CNibble _value)
 {
     outputNumbers.Add(_value);
 }
 //Insert Number to the input storage
 public void insertNumber(CNibble _nibble)
 {
     inputNumbers.Add(_nibble);
 }