Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 4700 → Rev 4711

/kernel/trunk/detect/getcache.inc
138,7 → 138,7
and [esi+IDE_CACHE.appl_search_start], 0
 
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]
mov [esi+IDE_CACHE.pointer], eax
pop ecx
146,11 → 146,11
mov edx, eax
mov eax, [esi+IDE_CACHE.size]
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 ebx, eax
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
add ebx, edx
mov [esi+IDE_CACHE.data_pointer], ebx
/kernel/trunk/detect/init_ata.inc
209,11 → 209,11
xor eax, eax
add dx, 2
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
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
 
cmp [ecx+IDE_DATA.RegsBaseAddres], 0
/kernel/trunk/detect/sear_par.inc
43,7 → 43,7
; number of partitions: [DRIVE_DATA+2]
test [DRIVE_DATA+1], byte 0x40
jz @f
DEBUGF 1, "K : HD0\n"
 
push 'hd0'
mov eax, esp ; name
mov edx, hd0_data
57,7 → 57,7
; number of partitions: [DRIVE_DATA+3]
test [DRIVE_DATA+1], byte 0x10
jz @f
DEBUGF 1, "K : HD1\n"
 
push 'hd1'
mov eax, esp
mov edx, hd1_data
71,7 → 71,7
; number of partitions: [DRIVE_DATA+4]
test [DRIVE_DATA+1], byte 4
jz @f
DEBUGF 1, "K : HD2\n"
 
push 'hd2'
mov eax, esp
mov edx, hd2_data
85,7 → 85,7
; number of partitions: [DRIVE_DATA+5]
test [DRIVE_DATA+1], byte 1
jz @f
DEBUGF 1, "K : HD3\n"
 
push 'hd3'
mov eax, esp
mov edx, hd3_data
99,7 → 99,7
; number of partitions: [DRIVE_DATA+7]
test [DRIVE_DATA+6], byte 0x40
jz @f
DEBUGF 1, "K : HD4\n"
 
push 'hd4'
mov eax, esp ; name
mov edx, hd4_data
113,7 → 113,7
; number of partitions: [DRIVE_DATA+8]
test [DRIVE_DATA+6], byte 0x10
jz @f
DEBUGF 1, "K : HD5\n"
 
push 'hd5'
mov eax, esp
mov edx, hd5_data
127,7 → 127,7
; number of partitions: [DRIVE_DATA+9]
test [DRIVE_DATA+6], byte 4
jz @f
DEBUGF 1, "K : HD6\n"
 
push 'hd6'
mov eax, esp
mov edx, hd6_data
141,7 → 141,7
; number of partitions: [DRIVE_DATA+10]
test [DRIVE_DATA+6], byte 1
jz @f
DEBUGF 1, "K : HD7\n"
 
push 'hd7'
mov eax, esp
mov edx, hd7_data
155,7 → 155,7
; number of partitions: [DRIVE_DATA+12]
test [DRIVE_DATA+11], byte 0x40
jz @f
DEBUGF 1, "K : HD8\n"
 
push 'hd8'
mov eax, esp ; name
mov edx, hd8_data
169,7 → 169,7
; number of partitions: [DRIVE_DATA+13]
test [DRIVE_DATA+11], byte 0x10
jz @f
DEBUGF 1, "K : HD9\n"
 
push 'hd9'
mov eax, esp
mov edx, hd9_data
183,7 → 183,7
; number of partitions: [DRIVE_DATA+14]
test [DRIVE_DATA+14], byte 4
jz @f
DEBUGF 1, "K : HD10\n"
 
push 'hd10'
mov eax, esp
mov edx, hd10_data
197,7 → 197,7
; number of partitions: [DRIVE_DATA+15]
test [DRIVE_DATA+11], byte 1
jz @f
DEBUGF 1, "K : HD11\n"
 
push 'hd11'
mov eax, esp
mov edx, hd11_data
254,7 → 254,6
jnz .bdloop
pop ecx ecx ; restore stack after name
.nobd:
DEBUGF 1, "K : jmp end_search_partitions\n"
jmp end_search_partitions
;-----------------------------------------------------------------------------
; Helper procedure for search_partitions, adds one IDE disk.
/kernel/trunk/docs/sysfuncr.txt
1332,7 → 1332,9
* eax = 24 - номер функции
* ebx = 4 - номер подфункции
* 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
* eax = 24 - номер функции
* ebx = 5 - номер подфункции
* 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 контр.
Возвращаемое значение:
* функция не возвращает значения
Замечания:
/kernel/trunk/docs/sysfuncs.txt
1330,7 → 1330,9
* eax = 24 - function number
* ebx = 4 - subfunction number
* 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:
* function does not return value
Remarks:
1348,7 → 1350,9
* eax = 24 - function number
* ebx = 5 - subfunction number
* 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:
* function does not return value
Remarks:
/kernel/trunk/kernel.asm
5056,12 → 5056,37
;-----------------------------------------------------------------------------
align 4
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
je .eject
 
cmp ebx, 5
je .load
 
;--------------------------------------
.exit:
ret
;--------------------------------------
.load:
5082,23 → 5107,7
mov ebx, ecx
inc 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
shr eax, 1
and eax, 1
5108,8 → 5117,6
and eax, 1
mov [DiskNumber], al
call reserve_cd_channel
;--------------------------------------
.ret:
ret
;--------------------------------------
.free: