From a884725d2618c32a6f75ac7d716e77cba47cc4e2 Mon Sep 17 00:00:00 2001 From: "Alexey Teplov (" Date: Tue, 18 Nov 2008 07:29:09 +0000 Subject: [PATCH] small optimization, register use the faster than memory git-svn-id: svn://kolibrios.org@925 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/boot/bootcode.inc | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/kernel/trunk/boot/bootcode.inc b/kernel/trunk/boot/bootcode.inc index e4ec600635..37363eb089 100644 --- a/kernel/trunk/boot/bootcode.inc +++ b/kernel/trunk/boot/bootcode.inc @@ -900,12 +900,8 @@ end if mov word [BPB_SecPerTrk], ax mov ax, word [es:bx+26] mov word [BPB_NumHeads], ax - mov ax, word [es:bx+22] - mov word [BPB_FATSz16], ax mov ax, word [es:bx+17] mov word [BPB_RootEntCnt], ax - mov ax, word [es:bx+11] - mov word [BPB_BytsPerSec], ax mov ax, word [es:bx+14] mov word [BPB_RsvdSecCnt], ax mov ax, word [es:bx+19] @@ -914,9 +910,16 @@ end if mov byte [BPB_SecPerClus], al mov al, byte [es:bx+16] mov byte [BPB_NumFATs], al +; 18.11.2008 + mov ax, word [es:bx+22] + mov word [BPB_FATSz16], ax + mov cx, word [es:bx+11] + mov word [BPB_BytsPerSec], cx + ; count of clusters in FAT12 ((size_of_FAT*2)/3) - mov ax, word [BPB_FATSz16] - mov cx, word [BPB_BytsPerSec] +; mov ax, word [BPB_FATSz16] +; mov cx, word [BPB_BytsPerSec] +;end 18.11.2008 xor dx, dx mul cx shl ax, 1