forked from KolibriOS/kolibrios
ntfs.inc: bugfix
kernel.asm: normal keyboard typematic rate&delay git-svn-id: svn://kolibrios.org@265 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
49830b7fd4
commit
18334aa2f8
@ -284,6 +284,8 @@ ntfs_cur_offs dd ? ; in sectors
|
||||
ntfs_cur_size dd ? ; in sectors
|
||||
ntfs_cur_buf dd ?
|
||||
ntfs_cur_read dd ? ; [output]
|
||||
ntfs_bCanContinue db ?
|
||||
rb 3
|
||||
|
||||
ntfs_attrlist_buf rb 0x400
|
||||
ntfs_bitmap_buf rb 0x400
|
||||
@ -296,6 +298,7 @@ ntfs_attr_size dq ?
|
||||
ntfs_cur_tail dd ?
|
||||
endg
|
||||
|
||||
|
||||
ntfs_read_attr:
|
||||
; in: global variables
|
||||
; out: [ntfs_cur_read]
|
||||
@ -442,9 +445,19 @@ ntfs_read_attr:
|
||||
; c) Check for required offset and length
|
||||
mov ecx, [ntfs_attr_offs]
|
||||
jecxz .noattr
|
||||
push [ntfs_cur_size]
|
||||
push [ntfs_cur_read]
|
||||
call .doreadattr
|
||||
pop edx
|
||||
pop eax
|
||||
jc @f
|
||||
cmp [ntfs_cur_size], 0
|
||||
cmp [ntfs_bCanContinue], 0
|
||||
jz @f
|
||||
sub edx, [ntfs_cur_read]
|
||||
neg edx
|
||||
shr edx, 9
|
||||
sub eax, edx
|
||||
mov [ntfs_cur_size], eax
|
||||
jnz .not_in_cur
|
||||
@@:
|
||||
popad
|
||||
@ -613,6 +626,7 @@ ntfs_read_attr:
|
||||
jmp .scanliststart
|
||||
|
||||
.doreadattr:
|
||||
mov [ntfs_bCanContinue], 0
|
||||
cmp byte [ecx+8], 0
|
||||
jnz .nonresident
|
||||
mov eax, [ecx+10h] ; length
|
||||
@ -724,6 +738,8 @@ ntfs_read_attr:
|
||||
inc [ntfs_cur_offs]
|
||||
loop @b
|
||||
pop ecx
|
||||
xor eax, eax
|
||||
xor edx, edx
|
||||
cmp [ntfs_cur_size], 0
|
||||
jnz .readloop
|
||||
add esp, 10h
|
||||
@ -739,6 +755,7 @@ ntfs_read_attr:
|
||||
jmp .errret
|
||||
.break:
|
||||
add esp, 10h ; CF=0
|
||||
mov [ntfs_bCanContinue], 1
|
||||
ret
|
||||
|
||||
ntfs_read_file_record:
|
||||
|
@ -719,12 +719,11 @@ first_app_found:
|
||||
call kb_write
|
||||
|
||||
; wait until 8042 is ready
|
||||
; xor ecx,ecx
|
||||
; @@:
|
||||
; in al,64h
|
||||
; and al,00000010b
|
||||
; loopnz @b
|
||||
call Wait8042BufferEmpty
|
||||
xor ecx,ecx
|
||||
@@:
|
||||
in al,64h
|
||||
and al,00000010b
|
||||
loopnz @b
|
||||
|
||||
; mov al, 0xED ; svetodiody - only for testing!
|
||||
; call kb_write
|
||||
@ -735,10 +734,10 @@ first_app_found:
|
||||
|
||||
mov al, 0xF3 ; set repeat rate & delay
|
||||
call kb_write
|
||||
call kb_read
|
||||
; call kb_read
|
||||
mov al, 0 ; 30 250 ;00100010b ; 24 500 ;00100100b ; 20 500
|
||||
call kb_write
|
||||
call kb_read
|
||||
; call kb_read
|
||||
;// mike.dld [
|
||||
call set_lights
|
||||
;// mike.dld ]
|
||||
@ -4114,15 +4113,15 @@ kb_write:
|
||||
push ecx edx
|
||||
|
||||
mov dl,al
|
||||
mov ecx,0x1ffff ; last 0xffff, new value in view of fast CPU's
|
||||
kw_loop1:
|
||||
in al,0x64
|
||||
test al,0x20
|
||||
jz kw_ok1
|
||||
loop kw_loop1
|
||||
mov ah,1
|
||||
jmp kw_exit
|
||||
kw_ok1:
|
||||
; mov ecx,0x1ffff ; last 0xffff, new value in view of fast CPU's
|
||||
; kw_loop1:
|
||||
; in al,0x64
|
||||
; test al,0x20
|
||||
; jz kw_ok1
|
||||
; loop kw_loop1
|
||||
; mov ah,1
|
||||
; jmp kw_exit
|
||||
; kw_ok1:
|
||||
in al,0x60
|
||||
mov ecx,0x1ffff ; last 0xffff, new value in view of fast CPU's
|
||||
kw_loop:
|
||||
|
Loading…
Reference in New Issue
Block a user