Subversion Repositories Kolibri OS

Rev

Rev 750 | Rev 769 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 750 Rev 759
Line 9... Line 9...
9
;;  Distributed under GPL. See file COPYING for details.        ;;
9
;;  Distributed under GPL. See file COPYING for details.        ;;
10
;;  Copyright 2003 Ville Turjanmaa                              ;;
10
;;  Copyright 2003 Ville Turjanmaa                              ;;
11
;;                                                              ;;
11
;;                                                              ;;
12
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
12
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 13... Line 13...
13
 
13
 
Line 14... Line 14...
14
$Revision: 750 $
14
$Revision: 759 $
15
 
15
 
16
 
16
 
Line 316... Line 316...
316
 
316
 
317
   irqnewread:
317
   irqnewread:
318
     dec    ecx
318
     dec    ecx
Line 319... Line 319...
319
     js     irqover
319
     js     irqover
Line 320... Line 320...
320
 
320
 
321
     mov    dx,[esi]         ; 2+
321
     movzx  edx, word [esi]	   ; 2+
322
 
-
 
323
     cmp    dx,0             ; 1
-
 
Line 324... Line -...
324
     jz     irqover
-
 
Line -... Line 322...
-
 
322
 
325
     cmp    [esi+3],byte 1   ; 2     ; byte read
323
     test   edx, edx		   ; 1
326
     jne    noirqbyte        ; 4-11
324
     jz     irqover
327
 
325
 
328
     in     al,dx
-
 
329
 
326
 
330
     mov    edx,[edi]
327
     mov    ebx, [edi]		   ; address of begin of buffer in edi      ; + 0x0 dword - data size
331
     cmp    edx,4000
-
 
332
     je     irqfull
328
     mov    eax, 4000							    ; + 0x4 dword - data begin offset
333
     mov    ebx,edi
-
 
334
     add    ebx,0x10
-
 
335
     add    ebx,edx
-
 
336
     mov    [ebx],al
-
 
337
     inc    edx
-
 
338
     mov    [edi],edx
-
 
Line -... Line 329...
-
 
329
     cmp    ebx, eax
Line -... Line 330...
-
 
330
     je     irqfull
-
 
331
     add    ebx, [edi + 0x4]	   ; add data size to data begin offset
-
 
332
     cmp    ebx, eax		   ; if end of buffer, begin cycle again
-
 
333
     jb     @f
339
 
334
 
-
 
335
     xor    ebx, ebx
340
     add    esi,4
336
 
Line 341... Line 337...
341
     jmp    irqnewread
337
  @@:
-
 
338
     add    ebx, edi
-
 
339
     movzx  eax, byte[esi + 3]	   ; get type of data being received 1 - byte, 2 - word
-
 
340
     dec    eax
-
 
341
     jz     irqbyte
-
 
342
     dec    eax
-
 
343
     jnz    noirqword
-
 
344
 
-
 
345
     in     ax,dx
-
 
346
     cmp    ebx, 3999		   ; check for address odd in the end of buffer
-
 
347
     jne    .odd
Line 342... Line -...
342
 
-
 
343
   noirqbyte:
-
 
344
 
-
 
-
 
348
     mov    [ebx + 0x10], ax
345
 
349
     jmp    .add_size
346
     cmp    [esi+3],byte 2     ; word read
-
 
347
     jne    noirqword
350
  .odd:
348
 
351
     mov    [ebx + 0x10], al	   ; I could make mistake here :)
349
     in     ax,dx
352
     mov    [edi + 0x10], ah
350
 
353
  .add_size:
351
     mov    edx,[edi]
354
     add    dword [edi], 2
352
     cmp    edx,4000
355
     jmp    nextport
Line -... Line 356...
-
 
356
 
353
     je     irqfull
357
 
354
     mov    ebx,edi
358
  irqbyte:
355
     add    ebx,0x10
359
     in     al,dx
Line 356... Line 360...
356
     add    ebx,edx
360
     mov    [ebx + 0x10],al