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