Exemplo n.º 1
0
        public void Init(DisASMInnerControl callbackWindow, string code)
        {
            code = code.Trim();

            this.EditAddr        = U.atoh(code);
            this.CallbackASMForm = callbackWindow;

            string currentCode = ParseCodeOnly(code);

            currentCode = currentCode.Replace("//", "@").Replace("# ", "@ ").Replace(";", "@");

            string asm = ".thumb          @Do not delete this two line.\r\n";

            asm += ".equ origin, " + U.To0xHexString(this.EditAddr) + "\r\n";
            asm += "\r\n";
            asm += currentCode + "\r\n";

            this.Code.Text = asm;
            this.Code.Select(asm.Length, 0);
            InputFormRef.WriteButtonToYellow(this.AllWriteButton, false);
        }
Exemplo n.º 2
0
        public void JumpTo(uint addr)
        {
            int    existingTabIndex;
            string name = ConvertName(addr, out existingTabIndex);

            if (existingTabIndex >= 0)
            {//既存タブがある
                this.MainTab.SelectedIndex = existingTabIndex;
                return;
            }

            DisASMInnerControl f = new DisASMInnerControl();

            InputFormRef.InitControl(f, this.ToolTip);
            f.JumpTo(addr);

            this.MainTab.Add(name, f, addr);
            f.Navigation += OnNavigation;

            DisASMForm_Resize(null, null);

            f.SetFocus();
        }