public override void paso2(DataGridView dataGridViewIntermedio)
        {
            bool   x;
            int    resto;
            string aux;

            char[]   cadena;
            string[] linea;
            this.codigoObj = new string[this.intermedio.Count];
            for (int i = 0; i < this.intermedio.Count; i++)
            {
                linea = this.intermedio[i].Split('\t');
                if (!string.IsNullOrEmpty(linea[2]))
                {
                    if (!this.lineasError[i])
                    {
                        if (this.instrucciones.Keys.Contains(linea[2]) | linea[2].Equals("WORD") | linea[2].Equals("BYTE"))
                        {
                            switch (linea[2])
                            {
                            case "BYTE":
                                #region Byte
                                if (linea[3].Contains("X") | linea[3].Contains("x"))
                                {
                                    //FE
                                    codigoObj[i] = linea[3].Replace("X'", "");
                                    codigoObj[i] = codigoObj[i].Replace("x'", "");
                                    codigoObj[i] = codigoObj[i].Replace("'", "");
                                }
                                else
                                {
                                    codigoObj[i] = linea[3].Replace("C'", "");
                                    codigoObj[i] = codigoObj[i].Replace("c'", "");
                                    codigoObj[i] = codigoObj[i].Replace("'", "");
                                    codigoObj[i] = MetodosAuxiliares.ASCIIToHexadecimal(codigoObj[i]);
                                }
                                #endregion
                                break;

                            case "WORD":
                                #region WORD
                                x            = linea[3].Contains("H") | linea[3].Contains("h");
                                codigoObj[i] = linea[3].Replace("h", "");
                                codigoObj[i] = linea[3].Replace("H", "");
                                if (!x)
                                {
                                    codigoObj[i] = MetodosAuxiliares.decimalAHexadecimal(int.Parse(codigoObj[i]));
                                }
                                if (codigoObj[i].Length < 6)
                                {
                                    resto = 6 - codigoObj[i].Length;
                                    aux   = "";
                                    for (int j = 0; j < resto; j++)
                                    {
                                        aux += "0";
                                    }
                                    codigoObj[i] = aux + codigoObj[i];
                                }
                                else if (codigoObj[i].Length > 6)
                                {
                                    codigoObj[i] = codigoObj[i].Substring(0, 6);
                                }
                                #endregion
                                break;

                            default:
                                #region Instrucciones
                                if (!linea[2].Equals("RSUB"))
                                {
                                    linea[3] = linea[3].Replace(" ", "");
                                    x        = linea[3].Contains(",X") | linea[3].Contains(",x");
                                    linea[3] = linea[3].Replace(",X", "");
                                    linea[3] = linea[3].Replace(",x", "");
                                    if (this.tabSim.Keys.Contains(linea[3]))
                                    {
                                        codigoObj[i] = this.instrucciones[linea[2]] + MetodosAuxiliares.decimalAHexadecimal(this.tabSim[linea[3]]);
                                    }
                                    else
                                    {
                                        codigoObj[i] = this.instrucciones[linea[2]] + "7FFF";
                                    }
                                    if (x)
                                    {
                                        codigoObj[i] = MetodosAuxiliares.hexadecimalABinario(codigoObj[i]);
                                        cadena       = codigoObj[i].ToCharArray();
                                        cadena[8]    = '1';
                                        codigoObj[i] = new string(cadena);
                                        codigoObj[i] = MetodosAuxiliares.decimalAHexadecimal(MetodosAuxiliares.binarioADecimal(codigoObj[i]));
                                    }
                                }
                                else
                                {
                                    codigoObj[i] = this.instrucciones[linea[2]] + "0000";
                                }
                                #endregion
                                break;
                            }
                        }
                        else
                        {
                            codigoObj[i] = "---";
                        }
                    }
                    else
                    {
                        codigoObj[i] = "Error: de Sintaxis";
                    }
                }
                else
                {
                    this.codigoObj[i] = "Error: Linea vacia";
                }
            }
            this.ensamblaIntermedio(dataGridViewIntermedio);
            this.creaArchivoObj();
        }
        public override void paso2(DataGridView dataGridViewIntermedio)
        {
            bool x;
            int resto;
            string aux;
            string[] linea;
            string[] lineaSig;
            this.asignaBase();
            this.codigoObj = new string[this.intermedio.Count];
            for (int i = 0; i < this.intermedio.Count; i++)
            {
                linea = this.intermedio[i].Split('\t');
                if (!string.IsNullOrEmpty(linea[2]))
                {
                    if (!this.lineasError[i])
                    {
                        if (this.instruccionesFormato1.Keys.Contains(linea[2]))
                        {
                            this.codigoObj[i] = this.instruccionesFormato1[linea[2]];
                        }
                        else if(this.instruccionesFormato2.Keys.Contains(linea[2]))
                        {
                            this.codigoObj[i] = this.ensamblaInstruccion2(linea[2], linea[3]);
                        }
                        else if (this.instruccionesFormato3.Keys.Contains(linea[2]))
                        {
                            lineaSig = this.intermedio[i+1].Split('\t');
                            this.codigoObj[i] = this.ensamblaInstruccion3(linea[2], linea[3], lineaSig[0]);
                        }
                        else if (this.instruccionesFormato4.Keys.Contains(linea[2]))
                        {
                            this.codigoObj[i] = this.ensamblaInstruccion4(linea[2], linea[3]);
                        }
                        else
                        {
                            switch (linea[2])
                            {
                                case "BYTE":
                                    #region Byte
                                    if (linea[3].Contains("X") | linea[3].Contains("x"))
                                    {
                                        //FE
                                        codigoObj[i] = linea[3].Replace("X'", "");
                                        codigoObj[i] = codigoObj[i].Replace("x'", "");
                                        codigoObj[i] = codigoObj[i].Replace("'", "");
                                        if (codigoObj[i].Length % 2 != 0)
                                        {
                                            codigoObj[i] = "0" + codigoObj[i];
                                        }
                                    }
                                    else
                                    {
                                        codigoObj[i] = linea[3].Replace("C'", "");
                                        codigoObj[i] = codigoObj[i].Replace("c'", "");
                                        codigoObj[i] = codigoObj[i].Replace("'", "");
                                        codigoObj[i] = MetodosAuxiliares.ASCIIToHexadecimal(codigoObj[i]);
                                    }
                                    #endregion
                                break;
                                case "WORD":
                                    #region WORD
                                    x = linea[3].Contains("H") | linea[3].Contains("h");
                                    codigoObj[i] = linea[3].Replace("h", "");
                                    codigoObj[i] = linea[3].Replace("H", "");
                                    if (!x)
                                    {
                                        codigoObj[i] = MetodosAuxiliares.decimalAHexadecimal(int.Parse(codigoObj[i]));
                                    }
                                    if (codigoObj[i].Length < 6)
                                    {
                                        resto = 6 - codigoObj[i].Length;
                                        aux = "";
                                        for (int j = 0; j < resto; j++)
                                        {
                                            aux += "0";
                                        }
                                        codigoObj[i] = aux + codigoObj[i];
                                    }
                                    else if (codigoObj[i].Length > 6)
                                    {
                                        codigoObj[i] = codigoObj[i].Substring(0, 6);
                                    }
                                    #endregion
                                break;
                                default:
                                    this.codigoObj[i] = "---";
                                break;
                            }

                        }
                    }
                    else
                    {
                        codigoObj[i] = "Error: de Sintaxis";
                    }
                }
                else
                {
                    this.codigoObj[i] = "Error: Linea vacia";
                }
            }
            this.ensamblaIntermedio(dataGridViewIntermedio);
            this.creaArchivoObj();
        }