Ejemplo n.º 1
0
        private void updateStackPanel()
        {
            // clear rows
            stackDataGridView.Rows.Clear();

            uint numRows     = 10;         // diplay top 10 instructions in stack
            uint address     = 0x7000 - 4; // -4 because the stack is a full descending stack
            uint instruction = 0;

            // add rows to the stack panel
            for (uint i = 0; i <= numRows; i++)
            {
                instruction = computer.getStackInstruction(address);
                stackDataGridView.Rows.Add("0x" + address.ToString("X").PadLeft(8, '0'), instruction.ToString("X").PadLeft(8, '0'));
                address += 4;
            }
        }