示例#1
0
        private void toASMToolStripMenuItem_Click(object sender, EventArgs e)
        {
            CodeForm cf = new CodeForm();

            cf.Data = screen;
            cf.ShowDialog();
        }
示例#2
0
        private void button1_Click(object sender, EventArgs e)
        {
            CodeForm cf   = new CodeForm();
            int      x    = Convert.ToInt32(textBox1.Text);
            int      y    = Convert.ToInt32(textBox2.Text);
            int      cols = Convert.ToInt32(textBox3.Text);
            int      rows = Convert.ToInt32(textBox4.Text);

            for (int i = 0; i < rows; i++)
            {
                cf.CodeText += "\tDB ";
                for (int j = 0; j < cols; j++)
                {
                    if (j != 0)
                    {
                        cf.CodeText += ",";
                    }

                    if (screen[x + j, y + i] == 'X')
                    {
                        cf.CodeText += "0ffh";
                    }
                    else
                    {
                        cf.CodeText += "20h";
                    }
                }
                cf.CodeText += "\r\n";
            }
            cf.ShowDialog();
        }