/***************************Successor*********************************** * Successor(char RegNumber, ref Load obj, ref GroupBox gb) Function is * * used to increase the current value in Register by 1 * *- RegNumber: Represent the Index of Register place in memory * ************************************************************************/ private void Successor(char RegNumber, ref Load obj, ref GroupBox gb) { int index = int.Parse(RegNumber.ToString()); int Regvalue = obj.Get_RegArray(index); Regvalue++; obj.Set_RegArray(index, Regvalue.ToString()); }
/********************************* Trans ********************************************* * Trans(char Reg1_Number, char Reg2_Number, ref Load obj, ref GroupBox gb) Function is* * used to Transfere the value from Reg1_number and place it Reg2_Number * * RegNumber: Represent the Index of Register place in memory * *************************************************************************************/ private void Trans(char Reg1_Number, char Reg2_Number, ref Load obj, ref GroupBox gb) { int Reg1_index = int.Parse(Reg1_Number.ToString()); int Reg2_index = int.Parse(Reg2_Number.ToString()); int temp = obj.Get_RegArray(Reg1_index); obj.Set_RegArray(Reg2_index, temp.ToString()); }
/***************************Successor*********************************** * Successor(char RegNumber, ref Load obj, ref GroupBox gb) Function is * * used to increase the current value in Register by 1 * *- RegNumber: Represent the Index of Register place in memory * ************************************************************************/ private void Successor(char RegNumber, ref Load obj, ref GroupBox gb) { int index = int.Parse(RegNumber.ToString()); int Regvalue = obj.Get_RegArray(index); Regvalue++; obj.Set_RegArray(index, Regvalue.ToString()); }
/********************************* Trans ********************************************* *Trans(char Reg1_Number, char Reg2_Number, ref Load obj, ref GroupBox gb) Function is* *used to Transfere the value from Reg1_number and place it Reg2_Number * *RegNumber: Represent the Index of Register place in memory * *************************************************************************************/ private void Trans(char Reg1_Number, char Reg2_Number, ref Load obj, ref GroupBox gb) { int Reg1_index = int.Parse(Reg1_Number.ToString()); int Reg2_index = int.Parse(Reg2_Number.ToString()); int temp = obj.Get_RegArray(Reg1_index); obj.Set_RegArray(Reg2_index, temp.ToString()); }
/******************* Funcitions-Documentation *********************** *- obj: is where the Function get or set the Data of Register * * and is passed by Ref to apply the modification to the original * * Load object. * *-gb: is the group box that contain the textbox controls * * that Represent the Registers(set Data or Show its Contained Value * * passed by Ref to apply changes to the original controls(textbox's)* *********************************************************************/ /******************************Zero********************************** * Zero(char RegNumber,,ref Load obj,ref GroupBox gb) Function is * * used to convert the Register Value Form n to zero * *- RegNumber: Represent the Index of Register place in memory * ********************************************************************/ private void Zero(char RegNumber, ref Load obj, ref GroupBox gb) { int index = int.Parse(RegNumber.ToString()); obj.Set_RegArray(index, "0"); }
/******************* Funcitions-Documentation *********************** *- obj: is where the Function get or set the Data of Register * * and is passed by Ref to apply the modification to the original * * Load object. * *-gb: is the group box that contain the textbox controls * * that Represent the Registers(set Data or Show its Contained Value * * passed by Ref to apply changes to the original controls(textbox's)* *********************************************************************/ /******************************Zero********************************** * Zero(char RegNumber,,ref Load obj,ref GroupBox gb) Function is * * used to convert the Register Value Form n to zero * *- RegNumber: Represent the Index of Register place in memory * ********************************************************************/ private void Zero(char RegNumber, ref Load obj, ref GroupBox gb) { int index = int.Parse(RegNumber.ToString()); obj.Set_RegArray(index, "0"); }