From 1c4e6a64d36ae4829b16daef4fee1eac9c40c722 Mon Sep 17 00:00:00 2001 From: "Marat Zakiyanov (Mario79)" Date: Tue, 15 Apr 2014 06:16:28 +0000 Subject: [PATCH] FSPEED - fix overflow of multiplying. git-svn-id: svn://kolibrios.org@4837 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/fs/fspeed/fspeed.asm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/programs/fs/fspeed/fspeed.asm b/programs/fs/fspeed/fspeed.asm index 79ed0ec5c..fb1496085 100644 --- a/programs/fs/fspeed/fspeed.asm +++ b/programs/fs/fspeed/fspeed.asm @@ -228,8 +228,11 @@ read_chunk: ;-------------------------------------- .end: mov eax,[ebp+8] + xor edx,edx imul eax,ecx - shr eax,10+4 + shr eax,10+4 ;div 1024 ; div 16 + shl edx,18 + add eax,edx mov [ebp+4],eax ; speed KB/s DEBUGF 1,'FSPEED: chunk size: %s iterations: %d speed: %d KB/s\n',[ebp],ecx,eax mcall 68,13,[fileread.return]