diff --git a/programs/develop/mtdbg/gui.inc b/programs/develop/mtdbg/gui.inc index 322d979472..4f66331223 100644 --- a/programs/develop/mtdbg/gui.inc +++ b/programs/develop/mtdbg/gui.inc @@ -1702,7 +1702,7 @@ draw_disasm: ; TODO: cleanup of this function, make some global labels local update_disasm_eip: ; test if instruction at eip is showed - mov ecx, [disasm_height_dd+4] + mov ecx, [disasm_height_dd] mov eax, [disasm_start_pos] mov [disasm_cur_pos], eax diff --git a/programs/develop/mtdbg/mtdbg.asm b/programs/develop/mtdbg/mtdbg.asm index 76e9e81d67..fb54d64d20 100644 --- a/programs/develop/mtdbg/mtdbg.asm +++ b/programs/develop/mtdbg/mtdbg.asm @@ -995,25 +995,33 @@ OnStep: ;----------------------------------------------------------------------------- ; Proceed process event +;Here we get [] argument at do step times +OnProceedMultiple: + cmp [bSuspended], 0 + jz OnStep.running + mov [proc_num], 1 + mov esi, [curarg] + test esi, esi + jz .do + cmp byte [esi], 0 + jz .do + call get_hex_number + jc .ret + cmp eax, 0 ; check if lesser or equal than 0 + jle .ret + mov [proc_num], eax + mov [curarg], 0 +.do: + call OnProceed + dec [proc_num] + jnz .do +.ret: + ret + OnProceed: cmp [bSuspended], 0 jz OnStep.running - cmp [proc_num], 0 - jg .procone - mov esi, [curarg] - cmp esi, 0 - jz .procone - cmp byte [esi], 0 - jz .procone - call get_hex_number - jc .ret - cmp eax, 0 ; check if lesser than 0 - jle .ret - mov [proc_num], eax - mov [curarg], 0 - - .procone: mov esi, [_eip] @@: @@ -1107,15 +1115,6 @@ OnProceed: jmp OnStep.doit @@: - mov eax, [proc_num] - dec eax - cmp eax, 0 - jle .ret - mov [proc_num], eax - jmp .procone - - .ret: - mov [proc_num], 0 ret ;----------------------------------------------------------------------------- @@ -2000,7 +1999,7 @@ commands: db 0Bh dd aStep, OnStepMultiple, StepSyntax, StepHelp db 0Bh - dd aProceed, OnProceed, ProceedSyntax, ProceedHelp + dd aProceed, OnProceedMultiple, ProceedSyntax, ProceedHelp db 0Bh dd aCalc, OnCalc, CalcSyntax, CalcHelp db 0Eh