From 259f2ffcd10a3e8c2afba55ab417526a1b79b8bb Mon Sep 17 00:00:00 2001 From: CleverMouse Date: Mon, 17 Jan 2011 12:41:44 +0000 Subject: [PATCH] fix parameters saving in floppy bootsector git-svn-id: svn://kolibrios.org@1738 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/bootloader/boot_fat12.asm | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/kernel/trunk/bootloader/boot_fat12.asm b/kernel/trunk/bootloader/boot_fat12.asm index 1c01e8e97d..9f31e383b1 100644 --- a/kernel/trunk/bootloader/boot_fat12.asm +++ b/kernel/trunk/bootloader/boot_fat12.asm @@ -194,17 +194,17 @@ obtain_cluster: mov ax,0e2eh ; ah=0eh (teletype), al='.' xor bh,bh int 10h - - ; convert cluster number to sector number - mov ax,bp ; data cluster to read - sub ax,2 - xor bx,bx - mov bl,byte [BPB_SecPerClus+boot_program] - mul bx - add ax,word [data_start+boot_program] pop bx writesec: + ; convert cluster number to sector number + mov ax,bp ; data cluster to read + sub ax,2 + xor dx,dx + mov dl,byte [BPB_SecPerClus+boot_program] + mul dx + add ax,word [data_start+boot_program] + call conv_abs_to_THS ; convert abs sector (AX) to BIOS T:H:S (track:head:sector) patchhere: mov ah,2 ; ah=2 (read) @@ -267,7 +267,7 @@ write1st: push cs pop ds mov byte [patchhere+1+boot_program], 3 ; change ah=2 to ah=3 - mov ax,[cluster1st+boot_program] + mov bp,[cluster1st+boot_program] push 1000h pop es xor bx,bx