Ejemplo n.º 1
0
        public static bool ParseOoRrrMmm(FAsmCommand cmd, int w, int code, FBytes memory, int offset)
        {
            int oo  = (code & 0xC0) >> 6;
            int rrr = (code & 0x38) >> 3;
            int mmm = (code & 0x07);

            switch (oo)
            {
            case 0x00:
                if (mmm == 0x06)
                {
                    cmd.Size      += RInt.BYTE_SIZE;
                    cmd.Attributes = new object[] { memory.GetInt32(offset) };
                }
                return(true);

            case 0x01:
                cmd.Size      += RByte.BYTE_SIZE;
                cmd.Attributes = new object[] { RAsm.RegName(w, rrr), memory[offset] };
                return(true);

            case 0x02:
                cmd.Size      += RInt.BYTE_SIZE;
                cmd.Attributes = new object[] { RAsm.RegName(w, rrr), memory.GetInt32(offset) };
                return(true);

            case 0x03:
                string des = RAsm.RegName(w, rrr);
                string src = RAsm.FuncName(w, oo, mmm);
                cmd.Attributes = new object[] { des, src };
                return(true);
            }
            return(false);
        }
Ejemplo n.º 2
0
        public static string[] OoRrrMmmName(int w, int code)
        {
            int    oo  = (code & 0xC0) >> 6;
            int    rrr = (code & 0x38) >> 3;
            int    mmm = (code & 0x07);
            string p1  = RAsm.RegName(w, rrr);
            string p2  = RAsm.FuncName(w, oo, mmm);

            return(new string[] { p1, p2 });
        }