Ejemplo n.º 1
0
        public TableSentence(string mnem, int nameNum, int mnemNum, int[,] opers, TableAsmWords.Types type)
        {
            Type = type;
            Mnem = mnem;
            NameOrLabelNumber = nameNum;
            MnemNumber        = mnemNum;
            for (int k = 0; k < 6; k++)
            {
                for (int l = 0; l < 2; l++)
                {
                    Operands[k, l] = opers[k, l];
                }
            }

            Item = this;

            if (Table.Rows.Count <= 0)
            {
                Table.Rows.Add(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
            }
            Table.Rows[0][0] = NameOrLabelNumber;
            Table.Rows[0][1] = MnemNumber;
            for (int p = 0; p < 6; p++)
            {
                Table.Rows[0][p * 2 + 2] = Operands[p, 0];
                Table.Rows[0][p * 2 + 3] = Operands[p, 1];
            }
        }
Ejemplo n.º 2
0
        public TableAsmWords.Types Type = TableAsmWords.Types.пусто; //тип предложения

        #endregion Fields

        #region Constructors

        public TableSentence(string mnem, int nameNum, int mnemNum, int[,] opers, TableAsmWords.Types type)
        {
            Type = type;
            Mnem = mnem;
            NameOrLabelNumber = nameNum;
            MnemNumber = mnemNum;
            for (int k = 0; k < 6; k++)
                for (int l = 0; l < 2; l++)
                    Operands[k, l] = opers[k, l];

            Item = this;

            if (Table.Rows.Count <= 0)
                Table.Rows.Add(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
            Table.Rows[0][0] = NameOrLabelNumber;
            Table.Rows[0][1] = MnemNumber;
            for (int p = 0; p < 6; p++)
            {
                Table.Rows[0][p * 2 + 2] = Operands[p, 0];
                Table.Rows[0][p * 2 + 3] = Operands[p, 1];
            }
        }