forked from KolibriOS/kolibrios
Fix f.24 for r.4700
git-svn-id: svn://kolibrios.org@4711 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
09143c58e9
commit
be1fff9c56
@ -138,7 +138,7 @@ get_cache_ide:
|
|||||||
and [esi+IDE_CACHE.appl_search_start], 0
|
and [esi+IDE_CACHE.appl_search_start], 0
|
||||||
|
|
||||||
push ecx
|
push ecx
|
||||||
DEBUGF 1, "K : IDE_CACHE.size %x\n", [esi+IDE_CACHE.size]
|
; DEBUGF 1, "K : IDE_CACHE.size %x\n", [esi+IDE_CACHE.size]
|
||||||
stdcall kernel_alloc, [esi+IDE_CACHE.size]
|
stdcall kernel_alloc, [esi+IDE_CACHE.size]
|
||||||
mov [esi+IDE_CACHE.pointer], eax
|
mov [esi+IDE_CACHE.pointer], eax
|
||||||
pop ecx
|
pop ecx
|
||||||
@ -146,11 +146,11 @@ get_cache_ide:
|
|||||||
mov edx, eax
|
mov edx, eax
|
||||||
mov eax, [esi+IDE_CACHE.size]
|
mov eax, [esi+IDE_CACHE.size]
|
||||||
shr eax, 3
|
shr eax, 3
|
||||||
DEBUGF 1, "K : IDE_CACHE.system_data_size %x\n", eax
|
; DEBUGF 1, "K : IDE_CACHE.system_data_size %x\n", eax
|
||||||
mov [esi+IDE_CACHE.system_data_size], eax
|
mov [esi+IDE_CACHE.system_data_size], eax
|
||||||
mov ebx, eax
|
mov ebx, eax
|
||||||
imul eax, 7
|
imul eax, 7
|
||||||
DEBUGF 1, "K : IDE_CACHE.appl_data_size %x\n", eax
|
; DEBUGF 1, "K : IDE_CACHE.appl_data_size %x\n", eax
|
||||||
mov [esi+IDE_CACHE.appl_data_size], eax
|
mov [esi+IDE_CACHE.appl_data_size], eax
|
||||||
add ebx, edx
|
add ebx, edx
|
||||||
mov [esi+IDE_CACHE.data_pointer], ebx
|
mov [esi+IDE_CACHE.data_pointer], ebx
|
||||||
|
@ -209,11 +209,11 @@ include 'dev_hdcd.inc'
|
|||||||
xor eax, eax
|
xor eax, eax
|
||||||
add dx, 2
|
add dx, 2
|
||||||
in al, dx
|
in al, dx
|
||||||
DEBUGF 1, "K : Primary Bus Master IDE Status Register %x\n", eax
|
; DEBUGF 1, "K : Primary Bus Master IDE Status Register %x\n", eax
|
||||||
|
|
||||||
add dx, 8
|
add dx, 8
|
||||||
in al, dx
|
in al, dx
|
||||||
DEBUGF 1, "K : Secondary Bus Master IDE Status Register %x\n", eax
|
; DEBUGF 1, "K : Secondary Bus Master IDE Status Register %x\n", eax
|
||||||
pop edx eax
|
pop edx eax
|
||||||
|
|
||||||
cmp [ecx+IDE_DATA.RegsBaseAddres], 0
|
cmp [ecx+IDE_DATA.RegsBaseAddres], 0
|
||||||
|
@ -43,7 +43,7 @@ search_partitions:
|
|||||||
; number of partitions: [DRIVE_DATA+2]
|
; number of partitions: [DRIVE_DATA+2]
|
||||||
test [DRIVE_DATA+1], byte 0x40
|
test [DRIVE_DATA+1], byte 0x40
|
||||||
jz @f
|
jz @f
|
||||||
DEBUGF 1, "K : HD0\n"
|
|
||||||
push 'hd0'
|
push 'hd0'
|
||||||
mov eax, esp ; name
|
mov eax, esp ; name
|
||||||
mov edx, hd0_data
|
mov edx, hd0_data
|
||||||
@ -57,7 +57,7 @@ search_partitions:
|
|||||||
; number of partitions: [DRIVE_DATA+3]
|
; number of partitions: [DRIVE_DATA+3]
|
||||||
test [DRIVE_DATA+1], byte 0x10
|
test [DRIVE_DATA+1], byte 0x10
|
||||||
jz @f
|
jz @f
|
||||||
DEBUGF 1, "K : HD1\n"
|
|
||||||
push 'hd1'
|
push 'hd1'
|
||||||
mov eax, esp
|
mov eax, esp
|
||||||
mov edx, hd1_data
|
mov edx, hd1_data
|
||||||
@ -71,7 +71,7 @@ search_partitions:
|
|||||||
; number of partitions: [DRIVE_DATA+4]
|
; number of partitions: [DRIVE_DATA+4]
|
||||||
test [DRIVE_DATA+1], byte 4
|
test [DRIVE_DATA+1], byte 4
|
||||||
jz @f
|
jz @f
|
||||||
DEBUGF 1, "K : HD2\n"
|
|
||||||
push 'hd2'
|
push 'hd2'
|
||||||
mov eax, esp
|
mov eax, esp
|
||||||
mov edx, hd2_data
|
mov edx, hd2_data
|
||||||
@ -85,7 +85,7 @@ search_partitions:
|
|||||||
; number of partitions: [DRIVE_DATA+5]
|
; number of partitions: [DRIVE_DATA+5]
|
||||||
test [DRIVE_DATA+1], byte 1
|
test [DRIVE_DATA+1], byte 1
|
||||||
jz @f
|
jz @f
|
||||||
DEBUGF 1, "K : HD3\n"
|
|
||||||
push 'hd3'
|
push 'hd3'
|
||||||
mov eax, esp
|
mov eax, esp
|
||||||
mov edx, hd3_data
|
mov edx, hd3_data
|
||||||
@ -99,7 +99,7 @@ search_partitions:
|
|||||||
; number of partitions: [DRIVE_DATA+7]
|
; number of partitions: [DRIVE_DATA+7]
|
||||||
test [DRIVE_DATA+6], byte 0x40
|
test [DRIVE_DATA+6], byte 0x40
|
||||||
jz @f
|
jz @f
|
||||||
DEBUGF 1, "K : HD4\n"
|
|
||||||
push 'hd4'
|
push 'hd4'
|
||||||
mov eax, esp ; name
|
mov eax, esp ; name
|
||||||
mov edx, hd4_data
|
mov edx, hd4_data
|
||||||
@ -113,7 +113,7 @@ search_partitions:
|
|||||||
; number of partitions: [DRIVE_DATA+8]
|
; number of partitions: [DRIVE_DATA+8]
|
||||||
test [DRIVE_DATA+6], byte 0x10
|
test [DRIVE_DATA+6], byte 0x10
|
||||||
jz @f
|
jz @f
|
||||||
DEBUGF 1, "K : HD5\n"
|
|
||||||
push 'hd5'
|
push 'hd5'
|
||||||
mov eax, esp
|
mov eax, esp
|
||||||
mov edx, hd5_data
|
mov edx, hd5_data
|
||||||
@ -127,7 +127,7 @@ search_partitions:
|
|||||||
; number of partitions: [DRIVE_DATA+9]
|
; number of partitions: [DRIVE_DATA+9]
|
||||||
test [DRIVE_DATA+6], byte 4
|
test [DRIVE_DATA+6], byte 4
|
||||||
jz @f
|
jz @f
|
||||||
DEBUGF 1, "K : HD6\n"
|
|
||||||
push 'hd6'
|
push 'hd6'
|
||||||
mov eax, esp
|
mov eax, esp
|
||||||
mov edx, hd6_data
|
mov edx, hd6_data
|
||||||
@ -141,7 +141,7 @@ search_partitions:
|
|||||||
; number of partitions: [DRIVE_DATA+10]
|
; number of partitions: [DRIVE_DATA+10]
|
||||||
test [DRIVE_DATA+6], byte 1
|
test [DRIVE_DATA+6], byte 1
|
||||||
jz @f
|
jz @f
|
||||||
DEBUGF 1, "K : HD7\n"
|
|
||||||
push 'hd7'
|
push 'hd7'
|
||||||
mov eax, esp
|
mov eax, esp
|
||||||
mov edx, hd7_data
|
mov edx, hd7_data
|
||||||
@ -155,7 +155,7 @@ search_partitions:
|
|||||||
; number of partitions: [DRIVE_DATA+12]
|
; number of partitions: [DRIVE_DATA+12]
|
||||||
test [DRIVE_DATA+11], byte 0x40
|
test [DRIVE_DATA+11], byte 0x40
|
||||||
jz @f
|
jz @f
|
||||||
DEBUGF 1, "K : HD8\n"
|
|
||||||
push 'hd8'
|
push 'hd8'
|
||||||
mov eax, esp ; name
|
mov eax, esp ; name
|
||||||
mov edx, hd8_data
|
mov edx, hd8_data
|
||||||
@ -169,7 +169,7 @@ search_partitions:
|
|||||||
; number of partitions: [DRIVE_DATA+13]
|
; number of partitions: [DRIVE_DATA+13]
|
||||||
test [DRIVE_DATA+11], byte 0x10
|
test [DRIVE_DATA+11], byte 0x10
|
||||||
jz @f
|
jz @f
|
||||||
DEBUGF 1, "K : HD9\n"
|
|
||||||
push 'hd9'
|
push 'hd9'
|
||||||
mov eax, esp
|
mov eax, esp
|
||||||
mov edx, hd9_data
|
mov edx, hd9_data
|
||||||
@ -183,7 +183,7 @@ search_partitions:
|
|||||||
; number of partitions: [DRIVE_DATA+14]
|
; number of partitions: [DRIVE_DATA+14]
|
||||||
test [DRIVE_DATA+14], byte 4
|
test [DRIVE_DATA+14], byte 4
|
||||||
jz @f
|
jz @f
|
||||||
DEBUGF 1, "K : HD10\n"
|
|
||||||
push 'hd10'
|
push 'hd10'
|
||||||
mov eax, esp
|
mov eax, esp
|
||||||
mov edx, hd10_data
|
mov edx, hd10_data
|
||||||
@ -197,7 +197,7 @@ search_partitions:
|
|||||||
; number of partitions: [DRIVE_DATA+15]
|
; number of partitions: [DRIVE_DATA+15]
|
||||||
test [DRIVE_DATA+11], byte 1
|
test [DRIVE_DATA+11], byte 1
|
||||||
jz @f
|
jz @f
|
||||||
DEBUGF 1, "K : HD11\n"
|
|
||||||
push 'hd11'
|
push 'hd11'
|
||||||
mov eax, esp
|
mov eax, esp
|
||||||
mov edx, hd11_data
|
mov edx, hd11_data
|
||||||
@ -254,7 +254,6 @@ endg
|
|||||||
jnz .bdloop
|
jnz .bdloop
|
||||||
pop ecx ecx ; restore stack after name
|
pop ecx ecx ; restore stack after name
|
||||||
.nobd:
|
.nobd:
|
||||||
DEBUGF 1, "K : jmp end_search_partitions\n"
|
|
||||||
jmp end_search_partitions
|
jmp end_search_partitions
|
||||||
;-----------------------------------------------------------------------------
|
;-----------------------------------------------------------------------------
|
||||||
; Helper procedure for search_partitions, adds one IDE disk.
|
; Helper procedure for search_partitions, adds one IDE disk.
|
||||||
|
@ -1332,7 +1332,9 @@ dd 1675
|
|||||||
* eax = 24 - номер функции
|
* eax = 24 - номер функции
|
||||||
* ebx = 4 - номер подфункции
|
* ebx = 4 - номер подфункции
|
||||||
* ecx = номер CD/DVD-диска
|
* ecx = номер CD/DVD-диска
|
||||||
(от 0=Primary Master до 3=Secondary Slave)
|
от 0=Primary Master до 3=Secondary Slave для первого IDE контр.
|
||||||
|
от 4=Primary Master до 7=Secondary Slave для второго IDE контр.
|
||||||
|
от 8=Primary Master до 11=Secondary Slave для третьего IDE контр.
|
||||||
Возвращаемое значение:
|
Возвращаемое значение:
|
||||||
* функция не возвращает значения
|
* функция не возвращает значения
|
||||||
Замечания:
|
Замечания:
|
||||||
@ -1350,7 +1352,9 @@ dd 1675
|
|||||||
* eax = 24 - номер функции
|
* eax = 24 - номер функции
|
||||||
* ebx = 5 - номер подфункции
|
* ebx = 5 - номер подфункции
|
||||||
* ecx = номер CD/DVD-диска
|
* ecx = номер CD/DVD-диска
|
||||||
(от 0=Primary Master до 3=Secondary Slave)
|
от 0=Primary Master до 3=Secondary Slave для первого IDE контр.
|
||||||
|
от 4=Primary Master до 7=Secondary Slave для второго IDE контр.
|
||||||
|
от 8=Primary Master до 11=Secondary Slave для третьего IDE контр.
|
||||||
Возвращаемое значение:
|
Возвращаемое значение:
|
||||||
* функция не возвращает значения
|
* функция не возвращает значения
|
||||||
Замечания:
|
Замечания:
|
||||||
|
@ -1330,7 +1330,9 @@ Parameters:
|
|||||||
* eax = 24 - function number
|
* eax = 24 - function number
|
||||||
* ebx = 4 - subfunction number
|
* ebx = 4 - subfunction number
|
||||||
* ecx = position of CD/DVD-drive
|
* ecx = position of CD/DVD-drive
|
||||||
(from 0=Primary Master to 3=Secondary Slave)
|
from 0=Primary Master to 3=Secondary Slave for first IDE contr.
|
||||||
|
from 4=Primary Master to 7=Secondary Slave for second IDE contr.
|
||||||
|
from 8=Primary Master to 11=Secondary Slave for third IDE contr.
|
||||||
Returned value:
|
Returned value:
|
||||||
* function does not return value
|
* function does not return value
|
||||||
Remarks:
|
Remarks:
|
||||||
@ -1348,7 +1350,9 @@ Parameters:
|
|||||||
* eax = 24 - function number
|
* eax = 24 - function number
|
||||||
* ebx = 5 - subfunction number
|
* ebx = 5 - subfunction number
|
||||||
* ecx = position of CD/DVD-drive
|
* ecx = position of CD/DVD-drive
|
||||||
(from 0=Primary Master to 3=Secondary Slave)
|
from 0=Primary Master to 3=Secondary Slave for first IDE contr.
|
||||||
|
from 4=Primary Master to 7=Secondary Slave for second IDE contr.
|
||||||
|
from 8=Primary Master to 11=Secondary Slave for third IDE contr.
|
||||||
Returned value:
|
Returned value:
|
||||||
* function does not return value
|
* function does not return value
|
||||||
Remarks:
|
Remarks:
|
||||||
|
@ -5056,12 +5056,37 @@ syscall_getscreensize: ; GetScreenSize
|
|||||||
;-----------------------------------------------------------------------------
|
;-----------------------------------------------------------------------------
|
||||||
align 4
|
align 4
|
||||||
syscall_cdaudio: ; CD
|
syscall_cdaudio: ; CD
|
||||||
|
; ECX - position of CD/DVD-drive
|
||||||
|
; from 0=Primary Master to 3=Secondary Slave for first IDE contr.
|
||||||
|
; from 4=Primary Master to 7=Secondary Slave for second IDE contr.
|
||||||
|
; from 8=Primary Master to 11=Secondary Slave for third IDE contr.
|
||||||
|
cmp ecx, 11
|
||||||
|
ja .exit
|
||||||
|
|
||||||
|
mov eax, ecx
|
||||||
|
shr eax, 2
|
||||||
|
lea eax, [eax*5]
|
||||||
|
mov al, [eax+DRIVE_DATA+1]
|
||||||
|
|
||||||
|
push ecx ebx
|
||||||
|
mov ebx, ecx
|
||||||
|
and ebx, 11b
|
||||||
|
shl ebx, 1
|
||||||
|
mov cl, 6
|
||||||
|
sub cl, bl
|
||||||
|
shr al, cl
|
||||||
|
test al, 2 ; it's not an ATAPI device
|
||||||
|
pop ebx ecx
|
||||||
|
|
||||||
|
jz .exit
|
||||||
|
|
||||||
cmp ebx, 4
|
cmp ebx, 4
|
||||||
je .eject
|
je .eject
|
||||||
|
|
||||||
cmp ebx, 5
|
cmp ebx, 5
|
||||||
je .load
|
je .load
|
||||||
|
;--------------------------------------
|
||||||
|
.exit:
|
||||||
ret
|
ret
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
.load:
|
.load:
|
||||||
@ -5082,22 +5107,6 @@ syscall_cdaudio: ; CD
|
|||||||
mov ebx, ecx
|
mov ebx, ecx
|
||||||
inc ebx
|
inc ebx
|
||||||
mov [cdpos], ebx
|
mov [cdpos], ebx
|
||||||
mov eax, ebx
|
|
||||||
|
|
||||||
mov ebx, ecx
|
|
||||||
and ebx, 11b
|
|
||||||
shl ebx, 1
|
|
||||||
mov cl, 8
|
|
||||||
sub cl, bl
|
|
||||||
|
|
||||||
dec eax
|
|
||||||
shr eax, 2
|
|
||||||
lea eax, [eax*5]
|
|
||||||
mov al, [eax+DRIVE_DATA+1]
|
|
||||||
|
|
||||||
shr al, cl
|
|
||||||
test al, 2 ; it's not an ATAPI device
|
|
||||||
jz .ret
|
|
||||||
|
|
||||||
mov eax, ecx
|
mov eax, ecx
|
||||||
shr eax, 1
|
shr eax, 1
|
||||||
@ -5108,8 +5117,6 @@ syscall_cdaudio: ; CD
|
|||||||
and eax, 1
|
and eax, 1
|
||||||
mov [DiskNumber], al
|
mov [DiskNumber], al
|
||||||
call reserve_cd_channel
|
call reserve_cd_channel
|
||||||
;--------------------------------------
|
|
||||||
.ret:
|
|
||||||
ret
|
ret
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
.free:
|
.free:
|
||||||
|
Loading…
Reference in New Issue
Block a user