public ASMEditor() { InitializeComponent(); Read_LengthBox.Maximum = Core.CurrentROMSize; CurrentCPU = new ASM.RegisterSet(new Pointer(), true); CurrentStack = new BindingList <string>(); Test_Stack.DataSource = CurrentStack; }
private void Test_ReadLineButton_Click(object sender, EventArgs e) { int currentLine = CodeBox.SelectedIndices[0]; try { CurrentCPU = CurrentASM[currentLine].Read(CurrentCPU); } catch (Exception ex) { Program.ShowError("Could not properly read selected line.", ex); return; } Pointer address = new Pointer(CurrentCPU.PC, false, true); if (address - 2 == CurrentASM[currentLine].Address) { CodeBox.Items[currentLine + 1].Selected = true; CodeBox.Select(); } else { Read_ThumbRadioButton.Checked = CurrentCPU.T; Read_AddressBox.Value = address; Try : try { Core_Dissassemble( Read_AddressBox.Value, (int)Read_LengthBox.Value, Read_ThumbRadioButton.Checked); Core_LoadValues(); } catch { Read_LengthBox.Value += 2; goto Try; } CodeBox.Items[0].Selected = true; CodeBox.Select(); } Core_LoadValues(); }
private void Test_ResetCPUButton_Click(object sender, EventArgs e) { CurrentCPU = new ASM.RegisterSet(Read_AddressBox.Value, Read_ThumbRadioButton.Checked); Core_LoadValues(); }