Example #1
0
        /// <summary>
        /// Returns the register name
        /// </summary>
        /// <param name="r"></param>
        /// <returns></returns>
        public static string RegisterToString(x16Register r)
        {
            switch (r)
            {
            case x16Register.AX:
                return("AX");

            case x16Register.CX:
                return("CX");

            case x16Register.DX:
                return("DX");

            case x16Register.BX:
                return("BX");

            case x16Register.SP:
                return("SP");

            case x16Register.BP:
                return("BP");

            case x16Register.SI:
                return("SI");

            case x16Register.DI:
                return("DI");

            default:
                return("none");
            }
        }
Example #2
0
 /// <summary>
 /// get the Byte Value of a register
 /// and for this code here we should die a shame for vs that i cant add  ((byte)r) + aditional  a f*****g shame
 /// </summary>
 /// <param name="r"></param>
 /// <param name="aditional"></param>
 /// <returns></returns>
 public static byte RegisterToByte(x16Register r, byte aditional)
 {
     return((byte)((byte)r + aditional));
 }