Example #1
0
        private static string CreateUser(TableLexeme Lexeme, int ByteCount)
        {
            TableUser User   = TableUser.GetByName(Lexeme.Name);
            string    result = Convert.ToString(Convert.ToInt32(User.Offset), 16).ToUpper();

            result = CheckCharCount(result, ByteCount);
            return(result);
        }
Example #2
0
        public static void AddTableUser(int byteCount)
        {//if username present
            if (TableSentence.Item.NameOrLabelNumber != 0 && LookOver.IsGoFirst &&
                TableSegment.ActiveSegment() != null)
            {
                string userName   = TableLexeme.Label().Name;
                int    userOffset = TableSegment.ActiveSegment().Offset;

                if (TableUser.GetByName(userName) != null)
                {
                    Errors.Add(13);//@error user name already exists in the table
                }
                else
                {
                    new TableUser(userName, userOffset, TableSegment.ActiveSegmentNumber, byteCount);
                }
            }
        }
Example #3
0
        private static void DoOpName(TableLexeme Lexeme)
        {
            TableUser user = TableUser.GetByName(Lexeme.Name);

            if (user != null)
            {
                TableOperand.GetByNumbers(4, isFirst).Modify(user.Number, -1);
            }
            else
            {
                TableOperand.GetByNumbers(5, isFirst).Modify(-1, -1);
            }
            if (TableLexeme.MnemName() == "DD")
            {
                AnalysisGrammar.AddTableUser(4);
            }
            else
            {
                AnalysisGrammar.AddTableUser(-1);
            }
        }