Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 758 → Rev 759

/kernel/trunk/core/sys32.inc
318,48 → 318,52
dec ecx
js irqover
 
mov dx,[esi] ; 2+
movzx edx, word [esi] ; 2+
 
cmp dx,0 ; 1
test edx, edx ; 1
jz irqover
cmp [esi+3],byte 1 ; 2 ; byte read
jne noirqbyte ; 4-11
 
in al,dx
 
mov edx,[edi]
cmp edx,4000
mov ebx, [edi] ; address of begin of buffer in edi ; + 0x0 dword - data size
mov eax, 4000 ; + 0x4 dword - data begin offset
cmp ebx, eax
je irqfull
mov ebx,edi
add ebx,0x10
add ebx,edx
mov [ebx],al
inc edx
mov [edi],edx
add ebx, [edi + 0x4] ; add data size to data begin offset
cmp ebx, eax ; if end of buffer, begin cycle again
jb @f
 
add esi,4
jmp irqnewread
xor ebx, ebx
 
noirqbyte:
@@:
add ebx, edi
movzx eax, byte[esi + 3] ; get type of data being received 1 - byte, 2 - word
dec eax
jz irqbyte
dec eax
jnz noirqword
 
in ax,dx
cmp ebx, 3999 ; check for address odd in the end of buffer
jne .odd
mov [ebx + 0x10], ax
jmp .add_size
.odd:
mov [ebx + 0x10], al ; I could make mistake here :)
mov [edi + 0x10], ah
.add_size:
add dword [edi], 2
jmp nextport
 
cmp [esi+3],byte 2 ; word read
jne noirqword
 
in ax,dx
 
mov edx,[edi]
cmp edx,4000
je irqfull
mov ebx,edi
add ebx,0x10
add ebx,edx
mov [ebx],ax
add edx,2
mov [edi],edx
irqbyte:
in al,dx
mov [ebx + 0x10],al
inc dword [edi]
nextport:
add esi,4
jmp irqnewread
 
 
noirqword:
irqfull:
irqover:
/kernel/trunk/kernel.asm
3948,25 → 3948,33
gidril1:
 
shl ebx,12
mov ecx,1
lea eax,[ebx + IRQ_SAVE + 0x10]
mov edx,[eax - 0x10]
xor ecx, ecx
inc ecx
lea eax,[ebx + IRQ_SAVE]
mov edx,[eax]
test edx,edx
jz gid1
 
dec dword [eax - 0x10]
dec edx
mov [eax], edx
 
movzx ebx,byte [eax]
mov ecx, [eax + 0x4]
 
mov edi, eax
xchg esi, eax
inc esi
cmp ecx, 4000
jb @f
 
mov ecx,4000 / 4
cld
rep movsd
; xor ecx,ecx ; as result of 'rep' ecx=0
dec edx
xor ecx, ecx
 
@@:
inc ecx
mov [eax + 0x4], ecx
dec ecx
add eax, ecx
 
movzx ebx,byte [eax + 0x10]
 
xor ecx, ecx
 
gid1:
mov [esp+32],edx
mov [esp+28],ecx