fix parameters saving in floppy bootsector

git-svn-id: svn://kolibrios.org@1738 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
CleverMouse 2011-01-17 12:41:44 +00:00
parent f28b4ac95f
commit 259f2ffcd1

View File

@ -194,17 +194,17 @@ obtain_cluster:
mov ax,0e2eh ; ah=0eh (teletype), al='.' mov ax,0e2eh ; ah=0eh (teletype), al='.'
xor bh,bh xor bh,bh
int 10h 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 pop bx
writesec: 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) call conv_abs_to_THS ; convert abs sector (AX) to BIOS T:H:S (track:head:sector)
patchhere: patchhere:
mov ah,2 ; ah=2 (read) mov ah,2 ; ah=2 (read)
@ -267,7 +267,7 @@ write1st:
push cs push cs
pop ds pop ds
mov byte [patchhere+1+boot_program], 3 ; change ah=2 to ah=3 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 push 1000h
pop es pop es
xor bx,bx xor bx,bx