diff --git a/kernel/trunk/core/heap.inc b/kernel/trunk/core/heap.inc index d3811281c4..8f4389ae7e 100644 --- a/kernel/trunk/core/heap.inc +++ b/kernel/trunk/core/heap.inc @@ -214,8 +214,7 @@ found: btr [ebx], eax mov [mem_block_start],ebx sub ebx, mem_block_map - shl ebx, 3 - add eax,ebx + lea eax,[eax+ebx*8] shl eax, 5 add eax, [mem_block_arr] dec [free_blocks] diff --git a/kernel/trunk/core/memory.inc b/kernel/trunk/core/memory.inc index 9c80be9aa6..7d01491648 100644 --- a/kernel/trunk/core/memory.inc +++ b/kernel/trunk/core/memory.inc @@ -172,8 +172,7 @@ proc alloc_page btr [ebx], eax mov [page_start],ebx sub ebx, sys_pgmap - shl ebx, 3 - add eax,ebx + lea eax, [eax+ebx*8] shl eax, 12 dec [pg_data.pages_free] popfd diff --git a/kernel/trunk/drivers/ati2d.asm b/kernel/trunk/drivers/ati2d.asm index d100544e13..ffa4afdd19 100644 --- a/kernel/trunk/drivers/ati2d.asm +++ b/kernel/trunk/drivers/ati2d.asm @@ -430,8 +430,7 @@ proc video_alloc mov [cursor_start],ebx sub ebx, cursor_map - shl ebx, 3 - add eax,ebx + lea eax,[eax+ebx*8] shl eax,14 add eax, LFBAddress+CURSOR_IMAGE_OFFSET diff --git a/kernel/trunk/gui/event.inc b/kernel/trunk/gui/event.inc index be0e192d4e..f5cb675d26 100644 --- a/kernel/trunk/gui/event.inc +++ b/kernel/trunk/gui/event.inc @@ -44,8 +44,7 @@ proc alloc_event btr [ebx], eax mov [event_start],ebx sub ebx, event_map - shl ebx, 3 - add eax,ebx + lea eax,[eax+ebx*8] shl eax,5 add eax, [events] popfd diff --git a/kernel/trunk/video/cursors.inc b/kernel/trunk/video/cursors.inc index e11c627e76..58f7f8a2e4 100644 --- a/kernel/trunk/video/cursors.inc +++ b/kernel/trunk/video/cursors.inc @@ -282,8 +282,7 @@ proc alloc_cursor mov [cursor_start],ebx sub ebx, cursor_map - shl ebx, 3 - add eax,ebx + lea eax,[eax+ebx*8] shl eax,3 lea eax,[cursors+eax+eax*2]