Пример #1
0
        ////private static void ThrowOperandOutOfRangeException(int operandRel, int sourceLine) {
        ////    int outOfRangeAmt;
        ////    if (operandRel < 0)
        ////        outOfRangeAmt = Math.Abs(operandRel + 128);
        ////    else
        ////        outOfRangeAmt = Math.Abs(operandRel - 127);
        ////    throw new OperandOutOfRangeException("Operand is out of range (by " + outOfRangeAmt.ToString("X") + ")", sourceLine);
        ////}

        protected override void ProcessCurrentLabel()
        {
            base.ProcessCurrentLabel();

            // Nothing to do with labels for second pass.
            var label = Assembly.Labels[iNextLabel];

            bool isAnonymous = label.name != null && label.name.StartsWith("~");

            if (!isAnonymous)
            {
                if (label.address < 0x8000)
                {
                    // RAM
                    Assembler.AddDebugLabel(-1, CurrentAddress, label.name);
                }
                if (Bank >= 0)
                {
                    // ROM
                    Assembler.AddDebugLabel(Bank, CurrentAddress, label.name);
                }
            }
        }