Subversion Repositories Kolibri OS

Rev

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

Rev 748 Rev 760
Line 2008... Line 2008...
2008
  * eax = owner PID
2008
  * eax = owner PID
2009
  * eax = 0, if there is no owner
2009
  * eax = 0, if there is no owner
2010
  * eax = -1 for incorrect ebx
2010
  * eax = -1 for incorrect ebx
Line 2011... Line 2011...
2011
 
2011
 
2012
======================================================================
2012
======================================================================
2013
==================== Function 42 - read IRQ data. ====================
2013
==================== Function 42 - work with IRQ data. ===============
-
 
2014
======================================================================
-
 
2015
 
-
 
2016
------------------------ Reading data --------------------------------
2014
======================================================================
2017
 
2015
When an IRQ occurs, the system reads data from ports indicated
2018
When an IRQ occurs, the system reads data from ports indicated
2016
earlier by function 44 and writes this data to
2019
earlier by function 44 and writes this data to
2017
internal buffer. This function reads out data from that buffer
2020
internal buffer. This function reads out data from that buffer
2018
bytewise.
2021
to the buffer specified as parameter.
2019
Parameters:
2022
Parameters:
2020
  * eax = 42 - function number
2023
  * eax = 42 - function number
-
 
2024
  * bl = IRQ number, 0..15
-
 
2025
  * bh = subfunction number, 0
-
 
2026
Other part of register ebx, must be zero.
2021
  * ebx = IRQ number, 0..15
2027
  * ecx = pointer to the receive buffer
2022
Returned value: (use value of ecx to distinguish)
2028
Returned value: (use value of eax to distinguish)
2023
  * if the thread is not IRQ owner (or IRQ number is incorrect):
2029
  * if the thread is not IRQ owner (or IRQ number is incorrect):
2024
    * ecx = 2
2030
    * eax = -1
2025
  * if there is no data:
2031
  * if there is no data:
2026
    * eax = 0
-
 
2027
    * ecx = 1
-
 
2028
    * ebx destroyed
2032
    * eax = 0
2029
  * if all is ok:
2033
  * if all is ok:
-
 
2034
    * eax = byte size of data, read from buffer
-
 
2035
 
-
 
2036
See remarks below.
-
 
2037
 
-
 
2038
------------------------ Get data size -------------------------------
-
 
2039
 
-
 
2040
Parameters:
-
 
2041
  * eax = 42 - function number
-
 
2042
  * bl = IRQ number, 0..15
-
 
2043
  * bh = subfunction number, 0
-
 
2044
Other part of register ebx, must be zero.
-
 
2045
  * ecx = pointer to receive buffer
-
 
2046
Returned value: (use value of eax to distinguish)
2030
    * eax = byte size of data, not yet read from buffer
2047
  * if the thread is not IRQ owner (or IRQ number is incorrect):
-
 
2048
    * eax = -1
2031
    * ecx = 0
2049
  * if all is ok:
-
 
2050
    * eax = byte size of data in buffer
2032
    * ebx = current byte
2051
 
2033
Remarks:
2052
Remarks:
2034
  * Previously the thread must reserve indicated IRQ for itself
2053
  * Previously the thread must reserve indicated IRQ for itself
2035
    by function 45.
2054
    by function 45.
2036
  * The size of data buffer is 4000 bytes, on overflow
2055
  * The size of data buffer is 4000 bytes, on overflow