From a830f8e6f34f965a9ba087d9a74c70c17765eb97 Mon Sep 17 00:00:00 2001 From: "Sergey Semyonov (Serge)" Date: Mon, 3 Jun 2013 20:16:51 +0000 Subject: [PATCH] kernel: epic fail. revert to old delay_hs code git-svn-id: svn://kolibrios.org@3596 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/kernel.asm | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/kernel/trunk/kernel.asm b/kernel/trunk/kernel.asm index ffa2dcfce7..f6b0e95ab1 100644 --- a/kernel/trunk/kernel.asm +++ b/kernel/trunk/kernel.asm @@ -3850,6 +3850,7 @@ proc delay_hs_unprotected ret endp +if 0 align 4 delay_hs: ; delay in 1/100 secs ; ebx = delay time @@ -3873,6 +3874,35 @@ delay_hs: ; delay in 1/100 secs add esp, 4 popad ret + +else + +align 4 +delay_hs: ; delay in 1/100 secs +; ebx = delay time + push ecx + push edx + + mov edx, [timer_ticks] +;-------------------------------------- +align 4 +newtic: + mov ecx, [timer_ticks] + sub ecx, edx + cmp ecx, ebx + jae zerodelay + + call change_task + + jmp newtic +;-------------------------------------- +align 4 +zerodelay: + pop edx + pop ecx + ret +end if + ;----------------------------------------------------------------------------- align 16 ;very often call this subrutine memmove: ; memory move in bytes