infinity.asm: add SND_GETFREESPACE call

git-svn-id: svn://kolibrios.org@572 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Sergey Semyonov (Serge)
2007-07-08 19:25:07 +00:00
parent f1bb02a02c
commit 6aaa312f13
5 changed files with 188 additions and 11 deletions

View File

@@ -13,6 +13,7 @@ API_VERSION equ 0 ;debug
include '../proc32.inc'
include '../imports.inc'
include 'urb.inc'
struc UHCI
{
@@ -371,6 +372,42 @@ proc insert_td stdcall, td:dword, frame:dword
ret
endp
align 4
proc usb_get_descriptor stdcall, dev:dword, type:dword, index:dword,\
buf:dword, size:dword
locals
count dd ?
endl
mov esi, [buf]
mov ecx, [size]
xor eax, eax
cld
rep stosb
mov [count], 3
@@:
mov eax, [type]
shl eax, 8
add eax, [index]
stdcall usb_control_msg, [dev],pipe,USB_REQ_GET_DESCRIPTOR,\
USB_DIR_IN, eax,0,[buf], [size],\
USB_CTRL_GET_TIMEOUT
test eax, eax
jz .next
cmp eax, -1
je .next
jmp. ok
.next:
dec [count]
jnz @B
mov eax, -1
.ok:
ret
endp
DEVICE_ID equ 0x24D2 ; pci device id
VENDOR_ID equ 0x8086 ; device vendor id
QEMU_USB equ 0x7020